refactor(test): make sure party has USD account
1. Don't reset 'party_account_currency' of SO/PO upon Payment Entry cancellation. This happens when there are no payments against a SO/PO
This commit is contained in:
@@ -1880,7 +1880,10 @@ class AccountsController(TransactionBase):
|
||||
advance_paid, precision=self.precision("advance_paid"), currency=advance.account_currency
|
||||
)
|
||||
|
||||
frappe.db.set_value(self.doctype, self.name, "party_account_currency", advance.account_currency)
|
||||
if advance.account_currency:
|
||||
frappe.db.set_value(
|
||||
self.doctype, self.name, "party_account_currency", advance.account_currency
|
||||
)
|
||||
|
||||
if advance.account_currency == self.currency:
|
||||
order_total = self.get("rounded_total") or self.grand_total
|
||||
|
||||
Reference in New Issue
Block a user