Skip to content

Commit

Permalink
Merge pull request #65 from navariltd/dev1
Browse files Browse the repository at this point in the history
Allow saving of customer and supplier without verification before Initial setup of EBMS
  • Loading branch information
maniamartial authored Sep 24, 2024
2 parents af04740 + 9a9a2a5 commit 378a2df
Show file tree
Hide file tree
Showing 11 changed files with 323 additions and 669 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,52 @@ function showInvoiceDetailsDialog(result, doctype) {
dialog.show();
}


function set_gst_category_query(frm) {
if (frm.doc.customer_type||frm.doc.supplier_type === 'Company') {
frm.set_query('custom_gst_category', function() {
return {
filters: {
'name': ['!=', 'Unregistered']
}
};
});
} else {
frm.set_query('custom_gst_category', function() {
return {
filters: {
'name': ['!=', 'UN']
}
};
});
}
}

frappe.ui.form.on('Customer', {
refresh: function(frm){
get_tin(frm)
}})
refresh: function(frm) {
get_tin(frm);
set_gst_category_query(frm);
},
customer_type: function(frm) {
set_gst_category_query(frm);
}
});

frappe.ui.form.on('Supplier', {

refresh: function(frm){
get_tin(frm)
}})
set_gst_category_query(frm);
},
supplier_type: function(frm) {
set_gst_category_query(frm);
}

})

frappe.ui.form.on('Company', {

refresh: function(frm){
get_tin(frm)
}})
}})

Loading

0 comments on commit 378a2df

Please sign in to comment.