Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sales return for multi-uom #45303

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions erpnext/controllers/sales_and_purchase_return.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
if not qty_field:
qty_field = "qty"
qty_field = "stock_qty"

if not warehouse_field:
warehouse_field = "warehouse"
Expand Down Expand Up @@ -1109,7 +1109,7 @@ def make_serial_batch_bundle_for_return(data, child_doc, parent_doc, warehouse_f
warehouse_field = "warehouse"

if not qty_field:
qty_field = "qty"
qty_field = "stock_qty"

warehouse = child_doc.get(warehouse_field)
if parent_doc.get("is_internal_customer"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def get_valuation_rate_for_return_entry(self, return_against):
for row in bundle_data:
if row.serial_no:
valuation_details["serial_nos"][row.serial_no] = row.incoming_rate
else:
if row.batch_no:
valuation_details["batches"][row.batch_no] = row.incoming_rate

return valuation_details
Expand Down
Loading