No ZERO payment

If no payment mode selected does not process ... to avoid having SI with payment pending as POS for sure was paid..
This commit is contained in:
Helkyd 2017-11-22 16:06:22 +01:00
parent 0195528798
commit 3264c13545

View File

@ -27,9 +27,14 @@ erpnext.payments = erpnext.stock.StockController.extend({
var me = this;
this.dialog.set_primary_action(__("Submit"), function() {
me.dialog.hide()
me.submit_invoice()
})
//Allow no ZERO payment
$.each(me.frm.doc.payments, function (index, data) {
if (data.amount != 0) {
me.dialog.hide();
me.submit_invoice();
return;
}
}); })
},
make_keyboard: function(){