{{ t('description') }} | {{ t('quantity') }} | {{ t('price') }} | {{ t('total') }} |
---|---|---|---|
{{ $item->title }}
{{ $item->description }}
|
{{ $item->quantity }}
|
{{ $transaction->invoice->formatAmount($item->amount) }}
|
{{ $transaction->invoice->formatAmount($item->amount * $item->quantity) }}
|
{{ t('subtotal') }} | {{ $transaction->invoice->formatAmount($transaction->invoice->subTotal()) }} | ||
{{ $tax['name'] }} ({{ $tax['formatted_rate'] }}) | @php // Calculate tax amount based on rate and subtotal if it's showing as 0 $taxAmount = $tax['amount']; if ($taxAmount <= 0 && $tax['rate'] > 0) { $taxAmount = $subtotal * ($tax['rate'] / 100); echo $transaction->invoice->formatAmount($taxAmount); } else { echo $tax['formatted_amount']; } @endphp | ||
{{ t('fee') }} | {{ $transaction->invoice->formatAmount($transaction->invoice->fee) }} | ||
{{ t('total') }} | @php // Ensure we calculate and display the correct total with tax $subtotal = $transaction->invoice->subTotal(); $taxAmount = 0; // Calculate actual tax amount if needed foreach ($taxDetails as $tax) { $amount = $tax['amount']; if ($amount <= 0 && $tax['rate'] > 0) { $amount = $subtotal * ($tax['rate'] / 100); } $taxAmount += $amount; } $fee = $transaction->invoice->fee ?: 0; $calculatedTotal = $subtotal + $taxAmount + $fee; echo $transaction->invoice->formatAmount($calculatedTotal); @endphp | ||
{{ t('total_credit_remaining') }} | @php if ($remainingCredit > $calculatedTotal) { $remainingCredit = $calculatedTotal; } echo '-' . $invoice->formatAmount($remainingCredit); @endphp | ||
{{ t('final_total') }} | @php $finalamount = $calculatedTotal - $remainingCredit; echo $invoice->formatAmount($finalamount); @endphp | ||
{{ t('total_credit_remaining') }} | @php $credits = $creditTransactions->sum('amount'); if ($credits > $calculatedTotal) { $credits = $calculatedTotal; } echo '-' . $invoice->formatAmount($credits); @endphp | ||
{{ t('final_total') }} | @php $finalamount = $calculatedTotal - $credits; echo $invoice->formatAmount($finalamount); @endphp |
{{ t('payment_approved_message') }}
@if ($transaction->updated_at){{ t('payment_approved_on') }} {{ format_date_time($transaction->updated_at) }}
@endif{{ t('payment_rejected_message') }}
@if ($transaction->error){{ t('payment_rejection_reason') }}{{ $transaction->error }}
@endif @if ($transaction->updated_at){{ t('payment_rejected_on') }} {{ format_date_time($transaction->updated_at) }}
@endif