fix proforma invoice currency rate

This commit is contained in:
Omair Saleh
2022-09-30 14:03:04 +08:00
parent ca4c158755
commit aa8c99eb63
@@ -149,12 +149,6 @@ class CreateProformaInvoiceTransactionProcessor
return $query->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]);
});
})->selectRaw('sum(amount - service_charge - tax) as sub_total')->get()->sum('sub_total');
dd($payable_amount, $booking_currency_average_rate);
// $booking_currency_average_rate = $booking_amount / $booking->transactions()->payments()->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');
$total_service_charge = $booking->transactions()
->where('type', TransactionType::PAYMENT)