[hotfix] update reserved quantity in delivery note

This commit is contained in:
Anand Doshi 2015-08-27 14:42:25 +05:30
parent c6802ca6d0
commit 41e948b00a

View File

@ -258,11 +258,12 @@ class DeliveryNote(SellingController):
frappe.msgprint(_("Packing Slip(s) cancelled")) frappe.msgprint(_("Packing Slip(s) cancelled"))
def update_stock_ledger(self): def update_stock_ledger(self):
self.update_reserved_qty()
sl_entries = [] sl_entries = []
for d in self.get_item_list(): for d in self.get_item_list():
if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 \ if frappe.db.get_value("Item", d.item_code, "is_stock_item") == 1 \
and d.warehouse and flt(d['qty']): and d.warehouse and flt(d['qty']):
self.update_reserved_qty(d)
incoming_rate = 0 incoming_rate = 0
if cint(self.is_return) and self.return_against and self.docstatus==1: if cint(self.is_return) and self.return_against and self.docstatus==1: