@if ($selectedTransaksi)
@php
$total_barang = $selectedTransaksi->barangTransaksis->sum('harga_total');
$biaya_ekspedisi = $selectedTransaksi->biaya_ekspedisi ?? 0;
$grand_total = $total_barang + $biaya_ekspedisi;
@endphp
No Faktur: {{ $selectedTransaksi->no_faktur }}
Tanggal:
{{ date('d-m-Y', strtotime($selectedTransaksi->tanggal_faktur)) }}
Supplier:
{{ $selectedTransaksi->supplier->nama_perusahaan ?? 'N/A' }}
Total Barang: Rp {{ number_format($total_barang, 0, ',', '.') }}
Biaya Ekspedisi : Rp {{ number_format($biaya_ekspedisi, 0, ',', '.') }}
Grand Total: Rp {{ number_format($grand_total, 0, ',', '.') }}
No |
Kode Barang |
Nama Barang |
Jumlah |
Harga |
Subtotal |
@foreach ($detailTransaksi as $detail)
{{ $loop->iteration }} |
{{ $detail->barang->kode ?? '-' }} |
{{ $detail->barang->nama ?? '-' }} |
{{ $detail->jumlah ?? '-' }} |
Rp {{ number_format($detail->harga_beli, 0, ',', '.') }} |
Rp {{ number_format($detail->harga_total, 0, ',', '.') }} |
@endforeach
@endif
@if ($detailTransaksiRetur && count($detailTransaksiRetur) > 0)
No |
Kode Barang |
Nama Barang |
Jumlah |
Harga |
Subtotal |
Tipe Retur |
@foreach ($detailTransaksiRetur as $detail)
@foreach ($detail->barangTransaksis as $barang)
{{ $loop->iteration }} |
{{ $barang->barang->kode ?? '-' }} |
{{ $barang->barang->nama ?? '-' }} |
{{ $barang->jumlah ?? '-' }} |
{{ $barang->tipe_retur == 'potong_nota' ? 'Rp ' . number_format($barang->harga_beli, 0, ',', '.') : 'Rp ' . number_format(0, 0, ',', '.') }}
|
{{ $barang->tipe_retur == 'potong_nota' ? 'Rp ' . number_format($barang->harga_total, 0, ',', '.') : 'Rp ' . number_format(0, 0, ',', '.') }}
|
{{ str_replace('_', ' ', $barang->tipe_retur) }} |
@endforeach
@endforeach
@endif