Fix missing tax autoload when frm.doc.taxes is []

This commit is contained in:
SDLyu 2020-09-18 13:58:23 +08:00 committed by GitHub
parent 2aea184f6f
commit 68672af8ab
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;
}