fix: Multi-currency issues in Bank Reconciliation Tool (#33488)
fix: Multi-currency issues in Bank Recociliation Tool
(cherry picked from commit ad53ecf2b4)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -298,7 +298,7 @@ def reconcile_vouchers(bank_transaction_name, vouchers):
|
|||||||
dict(
|
dict(
|
||||||
account=account, voucher_type=voucher["payment_doctype"], voucher_no=voucher["payment_name"]
|
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,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
gl_amount, transaction_amount = (
|
gl_amount, transaction_amount = (
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ def get_paid_amount(payment_entry, currency, bank_account):
|
|||||||
)
|
)
|
||||||
elif doc.payment_type == "Pay":
|
elif doc.payment_type == "Pay":
|
||||||
paid_amount_field = (
|
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(
|
return frappe.db.get_value(
|
||||||
|
|||||||
@@ -355,12 +355,14 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
|||||||
fieldname: "deposit",
|
fieldname: "deposit",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Deposit",
|
label: "Deposit",
|
||||||
|
options: "currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldname: "withdrawal",
|
fieldname: "withdrawal",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Withdrawal",
|
label: "Withdrawal",
|
||||||
|
options: "currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -378,6 +380,7 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
|||||||
fieldname: "allocated_amount",
|
fieldname: "allocated_amount",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Allocated Amount",
|
label: "Allocated Amount",
|
||||||
|
options: "Currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -385,8 +388,17 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
|||||||
fieldname: "unallocated_amount",
|
fieldname: "unallocated_amount",
|
||||||
fieldtype: "Currency",
|
fieldtype: "Currency",
|
||||||
label: "Unallocated Amount",
|
label: "Unallocated Amount",
|
||||||
|
options: "Currency",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fieldname: "currency",
|
||||||
|
fieldtype: "Link",
|
||||||
|
label: "Currency",
|
||||||
|
options: "Currency",
|
||||||
|
read_only: 1,
|
||||||
|
hidden: 1,
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user