fix(pos): do not reset mode of payments in case of consolidation
diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py
index a1bb667..a19699c 100644
--- a/erpnext/controllers/taxes_and_totals.py
+++ b/erpnext/controllers/taxes_and_totals.py
@@ -633,7 +633,12 @@
self.doc.outstanding_amount = flt(total_amount_to_pay - flt(paid_amount) + flt(change_amount),
self.doc.precision("outstanding_amount"))
- if self.doc.doctype == 'Sales Invoice' and self.doc.get('is_pos') and self.doc.get('is_return'):
+ if (
+ self.doc.doctype == 'Sales Invoice'
+ and self.doc.get('is_pos')
+ and self.doc.get('is_return')
+ and not self.doc.get('is_consolidated')
+ ):
self.set_total_amount_to_default_mop(total_amount_to_pay)
self.calculate_paid_amount()