fix: resolve conflicts

This commit is contained in:
vishakhdesai
2024-12-30 12:27:14 +05:30
parent 498abf7c83
commit 443a0b81f9
2 changed files with 2 additions and 15 deletions

View File

@@ -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)

View File

@@ -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(