From 443a0b81f9abad0bc7425bfe647d3feb14541a77 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Mon, 30 Dec 2024 12:27:14 +0530 Subject: [PATCH] fix: resolve conflicts --- .../bank_reconciliation_tool.py | 13 ++----------- .../doctype/bank_transaction/bank_transaction.py | 4 ---- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 55ea4414f30..316fc8564c1 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -456,25 +456,16 @@ def subtract_allocations(gl_account, vouchers): "Look up & subtract any existing Bank Transaction allocations" copied = [] - voucher_docs = [(voucher.get("doctype"), voucher.get("name")) for voucher in vouchers] + voucher_docs = [(voucher[1], voucher[2]) for voucher in vouchers] voucher_allocated_amounts = get_total_allocated_amount(voucher_docs) for voucher in vouchers: -<<<<<<< HEAD -<<<<<<< HEAD - rows = get_total_allocated_amount(voucher[1], voucher[2]) + rows = voucher_allocated_amounts.get((voucher[1], voucher[2])) or [] amount = None for row in rows: if row["gl_account"] == gl_account: amount = row["total"] break -======= - rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) -======= - rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or [] ->>>>>>> 2ce07865d3 (fix: failing tests fixed) - filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows)) ->>>>>>> 6b847cdb62 (fix: refactor query in get_total_allocated_amount in bank_transaction) if amount: l = list(voucher) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index b67478a7f3d..6c1beb16d5d 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -93,13 +93,9 @@ class BankTransaction(StatusUpdater): - clear means: set the latest transaction date as clearance date """ remaining_amount = self.unallocated_amount -<<<<<<< HEAD -======= - to_remove = [] payment_entry_docs = [(pe.payment_document, pe.payment_entry) for pe in self.payment_entries] pe_bt_allocations = get_total_allocated_amount(payment_entry_docs) ->>>>>>> 6b847cdb62 (fix: refactor query in get_total_allocated_amount in bank_transaction) for payment_entry in self.payment_entries: if payment_entry.allocated_amount == 0.0: unallocated_amount, should_clear, latest_transaction = get_clearance_details(