fix: auto increment qty if item table has no items
(cherry picked from commit e5b19e3f70)
This commit is contained in:
committed by
Mergify
parent
1944f4df4d
commit
d8e403bf5d
@@ -341,6 +341,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
this.set_dynamic_labels();
|
||||
this.setup_sms();
|
||||
this.setup_quality_inspection();
|
||||
this.validate_has_items();
|
||||
}
|
||||
|
||||
scan_barcode() {
|
||||
@@ -348,6 +349,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
barcode_scanner.process_scan();
|
||||
}
|
||||
|
||||
validate_has_items () {
|
||||
let table = this.frm.doc.items;
|
||||
this.frm.has_items = (table && table.length
|
||||
&& table[0].qty && table[0].item_code);
|
||||
}
|
||||
|
||||
apply_default_taxes() {
|
||||
var me = this;
|
||||
var taxes_and_charges_field = frappe.meta.get_docfield(me.frm.doc.doctype, "taxes_and_charges",
|
||||
|
||||
Reference in New Issue
Block a user