From ef01cbe77f5c4f2d0c6669e19559b06e7b08ea3f Mon Sep 17 00:00:00 2001 From: Omair Saleh Date: Fri, 30 Sep 2022 13:44:41 +0800 Subject: [PATCH] fix proforma invoice currency rate --- .../Processors/CreateProformaInvoiceTransactionProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php index 21902f9c..7e25680c 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php @@ -137,7 +137,7 @@ class CreateProformaInvoiceTransactionProcessor ->first(); dd($booking->transactions()->payments() ->where(function($query){ - $query->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>', Carbon::now()); + $query->where('status', ApprovalStatus::PENDING_SUBMISSION); })->selectRaw('sum(amount - service_charge - tax) as sub_total')->get()->sum('sub_total')); $booking_currency_average_rate = $this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id) / $booking->transactions()->payments()->where(function($query){