Skip to content

Commit

Permalink
fix: PO/PINV - Check if doctype has company_address field before sett…
Browse files Browse the repository at this point in the history
…ing the value (frappe#27441) (frappe#27576)

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 4cac69e)

Co-authored-by: vama <vamagithub@gmail.com>
  • Loading branch information
frappe-pr-bot and vamagithub authored Sep 18, 2021
1 parent a4522e4 commit 5eb587b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
if (r.message) {
me.frm.set_value("billing_address", r.message);
} else {
me.frm.set_value("company_address", "");
if (frappe.meta.get_docfield(me.frm.doctype, 'company_address')) {
me.frm.set_value("company_address", "");
}
}
}
});
Expand Down

0 comments on commit 5eb587b

Please sign in to comment.