@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
Edit @if(in_array('supadm', $users_rules)) @endif
@if(session('success')) @endif
Nama Supplier / Customer : {{ $header->supplier_name ?? '-' }}
Nomor : {{ $header->nomor_bukti ?? '-' }}
Tanggal : {{ $header->date ? date('d/m/Y', strtotime($header->date)) : '-' }}
{{ $header->company_name ?? '-' }}
BUKTI BANK {{ strtoupper($header->is_in ? 'MASUK' : 'KELUAR') }}
@php $subtotal = 0; @endphp @foreach($details as $item) @php $grossAmount = $item->gross_amount_rupiah > 0 ? $item->gross_amount_rupiah : $item->amount; $subtotal += $grossAmount; // Cek DP dari header $dpText = ''; if(!empty($header->is_dp)) { $dpNumber = isset($header->dp_seq) ? number_format($header->dp_seq, 0, ',', '.') : 1; $dpPercentage = isset($header->dp_percentage) ? number_format($header->dp_percentage, 2) : 0; $dpText = " DP {$dpNumber} ({$dpPercentage}%)"; } @endphp @endforeach {{-- Diskon --}} @if($header->diskon > 0) @php // Calculate diskon percentage from gross amount $diskonPercentage = $subtotal > 0 ? ($header->diskon / $subtotal * 100) : 0; @endphp @endif {{-- Potongan Bon --}} @if($header->potongan_bon > 0) @endif {{-- PPN --}} @if($header->ppn_amount > 0 && $ppnMaster) @endif {{-- PPh --}} @if($header->pph_amount > 0 && $pphMaster) @endif {{-- TOTAL --}} @php $grandTotal = $subtotal - ($header->diskon ?? 0) - ($header->potongan_bon ?? 0) + ($header->ppn_amount ?? 0) - ($header->pph_amount ?? 0); @endphp
No Uraian Jumlah
{{ $loop->iteration }} {{ $item->kategori }} @if(!empty($item->detail_kategori)) - {{ $item->detail_kategori }} @endif {{ !empty($dpText) ? ' - ' . $dpText : '' }} {{ $header->is_in ? number_format($header->amount, 2, ',', '.') : number_format($grossAmount, 2, ',', '.') }}
Diskon ({{ number_format($diskonPercentage, 2) }}%) - {{ number_format($header->diskon, 2, ',', '.') }}
Potongan Bon - {{ number_format($header->potongan_bon, 2, ',', '.') }}
{{ $ppnMaster->name }} {{ number_format($header->ppn_amount, 2, ',', '.') }}
{{ $pphMaster->name }} - {{ number_format($header->pph_amount, 2, ',', '.') }}
TOTAL {{ number_format($grandTotal, 2, ',', '.') }}

Terbilang: {{ ucwords(terbilang($grandTotal) ?? '') }} Rupiah

Keterangan: {{ $header->keterangan ?? '-' }}

Rekening Perusahaan:
Bank : {{ $header->rekening_nama_bank ?? '-' }}
No. Rekening : {{ $header->rekening_nomor_akun ?? '-' }}
Rekening Supplier/Customer:
Bank : {{ $header->supplier_nama_bank ?? '-' }}
No. Rekening : {{ $header->supplier_nomor_akun ?? '-' }}
Atas Nama : {{ $header->supplier_nama_akun ?? '-' }}

{{ $header->is_in ? 'Penyetor' : 'Penerima' }}

@if($header->is_in) {{ $header->penyetor_name ? $header->penyetor_name : '(_________________)' }} @else {{ $header->penerima_name ? $header->penerima_name : '(_________________)' }} @endif

Pembukuan

@if($header->pembukuan_signature) Signature @endif

{{ $header->pembukuan_name ?? '(_________________)' }}

Kasir

{{ $header->kasir_name ?? '(_________________)' }}

Mengetahui

@if($header->mengetahui_signature) Signature @endif

{{ $header->mengetahui_name ?? '(_________________)' }}

@endsection @push('js') @endpush