[sales invoice] added progress bar of payment

This commit is contained in:
Rushabh Mehta 2013-07-05 16:54:40 +05:30
parent f7de376932
commit 8f48db33d2

View File

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