sales/ pur invoice listview fix

This commit is contained in:
Nabin Hait 2012-09-19 16:06:03 +05:30
parent 39ca69e978
commit 757a785872
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,8 @@ wn.doclistviews['Purchase Invoice'] = wn.views.ListView.extend({
prepare_data: function(data) { prepare_data: function(data) {
this._super(data); this._super(data);
data.paid = flt( data.paid = data.docstatus == 1 ?
((data.grand_total - data.outstanding_amount) / data.grand_total) * 100, flt(((data.grand_total - data.outstanding_amount) / data.grand_total) * 100, 2) : 0;
2);
}, },
columns: [ columns: [

View File

@ -14,7 +14,8 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({
}, },
prepare_data: function(data) { prepare_data: function(data) {
this._super(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: [ columns: [
{width: '3%', content: 'check'}, {width: '3%', content: 'check'},