Merge pull request #29979 from deepeshgarg007/bank_reco_multicurrency_fix
fix: Multi-currency bank reconciliation fixes
This commit is contained in:
commit
835c029e53
@ -232,7 +232,7 @@ def reconcile_vouchers(bank_transaction_name, vouchers):
|
||||
}), transaction.currency, company_account)
|
||||
|
||||
if total_amount > transaction.unallocated_amount:
|
||||
frappe.throw(_("The Sum Total of Amounts of All Selected Vouchers Should be Less than the Unallocated Amount of the Bank Transaction"))
|
||||
frappe.throw(_("The sum total of amounts of all selected vouchers should be less than the unallocated amount of the bank transaction"))
|
||||
account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
|
||||
|
||||
for voucher in vouchers:
|
||||
|
@ -110,8 +110,13 @@ def get_paid_amount(payment_entry, currency, bank_account):
|
||||
paid_amount_field = "paid_amount"
|
||||
if payment_entry.payment_document == 'Payment Entry':
|
||||
doc = frappe.get_doc("Payment Entry", payment_entry.payment_entry)
|
||||
paid_amount_field = ("base_paid_amount"
|
||||
if doc.paid_to_account_currency == currency else "paid_amount")
|
||||
|
||||
if doc.payment_type == 'Receive':
|
||||
paid_amount_field = ("received_amount"
|
||||
if doc.paid_to_account_currency == currency else "base_received_amount")
|
||||
elif doc.payment_type == 'Pay':
|
||||
paid_amount_field = ("paid_amount"
|
||||
if doc.paid_to_account_currency == currency else "base_paid_amount")
|
||||
|
||||
return frappe.db.get_value(payment_entry.payment_document,
|
||||
payment_entry.payment_entry, paid_amount_field)
|
||||
|
Loading…
Reference in New Issue
Block a user