asynchronus issue in get_party_details
diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js
index 157de29..a45b602 100644
--- a/erpnext/public/js/feature_setup.js
+++ b/erpnext/public/js/feature_setup.js
@@ -121,12 +121,12 @@
'Sales BOM': {'fields':['currency']},
'Sales Order': {'fields':['conversion_rate','currency','grand_total','in_words','rounded_total'],'sales_order_details':['base_price_list_rate','base_amount','base_rate']}
},
-
+
'fs_imports': {
'Purchase Invoice': {
'fields': ['conversion_rate', 'currency', 'grand_total',
'in_words', 'net_total', 'other_charges_added',
- 'other_charges_deducted'],
+ 'other_charges_deducted'],
'entries': ['base_price_list_rate', 'base_amount','base_rate']
},
'Purchase Order': {
@@ -144,7 +144,7 @@
'fields':['conversion_rate','currency']
}
},
-
+
'fs_item_advanced': {
'Item': {'fields':['item_customer_details']}
},
@@ -188,7 +188,7 @@
$(document).bind('form_refresh', function() {
for(var sys_feat in sys_defaults) {
- if(sys_defaults[sys_feat]=='0'
+ if(sys_defaults[sys_feat]=='0'
&& (sys_feat in pscript.feature_dict)) { //"Features to hide" exists
if(cur_frm.doc.doctype in pscript.feature_dict[sys_feat]) {
@@ -196,7 +196,7 @@
if(fort=='fields') {
hide_field(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort]);
} else if(cur_frm.fields_dict[fort]) {
- cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
+ cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
} else {
msgprint(__('Grid "')+fort+__('" does not exists'));
}
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index 65d91c2..1ee06f7 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -702,15 +702,20 @@
var me = this;
if(this.frm.doc.taxes_and_charges) {
return this.frm.call({
- doc: this.frm.doc,
- method: "set_other_charges",
+ method: "erpnext.controllers.accounts_controller.get_taxes_and_charges",
+ args: {
+ "master_doctype": "Sales Taxes and Charges Master",
+ "master_name": this.frm.doc.taxes_and_charges,
+ "tax_parentfield": this.other_fname
+ },
callback: function(r) {
if(!r.exc) {
+ me.frm.set_value(me.other_fname, r.message);
me.calculate_taxes_and_totals();
}
}
});
- }
+ });
},
show_item_wise_taxes: function() {