Skip to content

Commit

Permalink
fix(India): Async issue in company address trigger
Browse files Browse the repository at this point in the history
(cherry picked from commit c41f9f0)
  • Loading branch information
deepeshgarg007 authored and mergify[bot] committed May 25, 2022
1 parent 22aeacb commit 2ea3318
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/regional/india/taxes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
erpnext.setup_auto_gst_taxation = (doctype) => {
frappe.ui.form.on(doctype, {
company_address: function(frm) {
console.log("#########");
frm.trigger('get_tax_template');
},
shipping_address: function(frm) {
Expand All @@ -22,6 +23,7 @@ erpnext.setup_auto_gst_taxation = (doctype) => {
'shipping_address': frm.doc.shipping_address || '',
'shipping_address_name': frm.doc.shipping_address_name || '',
'customer_address': frm.doc.customer_address || '',
'company_address': frm.doc.company_address,
'supplier_address': frm.doc.supplier_address,
'customer': frm.doc.customer,
'supplier': frm.doc.supplier,
Expand All @@ -39,6 +41,7 @@ erpnext.setup_auto_gst_taxation = (doctype) => {
},
debounce: 2000,
callback: function(r) {
console.log(r.message);
if(r.message) {
frm.set_value('taxes_and_charges', r.message.taxes_and_charges);
frm.set_value('taxes', r.message.taxes);
Expand Down

0 comments on commit 2ea3318

Please sign in to comment.