feat: add generate txt file button for india region
This commit is contained in:
parent
0faf9f5f8c
commit
48d88b0478
22
erpnext/accounts/doctype/payment_order/regional/india.js
Normal file
22
erpnext/accounts/doctype/payment_order/regional/india.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
frappe.ui.form.on('Payment Order', {
|
||||||
|
refresh: function(frm) {
|
||||||
|
if (frm.doc.docstatus==1) {
|
||||||
|
frm.add_custom_button(__('Generate Text File'),
|
||||||
|
function() {
|
||||||
|
frm.trigger("generate_text_and_download_file");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
generate_text_and_download_file: (frm) => {
|
||||||
|
return frappe.call({
|
||||||
|
method: "erpnext.regional.india.bank_remittance_txt.generate_report_and_get_url",
|
||||||
|
args: {
|
||||||
|
name: this.frm.name,
|
||||||
|
},
|
||||||
|
freeze: true,
|
||||||
|
callback: function(r) {
|
||||||
|
frm.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user