Skip to content

Commit

Permalink
Merge pull request frappe#33488 from deepeshgarg007/multi_currency_ba…
Browse files Browse the repository at this point in the history
…nk_reco

fix: Multi-currency issues in Bank Reconciliation Tool
  • Loading branch information
deepeshgarg007 authored Dec 31, 2022
2 parents 48a9cd5 + ad53ecf commit bb4725e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def reconcile_vouchers(bank_transaction_name, vouchers):
dict(
account=account, voucher_type=voucher["payment_doctype"], voucher_no=voucher["payment_name"]
),
["credit", "debit"],
["credit_in_account_currency as credit", "debit_in_account_currency as debit"],
as_dict=1,
)
gl_amount, transaction_amount = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_paid_amount(payment_entry, currency, bank_account):
)
elif doc.payment_type == "Pay":
paid_amount_field = (
"paid_amount" if doc.paid_to_account_currency == currency else "base_paid_amount"
"paid_amount" if doc.paid_from_account_currency == currency else "base_paid_amount"
)

return frappe.db.get_value(
Expand Down
12 changes: 12 additions & 0 deletions erpnext/public/js/bank_reconciliation_tool/dialog_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,14 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
fieldname: "deposit",
fieldtype: "Currency",
label: "Deposit",
options: "currency",
read_only: 1,
},
{
fieldname: "withdrawal",
fieldtype: "Currency",
label: "Withdrawal",
options: "currency",
read_only: 1,
},
{
Expand All @@ -378,15 +380,25 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
fieldname: "allocated_amount",
fieldtype: "Currency",
label: "Allocated Amount",
options: "Currency",
read_only: 1,
},

{
fieldname: "unallocated_amount",
fieldtype: "Currency",
label: "Unallocated Amount",
options: "Currency",
read_only: 1,
},
{
fieldname: "currency",
fieldtype: "Link",
label: "Currency",
options: "Currency",
read_only: 1,
hidden: 1,
}
];
}

Expand Down

0 comments on commit bb4725e

Please sign in to comment.