@if(Auth::user()->franchise && Auth::user()->franchise->countries && Auth::user()->franchise->countries->currency_code) @else @endif
Month {{ date('M-Y', strtotime($dates['year'] . '-' . $dates['month'])) }} (Amounts are in {{ Auth::user()->franchise->countries->currency_code }})(Amounts are in TZS)
Withholdee WHT Log Report
@php $whtExclusive = 0; $whtAmount = 0; @endphp @foreach($whtLogs as $wht_log) @php $whtExclusive += ($wht_log->is_payment_voucher) ? $wht_log->total_amount_converted : $wht_log->total_amount; $whtAmount += $wht_log->vat_amount; @endphp @endforeach
Invoice / PC Number TIN WHT (%) Company Name Date Description WHT Exclusive WHT Amount
@if($wht_log->is_payment_voucher) {{ $wht_log->ti_serial_number ?? '' }} @else PC{{ $wht_log->serial_number ?? '' }} @endif {{ $wht_log->company->registrations[0]->registration_value ?? '' }} {{ $wht_log->tax_value ?? '' }}% {{ $wht_log->company->name ?? '' }} @if($wht_log->is_payment_voucher) {{ $wht_log->tax_invoice_date_formatted }} @else {{ $wht_log->date_formatted }} @endif @if($wht_log->is_payment_voucher) {{ $wht_log->description }} @else {{ $wht_log->short_description }} @endif @if($wht_log->is_payment_voucher) {{ round($wht_log->total_amount_converted, 2) }} @else {{ round($wht_log->total_amount, 2) }} @endif {{ round($wht_log->vat_amount, 2) }}
{{ round($whtExclusive, 2) }} {{ round($whtAmount, 2) }}
WHT Allocation
@foreach($departmentList as $dept) @endforeach @foreach ($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept) @endforeach @else @endif @endforeach @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept) @endforeach @else @endif @endforeach @foreach($departmentList as $dept) @if($dept->subdepts_count > 0) @foreach($dept->subdepts as $sub_dept) @endforeach @else @endif @endforeach
subdepts_count > 0) colspan="{{ $dept->subdepts_count }}" @endif style="border: 1px solid black; text-align: center; background-color: @if($loop->odd) #CCB2FF @elseif($loop->even) #FFE6AB @endif">{{ $dept->name }}Total
{{ $sub_dept->name }}-
WHT Amount @isset($whtLogRevenue['subdepts'][$sub_dept->id]) @php $tempAmount['sub_dept'][$sub_dept->id] = (isset($whtLogRevenue['subdepts'][$sub_dept->id]) ? $whtLogRevenue['subdepts'][$sub_dept->id] : 0); @endphp @if($tempAmount['sub_dept'][$sub_dept->id] > 0) @php if(isset($totalWhtAmount)) $totalWhtAmount += $tempAmount['sub_dept'][$sub_dept->id]; else $totalWhtAmount = $tempAmount['sub_dept'][$sub_dept->id]; @endphp {{ round($tempAmount['sub_dept'][$sub_dept->id], 2) }} @endif @endisset @isset($whtLogRevenue['depts'][$dept->id]) @php $tempAmount['dept'][$dept->id] = $whtLogRevenue['depts'][$dept->id]; @endphp @if(isset($tempAmount['dept'][$dept->id]) && $tempAmount['dept'][$dept->id] > 0) @php if(isset($totalWhtAmount)) $totalWhtAmount += $tempAmount['dept'][$dept->id]; else $totalWhtAmount = $tempAmount['dept'][$dept->id]; @endphp {{ round($tempAmount['dept'][$dept->id], 2) }} @endif @endisset @isset($totalWhtAmount) @if($totalWhtAmount > 0) {{ round($totalWhtAmount, 2) }} @endif @endisset
Allocation @if(isset($whtLogRevenue['subdepts'][$sub_dept->id]) && isset($tempAmount['sub_dept'][$sub_dept->id]) && isset($totalWhtAmount)) @php $tempPercentage = ($tempAmount['sub_dept'][$sub_dept->id] * 100) / $totalWhtAmount; @endphp @if($totalWhtAmount > 0 && $tempPercentage > 0) @php if(isset($totalPercentage)) $totalPercentage += $tempPercentage; else $totalPercentage = $tempPercentage; @endphp {{ round($tempPercentage, 2) }}% @endif @endif @if(isset($whtLogRevenue['depts'][$dept->id]) && isset($tempAmount['dept'][$dept->id]) && isset($totalWhtAmount)) @php $tempPercentage = ($tempAmount['dept'][$dept->id] * 100) / $totalWhtAmount; @endphp @if($totalWhtAmount > 0 && $tempPercentage > 0) @php if(isset($totalPercentage)) $totalPercentage += $tempPercentage; else $totalPercentage = $tempPercentage; @endphp {{ round($tempPercentage, 2) }}% @endif @endif @if(isset($totalPercentage)) {{ round(($totalPercentage > 100) ? '100.00' : $totalPercentage, 2) }}% @endif