stock repost patch
This commit is contained in:
parent
dd9d4bbdea
commit
8292691470
@ -209,6 +209,7 @@ class DocType(TransactionBase):
|
||||
if ret['warehouse']:
|
||||
actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse']))
|
||||
ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0
|
||||
msgprint(ret)
|
||||
return ret
|
||||
|
||||
def get_barcode_details(self, barcode):
|
||||
|
@ -8,15 +8,15 @@ def repost_reserved_qty():
|
||||
|
||||
from `tabDelivery Note Packing Item` dnpi, `tabSales Order Item` so_item, `tabSales Order` so
|
||||
|
||||
where dnpi.parent = so.name
|
||||
where dnpi.item_code = %s
|
||||
and dnpi.warehouse = %s
|
||||
and dnpi.parent = so.name
|
||||
and so_item.parent = so.name
|
||||
and dnpi.parenttype = 'Sales Order'
|
||||
and dnpi.parent_detail_docname = so_item.name
|
||||
and dnpi.parent_item = so_item.item_code
|
||||
and so.docstatus = 1
|
||||
and so.status != 'Stopped'
|
||||
and dnpi.item_code = %s
|
||||
and dnpi.warehouse = %s
|
||||
""", (d[0], d[1]))
|
||||
if flt(d[3]) != flt(reserved_qty[0][0]):
|
||||
print d[3], reserved_qty[0][0]
|
||||
|
Loading…
Reference in New Issue
Block a user