fix proforma invoice currency rate

This commit is contained in:
Omair Saleh
2022-09-30 13:42:47 +08:00
parent b7c985515c
commit 39ac9ec369
@@ -138,8 +138,6 @@ class CreateProformaInvoiceTransactionProcessor
dd($booking->transactions()->payments()->where(function($query){
$query->where(function($query){
$query->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>', Carbon::now());
})->orWhere(function($query){
$query->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, 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){