@extends('pdf.layouts.app') @section('title', 'Daily Journal Report') @section('styles') @endsection @section('content')
@php $transactions = $data['data'] ?? []; $summary = $data['summery'] ?? []; // default false if backend didn't pass it $ShowByDefault = $ShowByDefault ?? false; @endphp {{-- Transactions Table --}} @if(count($transactions) > 0) @if(!$ShowByDefault) @endif @foreach($transactions as $index => $item) @if(!$ShowByDefault) @endif @endforeach
# Number Date Account Name Debit CreditCurrency Transfer Rate
{{ $index + 1 }} {{ $item['constraint_number_doc'] ?? '-' }} {{ isset($item['date']) ? \Carbon\Carbon::parse($item['date'])->format('d/m/Y') : '-' }} {{ $item['tree_accounting_title'] ?? '-' }} {{ $item['constraint_name'] ?? '-' }} {{ number_format($item['debit'] ?? 0, 2) }} {{ number_format($item['creditor'] ?? 0, 2) }}{{ $item['currency_transfer_rate'] ?? '-' }}
{{-- Summary Section --}}

Summary

Total Debit Total Credit
{{ number_format($summary['total_debit'] ?? 0, 2) }} {{ number_format($summary['total_creditor'] ?? 0, 2) }}
@else

No data available for this report.

@endif
@endsection