From e4635187bc6b8d8677dab94b9e557f1492f518e1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sun, 28 Nov 2021 21:27:28 +0800 Subject: [PATCH] performa invoice --- .../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 e49a1cb0..d529a024 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateProformaInvoiceTransactionProcessor.php @@ -126,7 +126,7 @@ class CreateProformaInvoiceTransactionProcessor $totalPayment = $booking->fix_currency_id === 1 ? $booking->transactions()->payments()->complete()->sum('original_amount') : $booking->transactions()->payments()->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) / $totalPayment; -dd($this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id)); +dd($totalPayment); $total_service_charge = $booking->transactions() ->where('type', TransactionType::PAYMENT) ->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])