From 2b6bf82d6103f32f78c1d210bb708d00fc5a76e0 Mon Sep 17 00:00:00 2001 From: Helkyd Date: Wed, 22 Nov 2017 14:49:51 +0100 Subject: [PATCH] Default Payment Mode POS drafted, user retrieves the record and sets the default payment mode so that Zero payment is not done. --- erpnext/accounts/page/pos/pos.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index be0b6f7b72..b86529e753 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -1638,6 +1638,14 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.si_docs = this.get_doc_from_localstorage(); if (this.name) { this.update_invoice() + //to retrieve and set the default payment + invoice_data[this.name] = this.frm.doc; + invoice_data[this.name].payments[0].amount = this.frm.doc.net_total + invoice_data[this.name].payments[0].base_amount = this.frm.doc.net_total + + this.frm.doc.paid_amount = this.frm.doc.net_total + this.frm.doc.outstanding_amount = 0 + } else { this.name = $.now(); this.frm.doc.offline_pos_name = this.name;