fixes for purchase price list

This commit is contained in:
Nabin Hait 2013-03-04 15:35:45 +05:30
parent ba0e1ea194
commit 0d20d6fdd2
4 changed files with 23 additions and 12 deletions

View File

@ -44,9 +44,12 @@ erpnext.buying.PurchaseInvoiceController = erpnext.buying.BuyingController.exten
}
// TODO: improve this
if(this.frm.doc.__islocal && this.frm.fields_dict.price_list_name
&& this.frm.doc.price_list_name) {
this.price_list_name(callback1);
if(this.frm.doc.__islocal) {
if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
this.price_list_name(callback1);
} else {
callback1(doc, dt, dn);
}
}
}
});

View File

@ -50,9 +50,12 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
}
// TODO: improve this
if(this.frm.doc.__islocal && this.frm.fields_dict.price_list_name
&& this.frm.doc.price_list_name) {
this.price_list_name(callback1);
if(this.frm.doc.__islocal) {
if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
this.price_list_name(callback1);
} else {
callback1(doc, dt, dn);
}
}
}

View File

@ -40,9 +40,12 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
}
// TODO: improve this
if(this.frm.doc.__islocal && this.frm.fields_dict.price_list_name
&& this.frm.doc.price_list_name) {
this.price_list_name(callback);
if(this.frm.doc.__islocal) {
if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name) {
this.price_list_name(callback);
} else {
callback(doc, dt, dn);
}
}
}

View File

@ -45,9 +45,11 @@ erpnext.buying.PurchaseReceiptController = erpnext.buying.BuyingController.exten
}
// TODO: improve this
if(this.frm.doc.__islocal && this.frm.fields_dict.price_list_name
&& this.frm.doc.price_list_name) {
this.price_list_name(callback);
if(this.frm.doc.__islocal) {
if (this.frm.fields_dict.price_list_name && this.frm.doc.price_list_name)
this.price_list_name(callback);
else
callback(doc, dt, dn);
}
}
});