[flat discount] implemented flat discount on client side

This commit is contained in:
Akhilesh Darjee
2013-12-25 19:46:20 +05:30
parent 63aa5fd673
commit c53dbc7cdf
7 changed files with 162 additions and 57 deletions

View File

@@ -360,6 +360,14 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
});
}
}
if(this.frm.tax_doclist.length) {
if(!wn.meta.get_docfield(this.frm.tax_doclist[0].doctype, "tax_amount_after_flat_discount", this.frm.doctype)) {
$.each(this.frm.tax_doclist, function(i, tax) {
delete tax["tax_amount_after_flat_discount"];
});
}
}
},
calculate_outstanding_amount: function() {