mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix proforma invoice currency rate
This commit is contained in:
+4
-4
@@ -135,11 +135,11 @@ class CreateProformaInvoiceTransactionProcessor
|
||||
$transaction = $booking->transactions()
|
||||
->where('type', TransactionType::PAYMENT)
|
||||
->first();
|
||||
dd($booking->transactions()->payments()->where(function($query){
|
||||
$query->where(function($query){
|
||||
dd($booking->transactions()->payments()
|
||||
->where(function($query){
|
||||
$query->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>', Carbon::now());
|
||||
});
|
||||
})->selectRaw('sum(amount - service_charge - tax) as sub_total')->get()->sum('sub_total'));
|
||||
})->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){
|
||||
return $query->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>', Carbon::now())->get();
|
||||
})->orWhere(function($query){
|
||||
|
||||
Reference in New Issue
Block a user