refactor: display allocated amount in account currency with symbol
This commit is contained in:
parent
9a1588f1cc
commit
6fd1c1bca2
@ -12,6 +12,7 @@
|
|||||||
"reference_doctype",
|
"reference_doctype",
|
||||||
"reference_name",
|
"reference_name",
|
||||||
"allocated_amount",
|
"allocated_amount",
|
||||||
|
"account_currency",
|
||||||
"unlinked"
|
"unlinked"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -24,9 +25,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "allocated_amount",
|
"fieldname": "allocated_amount",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Allocated Amount"
|
"label": "Allocated Amount",
|
||||||
|
"options": "account_currency"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@ -57,12 +59,19 @@
|
|||||||
"fieldname": "party",
|
"fieldname": "party",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Party"
|
"label": "Party"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "account_currency",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Account Currency",
|
||||||
|
"options": "Currency",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-08-30 10:58:45.322668",
|
"modified": "2023-09-05 09:33:28.620149",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Unreconcile Payment Entries",
|
"name": "Unreconcile Payment Entries",
|
||||||
|
@ -30,6 +30,7 @@ class UnreconcilePayments(Document):
|
|||||||
ple.against_voucher_type.as_("reference_doctype"),
|
ple.against_voucher_type.as_("reference_doctype"),
|
||||||
ple.against_voucher_no.as_("reference_name"),
|
ple.against_voucher_no.as_("reference_name"),
|
||||||
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
|
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
|
||||||
|
ple.account_currency,
|
||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
(ple.docstatus == 1)
|
(ple.docstatus == 1)
|
||||||
@ -99,6 +100,7 @@ def get_linked_payments_for_doc(
|
|||||||
ple.voucher_type,
|
ple.voucher_type,
|
||||||
ple.voucher_no,
|
ple.voucher_no,
|
||||||
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
|
Abs(Sum(ple.amount_in_account_currency)).as_("allocated_amount"),
|
||||||
|
ple.account_currency,
|
||||||
)
|
)
|
||||||
.where(Criterion.all(criteria))
|
.where(Criterion.all(criteria))
|
||||||
.groupby(ple.voucher_no, ple.against_voucher_no)
|
.groupby(ple.voucher_no, ple.against_voucher_no)
|
||||||
|
@ -53,7 +53,8 @@ erpnext.accounts.unreconcile_payments = {
|
|||||||
let child_table_fields = [
|
let child_table_fields = [
|
||||||
{ label: __("Voucher Type"), fieldname: "voucher_type", fieldtype: "Dynamic Link", options: "DocType", in_list_view: 1, read_only: 1},
|
{ 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: __("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 = [
|
let unreconcile_dialog_fields = [
|
||||||
{
|
{
|
||||||
@ -83,7 +84,7 @@ erpnext.accounts.unreconcile_payments = {
|
|||||||
title: 'Un-Reconcile Allocations',
|
title: 'Un-Reconcile Allocations',
|
||||||
fields: unreconcile_dialog_fields,
|
fields: unreconcile_dialog_fields,
|
||||||
size: 'large',
|
size: 'large',
|
||||||
cannot_add_rows: 1,
|
cannot_add_rows: true,
|
||||||
primary_action_label: 'Un-Reconcile',
|
primary_action_label: 'Un-Reconcile',
|
||||||
primary_action(values) {
|
primary_action(values) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user