diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js index 92f17487bc..49292c2712 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -166,7 +166,7 @@ cur_frm.cscript.recalculate = function(doc, cdt, cdn) { cur_frm.cscript.get_items = function(doc, dt, dn) { var callback = function(r,rt) { unhide_field(['supplier_address', 'contact_person']); - refresh_many(['credit_to','supplier','supplier_address','contact_person','supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email','entries', 'purchase_receipt_main', 'purchase_order_main', 'purchase_tax_details']); + cur_frm.refresh(); } $c_obj(make_doclist(dt,dn),'pull_details','',callback); } diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js index 8d09cbd676..01556bac04 100644 --- a/stock/doctype/delivery_note/delivery_note.js +++ b/stock/doctype/delivery_note/delivery_note.js @@ -112,10 +112,7 @@ cur_frm.cscript.get_items = function(doc,dt,dn) { if(doc.sales_order_no) { unhide_field(['customer_address','contact_person','territory','customer_group']); } - - refresh_many(['delivery_note_details', 'customer', 'customer_address', - 'contact_person', 'customer_name', 'address_display', 'contact_display', - 'contact_mobile', 'contact_email', 'territory', 'customer_group']); + cur_frm.refresh(); } } $c_obj(make_doclist(doc.doctype, doc.name),'pull_sales_order_details','',callback); diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js index 82e494cfb7..84f2aab0b9 100644 --- a/stock/doctype/purchase_receipt/purchase_receipt.js +++ b/stock/doctype/purchase_receipt/purchase_receipt.js @@ -102,11 +102,9 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) { // Get Purchase Order Button // ----------------- cur_frm.cscript.pull_purchase_order_details = function(doc, dt, dn) { - var callback = function(r,rt) { - //unhide_field(['supplier_address','contact_person','supplier_name','address_display', 'contact_display', 'contact_mobile','contact_email']); - refresh_many(['supplier','supplier_address','contact_person', 'supplier_name', 'address_display', 'contact_display','contact_mobile', 'contact_email', 'purchase_receipt_details', 'purchase_tax_details']); - } - $c_obj(make_doclist(dt,dn),'get_po_details','',callback); + $c_obj(make_doclist(dt,dn),'get_po_details','', function(r,rt) { + cur_frm.refresh(); + }); }