[POS] Enhancement to set default payment as cash, functionality to clear amount value, renamed doctype Payments and some fixes.

This commit is contained in:
Rohit Waghchaure
2016-06-13 21:37:10 +05:30
parent d1eba515e9
commit 9fe40d557f
14 changed files with 157 additions and 86 deletions

View File

@@ -577,7 +577,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
var me = this;
var paid_amount = base_paid_amount = 0.0;
$.each(this.frm.doc['payments'] || [], function(index, data){
if(data.amount > 0){
if(data.amount > -1){
data.base_amount = flt(data.amount * me.frm.doc.conversion_rate);
paid_amount += data.amount;
base_paid_amount += data.base_amount;