Skip to content

Commit

Permalink
fix: Shipping Address Link Showing in Buying (backport #38634) (#38646)
Browse files Browse the repository at this point in the history
fix(ux): `Shipping Address Link`

(cherry picked from commit ca0c3eb)

Co-authored-by: creative-paramu <pparameshwari@thirvusoft.in>
  • Loading branch information
mergify[bot] and creative-paramu authored Dec 8, 2023
1 parent 0b2e2a2 commit 4150ed9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erpnext/public/js/controllers/buying.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ erpnext.buying = {

// no idea where me is coming from
if(this.frm.get_field('shipping_address')) {
this.frm.set_query("shipping_address", function() {
if(me.frm.doc.customer) {
this.frm.set_query("shipping_address", () => {
if(this.frm.doc.customer) {
return {
query: 'frappe.contacts.doctype.address.address.address_query',
filters: { link_doctype: 'Customer', link_name: me.frm.doc.customer }
filters: { link_doctype: 'Customer', link_name: this.frm.doc.customer }
};
} else
return erpnext.queries.company_address_query(me.frm.doc)
return erpnext.queries.company_address_query(this.frm.doc)
});
}
}
Expand Down

0 comments on commit 4150ed9

Please sign in to comment.