feat: pricing rule enhancements

This commit is contained in:
Rohit Waghchaure
2019-03-18 14:34:19 +05:30
parent 5f8b358fd4
commit 8bfe330b37
60 changed files with 7648 additions and 812 deletions

View File

@@ -20,6 +20,9 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
if(item.discount_percentage){
item.discount_amount = flt(item.rate_with_margin) * flt(item.discount_percentage) / 100;
}
if (item.discount_amount) {
item.rate = flt((item.rate_with_margin) - (item.discount_amount), precision('rate', item));
}
},