Profit Analysis {{ ucfirst($business_name) }}
by Customer 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($customer_name = $profit_data->display_name) @php($profit = $profit_data->total_amount-($profit_data->tax_amount + $profit_data->supplier_cost)) @php($profit_in_percentage = ($profit != 0) ? ($profit/$profit_data->total_amount)*100 : 0) @php($net_total += $profit_data->total_amount) @php($vat_total += $profit_data->tax_amount) @php($cost_total += $profit_data->supplier_cost) @php($profit_total += $profit) @php($i++) @endforeach
Sl Customer Net VAT Cost Profit Profit(%)
{{ $i }} {{ $customer_name }} {{ !empty($profit_data->total_amount) ? number_format($profit_data->total_amount,$decimal_point) : number_format(0,$decimal_point) }} {{ !empty($profit_data->tax_amount) ? number_format($profit_data->tax_amount,$decimal_point) : number_format(0,$decimal_point) }} {{ !empty($profit_data->supplier_cost) ? number_format($profit_data->supplier_cost,$decimal_point) : 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) }}