fixes for purchase price list
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js
index b4fe62e..f4a2e68 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -44,9 +44,12 @@
}
// 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);
+ }
}
}
});
diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js
index 4bcd828..afe4741 100644
--- a/buying/doctype/purchase_order/purchase_order.js
+++ b/buying/doctype/purchase_order/purchase_order.js
@@ -50,9 +50,12 @@
}
// 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);
+ }
}
}
diff --git a/buying/doctype/supplier_quotation/supplier_quotation.js b/buying/doctype/supplier_quotation/supplier_quotation.js
index 36f9be8..1e4f6cb 100644
--- a/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -40,9 +40,12 @@
}
// 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);
+ }
}
}
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.js b/stock/doctype/purchase_receipt/purchase_receipt.js
index c7d2e50..82e494c 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -45,9 +45,11 @@
}
// 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);
}
}
});