mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 04:45:09 +00:00
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> fix(Payment Entry): set account type if missing (#47069)
This commit is contained in:
@@ -461,15 +461,25 @@ class PaymentEntry(AccountsController):
|
|||||||
self.set(self.party_account_field, party_account)
|
self.set(self.party_account_field, party_account)
|
||||||
self.party_account = party_account
|
self.party_account = party_account
|
||||||
|
|
||||||
if self.paid_from and not (self.paid_from_account_currency or self.paid_from_account_balance):
|
if self.paid_from and (
|
||||||
|
not self.paid_from_account_currency
|
||||||
|
or not self.paid_from_account_balance
|
||||||
|
or not self.paid_from_account_type
|
||||||
|
):
|
||||||
acc = get_account_details(self.paid_from, self.posting_date, self.cost_center)
|
acc = get_account_details(self.paid_from, self.posting_date, self.cost_center)
|
||||||
self.paid_from_account_currency = acc.account_currency
|
self.paid_from_account_currency = acc.account_currency
|
||||||
self.paid_from_account_balance = acc.account_balance
|
self.paid_from_account_balance = acc.account_balance
|
||||||
|
self.paid_from_account_type = acc.account_type
|
||||||
|
|
||||||
if self.paid_to and not (self.paid_to_account_currency or self.paid_to_account_balance):
|
if self.paid_to and (
|
||||||
|
not self.paid_to_account_currency
|
||||||
|
or not self.paid_to_account_balance
|
||||||
|
or not self.paid_to_account_type
|
||||||
|
):
|
||||||
acc = get_account_details(self.paid_to, self.posting_date, self.cost_center)
|
acc = get_account_details(self.paid_to, self.posting_date, self.cost_center)
|
||||||
self.paid_to_account_currency = acc.account_currency
|
self.paid_to_account_currency = acc.account_currency
|
||||||
self.paid_to_account_balance = acc.account_balance
|
self.paid_to_account_balance = acc.account_balance
|
||||||
|
self.paid_to_account_type = acc.account_type
|
||||||
|
|
||||||
self.party_account_currency = (
|
self.party_account_currency = (
|
||||||
self.paid_from_account_currency
|
self.paid_from_account_currency
|
||||||
|
|||||||
Reference in New Issue
Block a user