sales/ pur invoice listview fix
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index f9dd4cd..7bb2558 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -16,9 +16,8 @@
prepare_data: function(data) {
this._super(data);
- data.paid = flt(
- ((data.grand_total - data.outstanding_amount) / data.grand_total) * 100,
- 2);
+ data.paid = data.docstatus == 1 ?
+ flt(((data.grand_total - data.outstanding_amount) / data.grand_total) * 100, 2) : 0;
},
columns: [
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
index 1c3b2d3..cbe1741 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -14,7 +14,8 @@
},
prepare_data: function(data) {
this._super(data);
- data.paid = flt((data.grand_total - data.outstanding_amount) / data.grand_total * 100, 2);
+ data.paid = (data.docstatus == 1) ?
+ flt((data.grand_total - data.outstanding_amount) / data.grand_total * 100, 2) : 0;
},
columns: [
{width: '3%', content: 'check'},