E-Invoice - Fix a problem reported by Joanne about error when uploading payment verification document by customer

This commit is contained in:
Dillon Ngo
2025-07-16 13:40:36 +08:00
parent 87c95afc82
commit c64ebeddde
@@ -89,15 +89,15 @@ class CanPassOrderDurationLimitRule extends AbstractRule
$expiresOn = $this->calculatesTransactionExpiryDateTime->execute($object->bookingId);
$isExpired = Carbon::now()->greaterThan($expiresOn);
if($isExpired) {
$booking = $this->fetchesBooking->execute(['id' => $object->bookingId]);
$amountOutstanding = $this->calculatesBookingOutstanding->execute($booking);
$amountPaid = $this->calculatesBookingPaidAmount->execute($booking);
if($amountPaid > 0.01 && $amountOutstanding > 0){
Log::info("Transfer already expired but has paid amount: {$amountPaid} and outstanding amount: {$amountOutstanding}, Booking ID: {$object->bookingId}");
$isExpired = false;
}
}
// if($isExpired) {
// $booking = $this->fetchesBooking->execute(['id' => $object->bookingId]);
// $amountOutstanding = $this->calculatesBookingOutstanding->execute($booking);
// $amountPaid = $this->calculatesBookingPaidAmount->execute($booking);
// if($amountPaid > 0.01 && $amountOutstanding > 0){
// Log::info("Transfer already expired but has paid amount: {$amountPaid} and outstanding amount: {$amountOutstanding}, Booking ID: {$object->bookingId}");
// $isExpired = false;
// }
// }
if($isExpired){
if (isset($object->paymentReference) && $object->paymentReference){