Merge pull request #26429 from deepeshgarg007/amended_doc_discount_develop

fix: Incorrect discount amount on amended document
This commit is contained in:
Deepesh Garg 2021-07-13 15:34:32 +05:30 committed by GitHub
commit a5200d6a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,6 +67,8 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
calculate_discount_amount(){ calculate_discount_amount(){
if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount")) { if (frappe.meta.get_docfield(this.frm.doc.doctype, "discount_amount")) {
this.calculate_item_values();
this.calculate_net_total();
this.set_discount_amount(); this.set_discount_amount();
this.apply_discount_amount(); this.apply_discount_amount();
} }