91 lines
5.3 KiB
PHP
91 lines
5.3 KiB
PHP
|
|
@extends('layouts.business.pdf.pdf_layout')
|
||
|
|
|
||
|
|
@section('pdf_title')
|
||
|
|
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
|
||
|
|
@include('business::print.header')
|
||
|
|
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Income Report List') }}</h4>
|
||
|
|
{{-- <p style="text-align: center; margin: 0; padding: 0; font-weight: 400; font-size: 14px;" class="">{{ __('Duration: 14-12-2025 to 24-12-2025') }}</p> --}}
|
||
|
|
</div>
|
||
|
|
@endsection
|
||
|
|
|
||
|
|
@section('pdf_content')
|
||
|
|
<table width="100%" cellpadding="6" cellspacing="0"
|
||
|
|
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
|
||
|
|
id="datatable">
|
||
|
|
<thead>
|
||
|
|
<tr style="background-color: #C52127; color: white;">
|
||
|
|
@if (auth()->user()->accessToMultiBranch())
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Branch') }}</th>
|
||
|
|
@endif
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Category') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Income For') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Payment Type') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Reference') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Amount') }}</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach ($income_reports as $income_report)
|
||
|
|
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||
|
|
@if (auth()->user()->accessToMultiBranch())
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $income_report->branch->name ?? '' }}
|
||
|
|
</td>
|
||
|
|
@endif
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ formatted_date($income_report->incomeDate) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $income_report->category?->categoryName }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $income_report->incomeFor }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none">
|
||
|
|
@if ($income_report->transactions && $income_report->transactions->isNotEmpty())
|
||
|
|
{{ $income_report->transactions->map(function($transaction) {
|
||
|
|
if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) {
|
||
|
|
return $transaction->paymentType->name;
|
||
|
|
}
|
||
|
|
return $transaction->transaction_type
|
||
|
|
? ucfirst(explode('_', $transaction->transaction_type)[0])
|
||
|
|
: '';
|
||
|
|
})->unique()->implode(', ') }}
|
||
|
|
@elseif ($income_report->payment_type_id)
|
||
|
|
{{ $income_report->payment_type?->name }}
|
||
|
|
@else
|
||
|
|
{{ $income_report->paymentType }}
|
||
|
|
@endif
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $income_report->referenceNo }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ currency_format($income_report->amount, currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@endforeach
|
||
|
|
</tbody>
|
||
|
|
@if ($income_reports->count() > 0)
|
||
|
|
<tfoot>
|
||
|
|
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white">
|
||
|
|
{{ __('Total') }}
|
||
|
|
</td>
|
||
|
|
@if (auth()->user()->accessToMultiBranch())
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; font-weight: 600;"></td>
|
||
|
|
@endif
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ currency_format($income_report->amount, currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</tfoot>
|
||
|
|
@endif
|
||
|
|
</table>
|
||
|
|
@endsection
|