mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Fix: customer not able to upload bank in slip, due to $amountOutstanding including the floating balance
This commit is contained in:
@@ -34,4 +34,7 @@ class CalculatesBookingOutstanding
|
||||
return $booking->fix_amount - $this->calculatesBookingFloatingAmount->execute($booking, $booking->fix_currency_id) - $this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id) + $this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id);
|
||||
}
|
||||
|
||||
public function executeWithoutFloatingAmount(Booking $booking){
|
||||
return $booking->fix_amount - $this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id) + $this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id);
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class CalculatesTransactionExpiryDateTime
|
||||
|
||||
private function getNewBookingExpiresAt2($booking, $paymentAttemptLimit){
|
||||
$newBookingExpiresAt = null;
|
||||
$amountOutstanding = $this->calculatesBookingOutstanding->execute($booking);
|
||||
$amountOutstanding = $this->calculatesBookingOutstanding->executeWithoutFloatingAmount($booking);
|
||||
$amountPaid = $this->calculatesBookingPaidAmount->execute($booking);
|
||||
if($amountPaid > 0.01 && $amountOutstanding > 0){
|
||||
$newBookingExpiresAt = Carbon::now()->addMinutes($paymentAttemptLimit);
|
||||
|
||||
Reference in New Issue
Block a user