Profit Analysis {{ ucfirst($business_name) }}
by Invoices From {{ !empty($from) ? date('d F Y', strtotime($from)) : '' }} till {{ !empty($to) ? date('d F Y', strtotime($to)) : '' }}
@php($i=0) @php($net_total = 0) @php($vat_total = 0) @php($cost_total = 0) @php($profit_total = 0) @foreach($profit_analysis as $key => $profit_data) @php($i++) @php($customer_name = $profit_data->customer_display_name) @php($profit = $profit_data->total_amount-($profit_data->tax_amount + $profit_data->supplier_cost)) @php ($profit_data->total_amount = ($profit_data->total_amount != null)? $profit_data->total_amount :1 ) @php($profit_in_percentage = ($profit > 0 && $profit != null) ? ($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) @endforeach
Sl Invoice Date Customer Net VAT Cost Profit Profit(%)
{{ $i }} {{ !empty($profit_data->invoice_no) ? $profit_data->invoice_no : '' }} {{ !empty($profit_data->invoice_date) ? date('d M Y', strtotime($profit_data->invoice_date)) : '' }} {{ $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) }}
                 
        {{ number_format($net_total, $decimal_point) }} {{ number_format($vat_total, $decimal_point) }} {{ number_format($cost_total, $decimal_point) }} {{ number_format($profit_total, $decimal_point) }}