Merge pull request #32799 from rohitwaghchaure/fix-scan-qrcode-functionality

fix: Scan Barcode UX
This commit is contained in:
rohitwaghchaure
2022-11-04 11:04:40 +05:30
committed by GitHub
8 changed files with 289 additions and 43 deletions

View File

@@ -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",