Merge pull request #17159 from rohitwaghchaure/sales_return_not_working_for_bundle_items
fix: sales return not working for product bundle items
This commit is contained in:
commit
0f62b13dd8
@ -244,6 +244,10 @@ def make_return_doc(doctype, source_name, target_doc=None):
|
||||
doc.paid_amount = -1 * source.paid_amount
|
||||
doc.base_paid_amount = -1 * source.base_paid_amount
|
||||
|
||||
if doc.get("is_return") and hasattr(doc, "packed_items"):
|
||||
for d in doc.get("packed_items"):
|
||||
d.qty = d.qty * -1
|
||||
|
||||
doc.discount_amount = -1 * source.discount_amount
|
||||
doc.run_method("calculate_taxes_and_totals")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user