fix: PO/PINV - Check if doctype has company_address field before setting the value (#27441) (#27575)
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 666eaae6ce)
Co-authored-by: vama <vamagithub@gmail.com>
This commit is contained in:
@@ -864,7 +864,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
if (r.message) {
|
if (r.message) {
|
||||||
me.frm.set_value("billing_address", r.message);
|
me.frm.set_value("billing_address", r.message);
|
||||||
} else {
|
} else {
|
||||||
me.frm.set_value("company_address", "");
|
if (frappe.meta.get_docfield(me.frm.doctype, 'company_address')) {
|
||||||
|
me.frm.set_value("company_address", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user