* fix: cannot add deductions in internal transfer payment entry (cherry picked from commit1b7414e948) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.py * fix: Update message string (cherry picked from commit3b9514d6e1) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.py * fix: conflicts Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com> Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
This commit is contained in:
@@ -505,12 +505,13 @@ class PaymentEntry(AccountsController):
|
||||
|
||||
def validate_received_amount(self):
|
||||
if self.paid_from_account_currency == self.paid_to_account_currency:
|
||||
if self.paid_amount != self.received_amount:
|
||||
frappe.throw(_("Received Amount should be same as Paid Amount"))
|
||||
if self.paid_amount < self.received_amount:
|
||||
frappe.throw(_("Received Amount cannot be greater than Paid Amount"))
|
||||
|
||||
def set_received_amount(self):
|
||||
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
|
||||
|
||||
def set_amounts_after_tax(self):
|
||||
|
||||
Reference in New Issue
Block a user