[fix] Fetch shipping address only if field exists
This commit is contained in:
parent
547d223b28
commit
4f01704234
@ -174,8 +174,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
|
||||
company: function() {
|
||||
var me = this;
|
||||
if (!this.frm.doc.shipping_address) {
|
||||
erpnext.utils.get_shipping_address(this.frm)
|
||||
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address")
|
||||
&& !this.frm.doc.shipping_address) {
|
||||
erpnext.utils.get_shipping_address(this.frm)
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user