fix proforma invoice currency rate

This commit is contained in:
Omair Saleh
2022-09-30 13:35:39 +08:00
parent f6dc306626
commit cec56a9435
@@ -138,8 +138,6 @@ class CreateProformaInvoiceTransactionProcessor
dd($booking->transactions()->payments()->where(function($query){
return $query->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]);
});
})->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){