@forelse ($invoices as $invoice) @if ($invoice->status === 'paid') Dibayar {{ \Carbon\Carbon::parse($invoice->paid_at)->format('d M Y H:i') }} @else @if ($invoice->order) {{ $invoice->order->status == 'paid' ? $invoice->order->status : 'Kadaluarsa pada ' . \Carbon\Carbon::parse($invoice->order->expired_time)->format('d M Y H:i') }} @else Batas akhir pembayaran {{ \Carbon\Carbon::parse($invoice->due_date)->format('d M Y') }} @endif @endif
Langganan
{{ $invoice->customer_paket->paket->name }}
Lokasi Pemasangan
{{ $invoice->customer_paket->full_customer_installation_address }}
@if ($invoice->status === 'paid')
Jumlah Bayar
@php $totalPaid = $invoice->payments->sum('amount'); $totalRefunded = $invoice->payments->sum('refunded_amount'); $netPaid = $totalPaid - $totalRefunded; @endphp @moneyIDR($netPaid)
@else
Periode
{{ \Carbon\Carbon::parse($invoice->start_periode)->format('d M Y') }} - {{ \Carbon\Carbon::parse($invoice->end_periode)->format('d M Y') }}
Total Tagihan
@php $totalInvoice = $invoice->amount - $invoice->discount + $invoice->tax; @endphp @moneyIDR($totalInvoice)
Total Harus Bayar
@php $totalPaid = $invoice->payments->sum('amount'); $totalRefunded = $invoice->payments->sum('refunded_amount'); $netPaid = $totalPaid - $totalRefunded; $paid = $invoice->amount - $netPaid; @endphp @moneyIDR($paid)
@endif
@if ($invoice->status != 'paid') @if ($activePaymentGateway->count()) Bayar @else Saat ini belum tersedia pembayaran online, namun anda masih bisa melakukan pembayaran melalui direct transfer atau datang ke outlet terdekat kami. @endif @else @if ($invoice->order) Lihat Detail Pembayaran @endif @endif
@empty Informasi Tagihan Anda belum memiliki tagihan. @endforelse
@if ($invoices->hasPages())
{{ $invoices->links() }}
@endif