fix: stock reconciliation shwoing incorrect current serial no and qty

This commit is contained in:
Rohit Waghchaure
2019-11-14 18:22:20 +05:30
parent ffbfaf7099
commit cf55c9c6da
2 changed files with 6 additions and 4 deletions

View File

@@ -293,9 +293,11 @@ def update_included_uom_in_report(columns, result, include_uom, conversion_facto
row, key, value = data
row[key] = value
def get_available_serial_nos(item_code, warehouse):
return frappe.get_all("Serial No", filters = {'item_code': item_code,
'warehouse': warehouse, 'delivery_document_no': ''}) or []
def get_available_serial_nos(args):
return frappe.db.sql(""" SELECT name from `tabSerial No`
WHERE item_code = %(item_code)s and warehouse = %(warehouse)s
and timestamp(purchase_date, purchase_time) <= timestamp(%(posting_date)s, %(posting_time)s)
""", args, as_dict=1)
def add_additional_uom_columns(columns, result, include_uom, conversion_factors):
if not include_uom or not conversion_factors: