diff --git a/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php index ef3d7516..947ed26f 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php @@ -135,7 +135,7 @@ class CreateProformaInvoiceTransactionProcessor $transaction = $booking->transactions() ->where('type', TransactionType::PAYMENT) ->first(); -dd($booking->transactions()->payments()->where(function($query){ +dd($booking->transactions()->where('type', TransactionType::PAYMENT)->where(function($query){ return $query->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>', Carbon::now())->get(); })->orWhere(function($query){ return $query->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);