Skip to content

Commit

Permalink
Merge pull request #36389 from AlexandreLumertz/patch-2
Browse files Browse the repository at this point in the history
fix: Party type translation in error message
  • Loading branch information
deepeshgarg007 authored Jul 30, 2023
2 parents c6b024c + bc47059 commit c6d8f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ def validate_inter_company_party(doctype, party, company, inter_company_referenc
doc = frappe.get_doc(ref_doc, inter_company_reference)
ref_party = doc.supplier if doctype in ["Sales Invoice", "Sales Order"] else doc.customer
if not frappe.db.get_value(partytype, {"represents_company": doc.company}, "name") == party:
frappe.throw(_("Invalid {0} for Inter Company Transaction.").format(partytype))
frappe.throw(_("Invalid {0} for Inter Company Transaction.").format(_(partytype)))
if not frappe.get_cached_value(ref_partytype, ref_party, "represents_company") == company:
frappe.throw(_("Invalid Company for Inter Company Transaction."))

Expand All @@ -1847,7 +1847,7 @@ def validate_inter_company_party(doctype, party, company, inter_company_referenc
if not company in companies:
frappe.throw(
_("{0} not allowed to transact with {1}. Please change the Company.").format(
partytype, company
_(partytype), company
)
)

Expand Down

0 comments on commit c6d8f15

Please sign in to comment.