added bar indicators to Sales Invoice & Purchase Invoice

This commit is contained in:
Rushabh Mehta 2013-02-02 15:12:45 +05:30
parent e76adfcfdd
commit 6282c4a18a
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// render
wn.listview_settings['Purchase Invoice'] = {
add_fields: ["`tabPurchase Invoice`.grand_total", "`tabPurchase Invoice`.outstanding_amount"],
add_columns: [{"content":"outstanding_amount", width:"10%", type:"bar-graph"}],
prepare_data: function(data) {
data.outstanding_amount = (flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total) * 100;
}
};

View File

@ -0,0 +1,9 @@
// render
wn.listview_settings['Sales Invoice'] = {
add_fields: ["`tabSales Invoice`.grand_total", "`tabSales Invoice`.outstanding_amount"],
add_columns: [{"content":"outstanding_amount", width:"10%", type:"bar-graph"}],
prepare_data: function(data) {
data.outstanding_amount = (flt(data.grand_total) -
flt(data.outstanding_amount)) / flt(data.grand_total) * 100;
}
};