discount related fix
This commit is contained in:
parent
bc6c360bf1
commit
86cd4cc739
@ -73,6 +73,7 @@ class calculate_taxes_and_totals(object):
|
|||||||
|
|
||||||
def initialize_taxes(self):
|
def initialize_taxes(self):
|
||||||
for tax in self.doc.get("taxes"):
|
for tax in self.doc.get("taxes"):
|
||||||
|
if not self.discount_amount_applied:
|
||||||
validate_taxes_and_charges(tax)
|
validate_taxes_and_charges(tax)
|
||||||
validate_inclusive_tax(tax, self.doc)
|
validate_inclusive_tax(tax, self.doc)
|
||||||
|
|
||||||
|
@ -94,8 +94,10 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
|
|||||||
|
|
||||||
$.each(tax_fields, function(i, fieldname) { tax[fieldname] = 0.0 });
|
$.each(tax_fields, function(i, fieldname) { tax[fieldname] = 0.0 });
|
||||||
|
|
||||||
|
if (!this.discount_amount_applied) {
|
||||||
cur_frm.cscript.validate_taxes_and_charges(tax.doctype, tax.name);
|
cur_frm.cscript.validate_taxes_and_charges(tax.doctype, tax.name);
|
||||||
me.validate_inclusive_tax(tax);
|
me.validate_inclusive_tax(tax);
|
||||||
|
}
|
||||||
frappe.model.round_floats_in(tax);
|
frappe.model.round_floats_in(tax);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user