fix proforma invoice currency rate

This commit is contained in:
Omair Saleh
2022-09-30 13:44:41 +08:00
parent 9dce1ee9d3
commit ef01cbe77f
@@ -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){