fixes in customerwise price list

This commit is contained in:
Nabin Hait 2012-05-02 12:19:33 +05:30
parent c55d83b36e
commit ab96d12086
3 changed files with 3 additions and 4 deletions

View File

@ -173,7 +173,6 @@ cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
//Customer
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
var callback = function(r,rt) {
var callback2 = function(doc, dt, dn) {
doc = locals[dt][dn];
@ -181,7 +180,7 @@ cur_frm.cscript.customer = function(doc,dt,dn,onload) {
get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,
function(doc, dt, dn) {
cur_frm.refresh();
cur_frm.cscript.price_list_name(doc, dt, dn);
if (!onload) cur_frm.cscript.price_list_name(doc, dt, dn);
});
}

View File

@ -102,7 +102,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) {
var callback2 = function(r, rt) {
if(doc.customer) unhide_field(['customer_address', 'contact_person', 'territory','customer_group','shipping_address']);
cur_frm.refresh();
cur_frm.cscript.price_list_name(doc, dt, dn);
if(!onload) cur_frm.cscript.price_list_name(doc, dt, dn);
}
var doc = locals[cur_frm.doctype][cur_frm.docname];

View File

@ -83,7 +83,7 @@ cur_frm.cscript.customer = function(doc,dt,dn,onload) {
var doc = locals[cur_frm.doctype][cur_frm.docname];
if(doc.customer) unhide_field(['customer_address','contact_person','territory','customer_group']);
cur_frm.refresh();
cur_frm.cscript.price_list_name(doc, dt, dn);
if(!onload) cur_frm.cscript.price_list_name(doc, dt, dn);
}
var args = onload ? 'onload':''
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_shipping_address', args, callback);