Merge pull request #27545 from nextchamp-saqib/pay-received-amt-fix
fix: cannot add deductions in internal transfer payment entry
This commit is contained in:
commit
b990d5b112
@ -505,12 +505,13 @@ class PaymentEntry(AccountsController):
|
|||||||
|
|
||||||
def validate_received_amount(self):
|
def validate_received_amount(self):
|
||||||
if self.paid_from_account_currency == self.paid_to_account_currency:
|
if self.paid_from_account_currency == self.paid_to_account_currency:
|
||||||
if self.paid_amount != self.received_amount:
|
if self.paid_amount < self.received_amount:
|
||||||
frappe.throw(_("Received Amount cannot be greater than Paid Amount"))
|
frappe.throw(_("Received Amount cannot be greater than Paid Amount"))
|
||||||
|
|
||||||
def set_received_amount(self):
|
def set_received_amount(self):
|
||||||
self.base_received_amount = self.base_paid_amount
|
self.base_received_amount = self.base_paid_amount
|
||||||
if self.paid_from_account_currency == self.paid_to_account_currency:
|
if self.paid_from_account_currency == self.paid_to_account_currency \
|
||||||
|
and not self.payment_type == 'Internal Transfer':
|
||||||
self.received_amount = self.paid_amount
|
self.received_amount = self.paid_amount
|
||||||
|
|
||||||
def set_amounts_after_tax(self):
|
def set_amounts_after_tax(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user