diff --git a/resources/views/statements/stmt.blade.php b/resources/views/statements/stmt.blade.php index e7f30c6..19e7b5b 100644 --- a/resources/views/statements/stmt.blade.php +++ b/resources/views/statements/stmt.blade.php @@ -196,6 +196,18 @@ vertical-align: top; } + /* Menghilangkan padding dan margin untuk baris narrative tambahan */ + tbody tr td { + padding: 5px; + } + + /* Khusus untuk baris narrative tambahan - tanpa padding/margin */ + tbody tr.narrative-line td { + padding: 2px 5px; + margin: 0; + line-height: 1; + } + /* Column width classes */ .col-date { width: 10%; @@ -204,7 +216,8 @@ .col-desc { width: 25%; - + min-width: 150px; + max-width: 150px; } .col-valuta { @@ -213,12 +226,12 @@ } .col-referensi { - width: 20%; + width: 15%; } .col-debet, .col-kredit { - width: 10%; + width: 12.5%; text-align: right; } @@ -265,6 +278,7 @@ $totalDebit = 0; $totalKredit = 0; $line = 1; + $linePerPage = 26; @endphp @php // Hitung tanggal periode berdasarkan $period @@ -292,7 +306,7 @@ $currentLine = ''; foreach ($words as $word) { - if (strlen($currentLine . ' ' . $word) > 35) { + if (strlen($currentLine . ' ' . $word) > 30) { $narrativeLineCount++; $currentLine = $word; } else { @@ -310,8 +324,8 @@ // Add 1 for the "Saldo Awal Bulan" row $totalLines += 1; - // Calculate total pages (18 lines per page) - $totalPages = ceil($totalLines / 18); + // Calculate total pages ($linePerPage lines per page) + $totalPages = ceil($totalLines / $linePerPage); $pageNumber = 0; $footerContent = @@ -371,7 +385,7 @@ Tanggal Tanggal
Valuta Keterangan - Referensi + Referensi Debet Kredit Saldo @@ -404,7 +418,7 @@ $narrativeLines = []; $currentLine = ''; foreach ($words as $word) { - if (strlen($currentLine . ' ' . $word) > 35) { + if (strlen($currentLine . ' ' . $word) > 30) { $narrativeLines[] = trim($currentLine); $currentLine = $word; } else { @@ -418,8 +432,8 @@ @endphp {{ date('d/m/Y', strtotime($row->transaction_date)) }} - {{ date('d/m/Y', strtotime($row->actual_date)) }} - {{ $narrativeLines[0] ?? '' }} + {{ substr($row->actual_date, 0, 10) }} + {{ str_replace(['[', ']'], ' ', $narrativeLines[0] ?? '') }} {{ $row->reference_number }} {{ $debit > 0 ? number_format($debit, 2, ',', '.') : '' }} {{ $kredit > 0 ? number_format($kredit, 2, ',', '.') : '' }} @@ -427,10 +441,10 @@ {{ number_format($saldo, 2, ',', '.') }} @for ($i = 1; $i < count($narrativeLines); $i++) - + - {{ $narrativeLines[$i] }} + {{ str_replace(['[', ']'], ' ', $narrativeLines[$i] ?? '') }} @@ -449,7 +463,7 @@ - @if ($line >= 18 && !$loop->last) + @if ($line >= $linePerPage && !$loop->last) @php $line = 0; $pageNumber++; @@ -520,7 +534,7 @@ @endif @endforeach - @for ($i = 0; $i < 18 - $line; $i++) + @for ($i = 0; $i < $linePerPage - $line; $i++)