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
(cherry picked from commit e52c4c8f22)
This commit is contained in:
@@ -1871,7 +1871,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