@if ($isFirst)
|
{{ $o->created_at->format('d M Y H:i') }}
|
@endif
|
{{ $product->nama_produk }} |
Rp {{ number_format($product->pivot->harga_produk, 0, ',', '.') }} |
{{ $product->pivot->quantity }} |
Rp
{{ number_format($product->pivot->harga_produk * $product->pivot->quantity, 0, ',', '.') }}
|
@if ($isFirst)
Rp
{{ number_format($o->products->sum(fn($p) => $p->pivot->harga_produk * $p->pivot->quantity), 0, ',', '.') }}
|
@endif
@if ($isFirst)
@if ($o->total == $o->jumlah_pelunasan)
LUNAS
@else
-
{{ number_format($o->sisa_pelunasan, 0, ',', '.') }}
@endif
|
| Order Total |
{{ $o->total !== null ? 'Rp ' . number_format($o->total, 0, ',', '.') : '-' }}
|
| Jumlah telah dibayar |
{{ $o->jumlah_pelunasan !== null ? 'Rp ' . number_format($o->jumlah_pelunasan, 0, ',', '.') : '-' }}
|
| Sisa Cicilan |
{!! $o->sisa_pelunasan == 0 || $o->sisa_pelunasan === null
? 'Lunas'
: 'Rp ' . number_format($o->sisa_pelunasan, 0, ',', '.') !!}
|
|
@endif
@if ($isFirst)
@if ($o->status == 'dikemas')
{{ ucfirst($o->status) }}
@elseif($o->status == 'dikirim')
{{ ucfirst($o->status) }}
@elseif($o->status == 'selesai')
{{ ucfirst($o->status) }}
@elseif($o->status == 'dibatalkan')
{{ ucfirst($o->status) }}
@endif
|
@endif
@endforeach
@endforeach
{{-- ...existing code... --}}