diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 3a684d4bba45..b587ce603f42 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -389,7 +389,7 @@ def split_invoices(invoices): continue return_against_is_added = any( - d for d in invoices if d.pos_invoice == pos_invoice.return_against + d for d in _invoices if d.pos_invoice == pos_invoice.return_against ) if return_against_is_added: break