Profit Analysis {{ ucfirst($business_name) }}
by Items From {{ !empty($from) ? date('d F Y', strtotime($from)) : '' }} till {{ !empty($to) ? date('d F Y', strtotime($to)) : '' }}


@php($i=1) @php($net_total = 0) @php($vat_total = 0) @php($cost_total = 0) @php($profit_total = 0) @foreach($profit_analysis as $key => $profit_data) @php($profit = $profit_data->total-($profit_data->tax_amount + $profit_data->supplier_cost)) @php($profit_in_percentage = ($profit != 0) ? ($profit/$profit_data->total)*100 : 0) @php($net_total += $profit_data->total) @php($vat_total += $profit_data->tax_amount) @php($cost_total += $profit_data->supplier_cost) @php($profit_total += $profit) @php($i++) @endforeach
Sl Item Net VAT Cost Profit Profit(%)
{{ $i }} {{ !empty($profit_data->product_name) ? $profit_data->product_name : '' }} {{ !empty($profit_data->total) ? number_format($profit_data->total,$decimal_point) : number_format(0,$decimal_point) }} {{ !empty($profit_data->tax_amount) ? $profit_data->tax_amount : number_format(0,$decimal_point) }} {{ !empty($profit_data->supplier_cost) ? $profit_data->supplier_cost : number_format(0,$decimal_point) }} {{ number_format($profit, $decimal_point) }} {{ number_format($profit_in_percentage,$decimal_point) }}
             
Total   {{ number_format($net_total, $decimal_point) }} {{ number_format($vat_total, $decimal_point) }} {{ number_format($cost_total, $decimal_point) }} {{ number_format($profit_total, $decimal_point) }}