performa invoice

This commit is contained in:
omair saleh
2021-11-28 21:27:28 +08:00
parent 26d1aefe2f
commit e4635187bc
@@ -126,7 +126,7 @@ class CreateProformaInvoiceTransactionProcessor
$totalPayment = $booking->fix_currency_id === 1 ? $booking->transactions()->payments()->complete()->sum('original_amount') :
$booking->transactions()->payments()->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) / $totalPayment;
dd($this->calculatesBookingPayableAmount->execute($booking, $booking->fix_currency_id));
dd($totalPayment);
$total_service_charge = $booking->transactions()
->where('type', TransactionType::PAYMENT)
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])