@extends('layouts.app') @section('title') {{ $pageInfo['title'] }} @endsection @section('admin-content')

{{ $pageInfo['title'] }}

  • Cabang: {{ $cabang->name }}
  • Periode: {{ ucfirst($month) }} {{ $year }}
  • Cost Centre {{ $cabang->cost->code }}
@php use App\Helpers\FormHelper; @endphp
@include('backend.layouts.partials.messages')
@php $totalDr = 0; $totalCr = 0; @endphp @foreach ($kategori as $item) @php $drValue = $nominals[$item->id] ?? 0; $drFormatted = $drValue == 0 ? '' : number_format($drValue, 0, ',', ','); $totalDr += $drValue; @endphp @endforeach @php $cashInBankValue = $pettyCashAmount - $totalKategori; $rowIndex = $kategori->count() + 1; @endphp @if ($cashInBankValue >= 0) @php $totalDr += $cashInBankValue; @endphp @else @php $totalCr += abs($cashInBankValue); @endphp @endif {{-- Static Rows --}}
# Type Account Number Dr Cr
{{ $loop->iteration }} {{ $item->name }} {{ $item->account_number }} {{ $drFormatted }}
{{ $rowIndex }} Cash in Bank BCA {{ $kategori_bca->account_number }}{{ $cashInBankValue == 0 ? '' : number_format($cashInBankValue, 0, ',', ',') }} {{ number_format(abs($cashInBankValue), 0, ',', ',') }}
{{ $rowIndex + 1 }} Petty Cash @php $totalCr += $pettyCashAmount; echo $pettyCashAmount == 0 ? '' : number_format($pettyCashAmount, 0, ',', ','); @endphp
{{ $rowIndex + 2 }} Cash Advance (Opening Balance) {{ $kategori_bca->account_number }} @php $totalCr += 500000; @endphp {{ number_format(500000, 0, ',', ',') }}
{{ $rowIndex + 3 }} Cash Advance (Ending Balance) {{ $kategori_bca->account_number }} @php $totalDr += 500000; @endphp {{ number_format(500000, 0, ',', ',') }}
Total {{ number_format($totalDr, 0, ',', '.') }} {{ number_format($totalCr, 0, ',', '.') }}
@endsection @section('scripts') @endsection