[minor] don't show po / mr buttons if delivered

This commit is contained in:
Rushabh Mehta 2015-11-06 16:52:18 +05:30
parent 64e31e9a4e
commit 4268b0092a

View File

@ -23,12 +23,15 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
$.each(cur_frm.doc.items, function(i, item){
if(item.delivered_by_supplier == 1 || item.supplier){
if(item.qty > flt(item.ordered_qty))
if(item.qty > flt(item.ordered_qty)
&& item.qty > flt(item.delivered_qty)) {
is_delivered_by_supplier = true;
}
}
else{
if(item.qty > flt(item.delivered_qty))
if(item.qty > flt(item.delivered_qty)) {
is_delivery_note = true;
}
}
})