Added zero value condition

This commit is contained in:
Rohit Waghchaure
2016-08-31 02:09:15 +05:30
parent 609e2b4ca3
commit d39f53319d
2 changed files with 2 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ erpnext.payments = erpnext.stock.StockController.extend({
if(me.idx == 'change_amount'){
me.change_amount(value)
} else{
if(flt(value) == 0 && update_write_off) {
if(flt(value) == 0 && update_write_off && me.frm.doc.outstanding_amount > 0) {
value = flt(me.frm.doc.outstanding_amount / me.frm.doc.conversion_rate, precision(me.idx));
}
me.write_off_amount(value)