test: Update test cases for currency change validation

(cherry picked from commit 60915e874d)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py
#	erpnext/healthcare/doctype/patient_appointment/patient_appointment.py
#	erpnext/healthcare/doctype/therapy_plan/therapy_plan.py
#	erpnext/non_profit/doctype/membership/membership.py
This commit is contained in:
Deepesh Garg
2021-08-21 23:05:48 +05:30
committed by Mergify
parent 9d43a90eb0
commit 8f969fbd66
6 changed files with 57 additions and 1 deletions

View File

@@ -1456,6 +1456,9 @@ class AccountsController(TransactionBase):
if self.doctype not in ('Sales Invoice', 'Purchase Invoice'):
return
if self.is_opening == 'Yes':
return
party_type, party = self.get_party()
party_gle_currency = get_party_gle_currency(party_type, party, self.company)
party_account = self.get('debit_to') if self.doctype == 'Sales Invoice' else self.get('credit_to')