mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[fix] Fetch shipping address only if field exists
This commit is contained in:
@@ -174,8 +174,9 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
|
|
||||||
company: function() {
|
company: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!this.frm.doc.shipping_address) {
|
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address")
|
||||||
erpnext.utils.get_shipping_address(this.frm)
|
&& !this.frm.doc.shipping_address) {
|
||||||
|
erpnext.utils.get_shipping_address(this.frm)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user