@php // Reusable print/report template — Bangladeshi traditional style. // Variables (all optional): // $orientation : 'portrait' | 'landscape' (default portrait) // $paper : 'A4' | 'Letter' ... (default A4) // $compact : bool (default true) // $organization : organization model (default current_organization()) // $signatures : array of signature labels (default 3 standard ones) $orientation = in_array($orientation ?? 'portrait', ['portrait', 'landscape']) ? ($orientation ?? 'portrait') : 'portrait'; $paper = $paper ?? 'A4'; $compact = $compact ?? true; $organization = $organization ?? (function_exists('current_organization') ? current_organization() : null); $signatures = $signatures ?? [_lang('Prepared By'), _lang('Checked By'), _lang('Authorised Signature')]; // For screen preview only — A4 dimensions per orientation. $sheetW = $orientation === 'landscape' ? '297mm' : '210mm'; // Toggle URL (flips orientation, keeps other query params). $flip = $orientation === 'landscape' ? 'portrait' : 'landscape'; $flipUrl = request()->fullUrlWithQuery(['orientation' => $flip]); @endphp @include('partials.fonts') @yield('report_title', _lang('Report')) — {{ $organization->name ?? config('app.name') }}
{{-- Letterhead --}}
{{ $organization->name ?? config('app.name') }}
@if ($organization) @if ($organization->address)
{{ $organization->address }}
@endif
@if ($organization->phone){{ _lang('Mobile') }}: {{ $organization->phone }}@endif @if ($organization->email)  |  {{ _lang('Email') }}: {{ $organization->email }}@endif
@endif
{{-- Title + meta --}}
@yield('report_title', _lang('Report'))
@yield('report_meta')
{{-- Body (the report table) --}} @yield('report_body') {{-- Signatures --}} @hasSection('no_signatures') @else
@foreach ($signatures as $sig)
{{ $sig }}
@endforeach
@endif
{{ _lang('Printed on') }}: {{ now()->format('d M Y, h:i A') }} {{ $organization->name ?? config('app.name') }}