Revert "fix: Add party account validation for journal entry"
This reverts commit f00620a3ca8d507dc947b82abdb5a90c6759bde5.
This commit is contained in:
parent
bcaf475295
commit
0a618817dc
@ -37,7 +37,6 @@ class JournalEntry(AccountsController):
|
|||||||
self.validate_party()
|
self.validate_party()
|
||||||
self.validate_entries_for_advance()
|
self.validate_entries_for_advance()
|
||||||
self.validate_multi_currency()
|
self.validate_multi_currency()
|
||||||
self.validate_party_account_currency()
|
|
||||||
self.set_amounts_in_company_currency()
|
self.set_amounts_in_company_currency()
|
||||||
self.validate_debit_credit_amount()
|
self.validate_debit_credit_amount()
|
||||||
|
|
||||||
@ -434,18 +433,6 @@ class JournalEntry(AccountsController):
|
|||||||
|
|
||||||
self.set_exchange_rate()
|
self.set_exchange_rate()
|
||||||
|
|
||||||
def validate_party_account_currency(self):
|
|
||||||
for d in self.get("accounts"):
|
|
||||||
if self.party_type not in ('Customer', 'Supplier'):
|
|
||||||
continue
|
|
||||||
|
|
||||||
party_gle_currency = get_party_gle_currency(self.party_type, self.party, self.company)
|
|
||||||
party_account_currency = get_account_currency(d.account)
|
|
||||||
|
|
||||||
if not party_gle_currency and (party_account_currency != self.currency):
|
|
||||||
frappe.throw(_("Row {0}: Party Account {1} currency and document currency should be same").format(
|
|
||||||
frappe.bold(d.idx), frappe.bold(d.account)))
|
|
||||||
|
|
||||||
def set_amounts_in_company_currency(self):
|
def set_amounts_in_company_currency(self):
|
||||||
for d in self.get("accounts"):
|
for d in self.get("accounts"):
|
||||||
d.debit_in_account_currency = flt(d.debit_in_account_currency, d.precision("debit_in_account_currency"))
|
d.debit_in_account_currency = flt(d.debit_in_account_currency, d.precision("debit_in_account_currency"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user