mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
stock repost patch
This commit is contained in:
@@ -209,6 +209,7 @@ class DocType(TransactionBase):
|
|||||||
if ret['warehouse']:
|
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']))
|
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
|
ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0
|
||||||
|
msgprint(ret)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def get_barcode_details(self, barcode):
|
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
|
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 so_item.parent = so.name
|
||||||
and dnpi.parenttype = 'Sales Order'
|
and dnpi.parenttype = 'Sales Order'
|
||||||
and dnpi.parent_detail_docname = so_item.name
|
and dnpi.parent_detail_docname = so_item.name
|
||||||
and dnpi.parent_item = so_item.item_code
|
and dnpi.parent_item = so_item.item_code
|
||||||
and so.docstatus = 1
|
and so.docstatus = 1
|
||||||
and so.status != 'Stopped'
|
and so.status != 'Stopped'
|
||||||
and dnpi.item_code = %s
|
|
||||||
and dnpi.warehouse = %s
|
|
||||||
""", (d[0], d[1]))
|
""", (d[0], d[1]))
|
||||||
if flt(d[3]) != flt(reserved_qty[0][0]):
|
if flt(d[3]) != flt(reserved_qty[0][0]):
|
||||||
print d[3], reserved_qty[0][0]
|
print d[3], reserved_qty[0][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user