[fixes] pull previous doc details

This commit is contained in:
Nabin Hait 2013-06-24 12:24:01 +05:30
parent 48ba0a26ba
commit a292b44df3
5 changed files with 5 additions and 5 deletions

View File

@ -166,7 +166,7 @@ cur_frm.cscript.recalculate = function(doc, cdt, cdn) {
cur_frm.cscript.get_items = function(doc, dt, dn) { cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) { var callback = function(r,rt) {
unhide_field(['supplier_address', 'contact_person']); unhide_field(['supplier_address', 'contact_person']);
cur_frm.refresh(); cur_frm.refresh_fields();
} }
$c_obj(make_doclist(dt,dn),'pull_details','',callback); $c_obj(make_doclist(dt,dn),'pull_details','',callback);
} }

View File

@ -276,7 +276,7 @@ cur_frm.cscript.is_opening = function(doc, dt, dn) {
cur_frm.cscript.get_items = function(doc, dt, dn) { cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) { var callback = function(r,rt) {
unhide_field(['customer_address','contact_person', 'territory','customer_group']); unhide_field(['customer_address','contact_person', 'territory','customer_group']);
cur_frm.refresh(); cur_frm.refresh_fields();
} }
get_server_fields('pull_details','','',doc, dt, dn,1,callback); get_server_fields('pull_details','','',doc, dt, dn,1,callback);
} }

View File

@ -140,7 +140,7 @@ cur_frm.cscript.pull_quotation_details = function(doc,dt,dn) {
'contact_person', 'territory', 'customer_group']); 'contact_person', 'territory', 'customer_group']);
if(doc.customer) get_server_fields('get_shipping_address', doc.customer, '', doc, dt, dn, 0); if(doc.customer) get_server_fields('get_shipping_address', doc.customer, '', doc, dt, dn, 0);
} }
cur_frm.refresh(); cur_frm.refresh_fields();
} }
} }

View File

@ -112,7 +112,7 @@ cur_frm.cscript.get_items = function(doc,dt,dn) {
if(doc.sales_order_no) { if(doc.sales_order_no) {
unhide_field(['customer_address','contact_person','territory','customer_group']); unhide_field(['customer_address','contact_person','territory','customer_group']);
} }
cur_frm.refresh(); cur_frm.refresh_fields();
} }
} }
$c_obj(make_doclist(doc.doctype, doc.name),'pull_sales_order_details','',callback); $c_obj(make_doclist(doc.doctype, doc.name),'pull_sales_order_details','',callback);

View File

@ -103,7 +103,7 @@ cur_frm.fields_dict.contact_person.on_new = function(dn) {
// ----------------- // -----------------
cur_frm.cscript.pull_purchase_order_details = function(doc, dt, dn) { cur_frm.cscript.pull_purchase_order_details = function(doc, dt, dn) {
$c_obj(make_doclist(dt,dn),'get_po_details','', function(r,rt) { $c_obj(make_doclist(dt,dn),'get_po_details','', function(r,rt) {
cur_frm.refresh(); cur_frm.refresh_fields();
}); });
} }