73 lines
4.4 KiB
PHP
73 lines
4.4 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="">{{ __('Supplier Ledger 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;">
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Name') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Phone') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Purchase') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Amount') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Paid') }}</th>
|
||
|
|
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Purchase Due') }}</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach ($suppliers as $supplier)
|
||
|
|
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $supplier->name }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $supplier->phone }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ $supplier->purchases?->count() }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ currency_format($supplier->purchases?->sum('paidAmount'), currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;">
|
||
|
|
{{ currency_format($supplier->purchases?->sum('dueAmount'), currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@endforeach
|
||
|
|
</tbody>
|
||
|
|
@if ($suppliers->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>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('totalAmount') ?? 0 ), currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->sum('paidAmount') ?? 0 ) }}
|
||
|
|
</td>
|
||
|
|
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||
|
|
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('dueAmount') ?? 0 ), currency: business_currency()) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</tfoot>
|
||
|
|
@endif
|
||
|
|
</table>
|
||
|
|
@endsection
|