From f7de3769325e26e94a09c0c7dabedab0d3c24864 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 5 Jul 2013 16:50:43 +0530 Subject: [PATCH] [sales invoice] added progress bar of payment --- accounts/doctype/sales_invoice/sales_invoice.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index 6989ad274b..7d43bbee0d 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -55,7 +55,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte wn.set_route("general-ledger"); }); - cur_frm.dashboard.add_progress() + var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100); + cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid); cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);