Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-33551

This commit is contained in:
Sagar Sharma
2023-01-10 12:14:47 +05:30
committed by GitHub

View File

@@ -622,7 +622,7 @@ class PaymentEntry(AccountsController):
self.payment_type == "Receive"
and self.base_total_allocated_amount < self.base_received_amount + total_deductions
and self.total_allocated_amount
< self.paid_amount + (total_deductions / self.source_exchange_rate)
< flt(self.paid_amount) + (total_deductions / self.source_exchange_rate)
):
self.unallocated_amount = (
self.base_received_amount + total_deductions - self.base_total_allocated_amount
@@ -632,7 +632,7 @@ class PaymentEntry(AccountsController):
self.payment_type == "Pay"
and self.base_total_allocated_amount < (self.base_paid_amount - total_deductions)
and self.total_allocated_amount
< self.received_amount + (total_deductions / self.target_exchange_rate)
< flt(self.received_amount) + (total_deductions / self.target_exchange_rate)
):
self.unallocated_amount = (
self.base_paid_amount - (total_deductions + self.base_total_allocated_amount)