refactor: display allocated amount in account currency with symbol
diff --git a/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.json b/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.json
index 955c3bb..42da669 100644
--- a/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.json
+++ b/erpnext/accounts/doctype/unreconcile_payment_entries/unreconcile_payment_entries.json
@@ -12,6 +12,7 @@
"reference_doctype",
"reference_name",
"allocated_amount",
+ "account_currency",
"unlinked"
],
"fields": [
@@ -24,9 +25,10 @@
},
{
"fieldname": "allocated_amount",
- "fieldtype": "Int",
+ "fieldtype": "Currency",
"in_list_view": 1,
- "label": "Allocated Amount"
+ "label": "Allocated Amount",
+ "options": "account_currency"
},
{
"default": "0",
@@ -57,12 +59,19 @@
"fieldname": "party",
"fieldtype": "Data",
"label": "Party"
+ },
+ {
+ "fieldname": "account_currency",
+ "fieldtype": "Link",
+ "label": "Account Currency",
+ "options": "Currency",
+ "read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2023-08-30 10:58:45.322668",
+ "modified": "2023-09-05 09:33:28.620149",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Unreconcile Payment Entries",
diff --git a/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py b/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
index 5161a92..25f85db 100644
--- a/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
+++ b/erpnext/accounts/doctype/unreconcile_payments/unreconcile_payments.py
@@ -30,6 +30,7 @@
ple.against_voucher_type.as_("reference_doctype"),
ple.against_voucher_no.as_("reference_name"),
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
+ ple.account_currency,
)
.where(
(ple.docstatus == 1)
@@ -99,6 +100,7 @@
ple.voucher_type,
ple.voucher_no,
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
+ ple.account_currency,
)
.where(Criterion.all(criteria))
.groupby(ple.voucher_no, ple.against_voucher_no)
diff --git a/erpnext/public/js/utils/unreconcile.js b/erpnext/public/js/utils/unreconcile.js
index df07643..cd44f35 100644
--- a/erpnext/public/js/utils/unreconcile.js
+++ b/erpnext/public/js/utils/unreconcile.js
@@ -53,7 +53,8 @@
let child_table_fields = [
{ label: __("Voucher Type"), fieldname: "voucher_type", fieldtype: "Dynamic Link", options: "DocType", in_list_view: 1, read_only: 1},
{ label: __("Voucher No"), fieldname: "voucher_no", fieldtype: "Link", options: "voucher_type", in_list_view: 1, read_only: 1 },
- { label: __("Allocated Amount"), fieldname: "allocated_amount", fieldtype: "Float", in_list_view: 1, read_only: 1 },
+ { label: __("Allocated Amount"), fieldname: "allocated_amount", fieldtype: "Currency", in_list_view: 1, read_only: 1 , options: "account_currency"},
+ { label: __("Currency"), fieldname: "account_currency", fieldtype: "Currency", read_only: 1},
]
let unreconcile_dialog_fields = [
{
@@ -83,7 +84,7 @@
title: 'Un-Reconcile Allocations',
fields: unreconcile_dialog_fields,
size: 'large',
- cannot_add_rows: 1,
+ cannot_add_rows: true,
primary_action_label: 'Un-Reconcile',
primary_action(values) {