@php // Existing recorded tax takes precedence. Otherwise use the agreed 11% reporting policy. // This calculation is display-only and must never change the balance transfer payload. $transferAmount = round((float) $transaction['transferred_balance'], 2); $taxAmount = $transaction['tax_amount'] ?? null; $taxPercentage = $transaction['tax_percentage'] ?? null; $hasTaxAmount = is_numeric($taxAmount) && is_finite((float) $taxAmount) && (float) $taxAmount >= 0; $hasTaxPercentage = is_numeric($taxPercentage) && is_finite((float) $taxPercentage) && (float) $taxPercentage >= 0; $calculatedTax = !$hasTaxAmount; if ($calculatedTax) { $taxPercentage = $hasTaxPercentage ? (float) $taxPercentage : 11; $taxAmount = round($transferAmount * $taxPercentage / 100, 2, PHP_ROUND_HALF_UP); $hasTaxPercentage = true; } $invoiceTotal = round($transferAmount + (float) $taxAmount, 2, PHP_ROUND_HALF_UP); $detailDialogId = 'transfer-detail-'.\Illuminate\Support\Str::uuid(); @endphp

Detail Transaksi

Pengirim
{{ ($transaction['sender_name'] ?? '') ?: '—' }}
Penerima
{{ ($transaction['receiver_name'] ?? '') ?: '—' }}
Jenis transaksi
{{ $transaction['transaction_type'] ?? '—' }}
Waktu
{{ $transaction['created_at'] ?? '—' }}

Rincian nominal & PPN

Saldo yang ditransfer
Rp {{ number_format($transferAmount, 2, ',', '.') }}
@if($hasTaxPercentage)
{{ $calculatedTax ? 'Tarif PPN' : 'Tarif pajak tercatat' }}
{{ number_format((float) $taxPercentage, 2, ',', '.') }}%
@endif
{{ $calculatedTax ? 'PPN di luar nominal transfer' : 'Nominal pajak tercatat' }}
Rp {{ number_format((float) $taxAmount, 2, ',', '.') }}
Total untuk pencatatan faktur
Rp {{ number_format($invoiceTotal, 2, ',', '.') }}

PPN hanya untuk pencatatan faktur. Saldo pengirim dan penerima tetap mengikuti nominal transfer.

@if($calculatedTax)

Rincian PPN dihitung dari nominal transfer, dibulatkan ke dua desimal.

@endif
@once @push('scripts') @endpush @endonce