Update item_grid.html

Change the colour of the indicator to be green when delivered qty is bigger than ordered qty
This commit is contained in:
bobzz-zone 2015-09-23 11:42:06 +07:00
parent b6ec680c46
commit 3bcb13b1b8

View File

@ -40,10 +40,10 @@
{% if(in_list(["Sales Order Item", "Purchase Order Item"],
doc.doctype) && frm.doc.docstatus===1) {
var delivered = doc.doctype==="Sales Order Item" ?
doc.delivered_qty : doc.received_qty,
pending = flt(doc.qty) - flt(delivered);
doc.delivered_qty : doc.received_qty;
var pending = flt(doc.qty) - flt(delivered);
%}
<span class="indicator {%= pending ? "orange" : "green" %}">{%= doc.item_code %}</span>
<span class="indicator {%= pending>0 ? "orange" : "green" %}">{%= doc.item_code %}</span>
{% } else { %}
<strong>{%= doc.item_code %}</strong>
{% } %}