Merge pull request #22950 from deepeshgarg007/billing_address_fetch
fix: Add default billing address for purchase documents
This commit is contained in:
commit
d79b511e3f
@ -785,6 +785,19 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
erpnext.utils.get_shipping_address(this.frm, function(){
|
||||
set_party_account(set_pricing);
|
||||
})
|
||||
|
||||
// Get default company billing address in Purchase Invoice, Order and Receipt
|
||||
frappe.call({
|
||||
'method': 'frappe.contacts.doctype.address.address.get_default_address',
|
||||
'args': {
|
||||
'doctype': 'Company',
|
||||
'name': this.frm.doc.company
|
||||
},
|
||||
'callback': function(r) {
|
||||
me.frm.set_value('billing_address', r.message);
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
set_party_account(set_pricing);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user