refactor: introduce fields in popup

This commit is contained in:
ruthra kumar 2023-10-22 08:59:52 +05:30
parent 55dbcee36a
commit 5323bb7bee

View File

@ -229,6 +229,7 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
this.data = []; this.data = [];
const dialog = new frappe.ui.Dialog({ const dialog = new frappe.ui.Dialog({
title: __("Select Difference Account"), title: __("Select Difference Account"),
size: 'extra-large',
fields: [ fields: [
{ {
fieldname: "allocation", fieldname: "allocation",
@ -252,6 +253,13 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
in_list_view: 1, in_list_view: 1,
read_only: 1 read_only: 1
}, { }, {
fieldtype:'Date',
fieldname:"gain_loss_posting_date",
label: __("Posting Date"),
in_list_view: 1,
reqd: 1,
}, {
fieldtype:'Link', fieldtype:'Link',
options: 'Account', options: 'Account',
in_list_view: 1, in_list_view: 1,
@ -285,6 +293,7 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
args.forEach(d => { args.forEach(d => {
frappe.model.set_value("Payment Reconciliation Allocation", d.docname, frappe.model.set_value("Payment Reconciliation Allocation", d.docname,
"difference_account", d.difference_account); "difference_account", d.difference_account);
}); });
this.reconcile_payment_entries(); this.reconcile_payment_entries();
@ -300,6 +309,7 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo
'reference_name': d.reference_name, 'reference_name': d.reference_name,
'difference_amount': d.difference_amount, 'difference_amount': d.difference_amount,
'difference_account': d.difference_account, 'difference_account': d.difference_account,
'gain_loss_posting_date': d.gain_loss_posting_date
}); });
} }
}); });