mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
[regional] ability to send gst reminders to all parties
This commit is contained in:
25
erpnext/regional/india/party.js
Normal file
25
erpnext/regional/india/party.js
Normal file
@@ -0,0 +1,25 @@
|
||||
erpnext.setup_gst_reminder_button = (doctype) => {
|
||||
frappe.ui.form.on(doctype, {
|
||||
refresh: (frm) => {
|
||||
if(!frm.is_new()) {
|
||||
var missing = false;
|
||||
frm.doc.__onload.addr_list && frm.doc.__onload.addr_list.forEach((d) => {
|
||||
if(!d.gstin) missing = true;
|
||||
});
|
||||
if (!missing) return;
|
||||
|
||||
frm.add_custom_button('Send GST Update Reminder', () => {
|
||||
return new Promise((resolve) => {
|
||||
return frappe.call({
|
||||
method: 'erpnext.regional.doctype.gst_settings.gst_settings.send_gstin_reminder',
|
||||
args: {
|
||||
party_type: frm.doc.doctype,
|
||||
party: frm.doc.name,
|
||||
}
|
||||
}).always(() => { resolve(); });
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
@@ -64,7 +64,7 @@ def add_custom_roles_for_reports():
|
||||
)).insert()
|
||||
|
||||
def add_permissions():
|
||||
for doctype in ('GST HSN Code',):
|
||||
for doctype in ('GST HSN Code', 'GST Settings'):
|
||||
add_permission(doctype, 'Accounts Manager', 0)
|
||||
add_permission(doctype, 'All', 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user