mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 06:45:11 +00:00
fix: sales return for multi-uom (#45303)
(cherry picked from commit 9163f60191)
This commit is contained in:
@@ -1020,7 +1020,7 @@ def get_serial_and_batch_bundle(field, doctype, reference_ids, is_rejected=False
|
|||||||
|
|
||||||
def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field=None):
|
def filter_serial_batches(parent_doc, data, row, warehouse_field=None, qty_field=None):
|
||||||
if not qty_field:
|
if not qty_field:
|
||||||
qty_field = "qty"
|
qty_field = "stock_qty"
|
||||||
|
|
||||||
if not warehouse_field:
|
if not warehouse_field:
|
||||||
warehouse_field = "warehouse"
|
warehouse_field = "warehouse"
|
||||||
@@ -1109,7 +1109,7 @@ def make_serial_batch_bundle_for_return(data, child_doc, parent_doc, warehouse_f
|
|||||||
warehouse_field = "warehouse"
|
warehouse_field = "warehouse"
|
||||||
|
|
||||||
if not qty_field:
|
if not qty_field:
|
||||||
qty_field = "qty"
|
qty_field = "stock_qty"
|
||||||
|
|
||||||
warehouse = child_doc.get(warehouse_field)
|
warehouse = child_doc.get(warehouse_field)
|
||||||
if parent_doc.get("is_internal_customer"):
|
if parent_doc.get("is_internal_customer"):
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ class SerialandBatchBundle(Document):
|
|||||||
for row in bundle_data:
|
for row in bundle_data:
|
||||||
if row.serial_no:
|
if row.serial_no:
|
||||||
valuation_details["serial_nos"][row.serial_no] = row.incoming_rate
|
valuation_details["serial_nos"][row.serial_no] = row.incoming_rate
|
||||||
else:
|
if row.batch_no:
|
||||||
valuation_details["batches"][row.batch_no] = row.incoming_rate
|
valuation_details["batches"][row.batch_no] = row.incoming_rate
|
||||||
|
|
||||||
return valuation_details
|
return valuation_details
|
||||||
|
|||||||
Reference in New Issue
Block a user