PV / PC Number | VRN | Company Name | Receipt Invoice Number | Date | Description | VAT Exclusive | VAT | VAT Inclusive |
---|---|---|---|---|---|---|---|---|
@if($vat_log->is_payment_voucher) PV{{ $vat_log->pv_serial_number ?? '' }} @else PC{{ $vat_log->serial_number ?? '' }} @endif | {{ $vat_log->company->registrations[0]->registration_value ?? '' }} | {{ $vat_log->company->name ?? '' }} | @if($vat_log->is_payment_voucher) {{ $vat_log->lpo_receipt_invoice_number }} @else {{ $vat_log->receipt_number }} @endif | @if($vat_log->is_payment_voucher) {{ $vat_log->receipt_date_formatted }} @else {{ $vat_log->date_formatted }} @endif | @if($vat_log->is_payment_voucher) {{ $vat_log->description }} @else {{ $vat_log->short_description }} @endif | @if($vat_log->is_payment_voucher) {{ number_format($vat_log->total_amount_converted, 2) }} @else {{ number_format($vat_log->total_amount, 2) }} @endif | {{ number_format($vat_log->vat_amount, 2) }} | @if($vat_log->is_payment_voucher) {{ number_format(($vat_log->total_amount_converted + $vat_log->vat_amount), 2) }} @else {{ number_format(($vat_log->total_amount + $vat_log->vat_amount), 2) }} @endif |
{{ number_format($vatExclusive, 2) }} | {{ number_format($vatAmount, 2) }} | {{ number_format($grossAmount, 2) }} |
@foreach($departmentList as $dept) | subdepts_count > 0) colspan="{{ $dept->subdepts_count }}" @endif class="text-center top-head @if($loop->odd) table-cl-purple @elseif($loop->even) table-cl-yellow @endif">{{ $dept->name }} | @endforeachTotal | |
---|---|---|---|
{{ $sub_dept->name }} | @endforeach @else- | @endif @endforeach||
Total Revenue (VAT) | @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept)@isset($vatLogRevenue['subdepts'][$sub_dept->id]) {{ number_format($vatLogRevenue['subdepts'][$sub_dept->id], 2) }} @endisset | @endforeach @else@isset($vatLogRevenue['depts'][$dept->id]) {{ number_format($vatLogRevenue['depts'][$dept->id], 2) }} @endisset | @endif @endforeach@isset($vatLogRevenue['total']) {{ number_format($vatLogRevenue['total'], 2) }} @endisset |
Total Expense (VAT) | @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept)@isset($vatLogExpense['subdepts'][$sub_dept->id]) {{ number_format($vatLogExpense['subdepts'][$sub_dept->id], 2) }} @endisset | @endforeach @else@isset($vatLogExpense['depts'][$dept->id]) {{ number_format($vatLogExpense['depts'][$dept->id], 2) }} @endisset | @endif @endforeach@isset($vatLogExpense['total']) {{ number_format($vatLogExpense['total'], 2) }} @endisset |
VAT Payable | @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept)@isset($vatLogRevenue['subdepts'][$sub_dept->id]) @php $tempPayable['sub_dept'][$sub_dept->id] = (isset($vatLogRevenue['subdepts'][$sub_dept->id]) ? $vatLogRevenue['subdepts'][$sub_dept->id] : 0) - (isset($vatLogExpense['subdepts'][$sub_dept->id]) ? $vatLogExpense['subdepts'][$sub_dept->id] : 0); @endphp @if($tempPayable['sub_dept'][$sub_dept->id] > 0) @php if(isset($totalVatPayable)) $totalVatPayable += $tempPayable['sub_dept'][$sub_dept->id]; else $totalVatPayable = $tempPayable['sub_dept'][$sub_dept->id]; @endphp {{ number_format($tempPayable['sub_dept'][$sub_dept->id], 2) }} @endif @endisset | @endforeach @else@isset($vatLogRevenue['depts'][$dept->id]) @php $tempPayable['dept'][$dept->id] = $vatLogRevenue['depts'][$dept->id] - (isset($vatLogExpense['depts'][$dept->id]) ? $vatLogExpense['depts'][$dept->id] : 0); @endphp @if(isset($tempPayable['dept'][$dept->id]) && $tempPayable['dept'][$dept->id] > 0) @php if(isset($totalVatPayable)) $totalVatPayable += $tempPayable['dept'][$dept->id]; else $totalVatPayable = $tempPayable['dept'][$dept->id]; @endphp {{ number_format($tempPayable['dept'][$dept->id], 2) }} @endif @endisset | @endif @endforeach@isset($totalVatPayable) @if($totalVatPayable > 0) {{ number_format($totalVatPayable, 2) }} @endif @endisset |
Allocation | @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept)@if(isset($vatLogRevenue['subdepts'][$sub_dept->id]) && isset($tempPayable['sub_dept'][$sub_dept->id]) && isset($totalVatPayable)) @php $tempPercentage = ($tempPayable['sub_dept'][$sub_dept->id] * 100) / $totalVatPayable; @endphp @if($totalVatPayable > 0 && $tempPercentage > 0) @php if(isset($totalPercentage)) $totalPercentage += $tempPercentage; else $totalPercentage = $tempPercentage; @endphp {{ number_format($tempPercentage, 2) }}% @endif @endif | @endforeach @else@if(isset($vatLogRevenue['depts'][$dept->id]) && isset($tempPayable['dept'][$dept->id]) && isset($totalVatPayable)) @php $tempPercentage = ($tempPayable['dept'][$dept->id] * 100) / $totalVatPayable; @endphp @if($totalVatPayable > 0 && $tempPercentage > 0) @php if(isset($totalPercentage)) $totalPercentage += $tempPercentage; else $totalPercentage = $tempPercentage; @endphp {{ number_format($tempPercentage, 2) }}% @endif @endif | @endif @endforeach@if(isset($totalPercentage)) {{ number_format(($totalPercentage > 100) ? '100.00' : $totalPercentage, 2) }}% @endif |