mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 04:45:09 +00:00
fix: remove all serial/batch fields when use button is unselected
(cherry picked from commit 22ffdb9e77)
This commit is contained in:
@@ -251,6 +251,15 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use_serial_batch_fields(frm, cdt, cdn) {
|
||||||
|
const item = locals[cdt][cdn];
|
||||||
|
if (!item.use_serial_batch_fields) {
|
||||||
|
frappe.model.set_value(cdt, cdn, "serial_no", "");
|
||||||
|
frappe.model.set_value(cdt, cdn, "batch_no", "");
|
||||||
|
frappe.model.set_value(cdt, cdn, "rejected_serial_no", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
set_fields_onload_for_line_item() {
|
set_fields_onload_for_line_item() {
|
||||||
if (this.frm.is_new() && this.frm.doc?.items) {
|
if (this.frm.is_new() && this.frm.doc?.items) {
|
||||||
this.frm.doc.items.forEach(item => {
|
this.frm.doc.items.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user