Merge pull request #23353 from SDLyu/patch-1

fix: missing default Sales Taxes And Charges Template when frm.doc.taxes is []
This commit is contained in:
Deepesh Garg 2020-09-18 15:17:56 +05:30 committed by GitHub
commit bbc6aee803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,7 +417,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
var taxes_and_charges_field = frappe.meta.get_docfield(me.frm.doc.doctype, "taxes_and_charges",
me.frm.doc.name);
if (!this.frm.doc.taxes_and_charges && this.frm.doc.taxes) {
if (!this.frm.doc.taxes_and_charges && this.frm.doc.taxes && this.frm.doc.taxes.length > 0) {
return;
}