fix: Get payment entry button not visible in Bank Clearance doc (backport #33518) (#33525)

fix: Get payment entry button not visible in Bank Clearance doc (#33518)

(cherry picked from commit 1a83a67d41)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-01-03 22:09:50 +05:30
committed by GitHub
parent 011fc3a27c
commit fcf052d3c4

View File

@@ -37,14 +37,11 @@ frappe.ui.form.on("Bank Clearance", {
refresh: function(frm) {
frm.disable_save();
frm.add_custom_button(__('Get Payment Entries'), () =>
frm.trigger("get_payment_entries")
);
if (frm.doc.account && frm.doc.from_date && frm.doc.to_date) {
frm.add_custom_button(__('Get Payment Entries'), () =>
frm.trigger("get_payment_entries")
);
frm.change_custom_button_type('Get Payment Entries', null, 'primary');
}
frm.change_custom_button_type('Get Payment Entries', null, 'primary');
},
update_clearance_date: function(frm) {