progress bar in item grid

This commit is contained in:
Nabin Hait 2015-02-06 13:00:33 +05:30
parent 5e13e0c316
commit a3cb828ed3

View File

@ -41,7 +41,7 @@
var delivered = doc.doctype==="Sales Order Item" ?
doc.delivered_qty : doc.received_qty,
completed =
100 - cint((doc.qty - delivered) * 100 / doc.qty),
100 - cint((flt(doc.qty) - flt(delivered)) * 100 / flt(doc.qty)),
title = __("Delivered");
%}
{% include "templates/form_grid/includes/progress.html" %}
@ -95,7 +95,7 @@
{% if(in_list(["Sales Order Item", "Purchase Order Item"],
doc.doctype) && frm.doc.docstatus===1 && doc.amount) {
var completed =
100 - cint((doc.amount - doc.billed_amt) * 100 / doc.amount),
100 - cint((flt(doc.amount) - flt(doc.billed_amt)) * 100 / flt(doc.amount)),
title = __("Billed");
%}
<br><small>&nbsp;</small>