@if($view_loading_order_sales_summaries)
S/N | Loading Order NO. | Client | Allocation Date | Allocation(s) | {{--Billing Amount | --}}# of Invoiced | Invoice # | Serial # | Invoice Date | Allocation Per Invoice | Invoiced Amount | Invoice Amount (Tsh) | Direct Expenses (TSh) | Margin (Tsh) | % Margin |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{$i}} | {{$view_loading_order_sales_summary->loading_order_id}} | {{$view_loading_order_sales_summary->client_code}} | {{\Carbon\Carbon::parse($view_loading_order_sales_summary->allocation_date)->format('d-m-Y')}} | {{$view_loading_order_sales_summary->truck_allocated}} | {{--*/ $allocations += $view_loading_order_sales_summary->truck_allocated /*--}} {{--*/ $truck_invoiced_total += $view_loading_order_sales_summary->truck_invoiced /*--}} {{--{{($view_loading_order_sales_summary->currency=='TSH') ? 'Tsh ' : '$ '}}{{number_format($view_loading_order_sales_summary->billing_amount)}} | --}}{{$view_loading_order_sales_summary->truck_invoiced}} | {{--*/ $i++ /*--}} @endif{{ \App\Model\Invoice::find($invoice->invoice_id)->invoice_number }} | {{$invoice->invoice_id}} | {{\Carbon\Carbon::parse($invoice->invoice_date)->format('d-m-Y')}} | {{$invoice->truck_invoiced}} | {{--*/ $allocation_per_invoiced_total += $invoice->truck_invoiced /*--}}{{($invoice->invoice_currency=='TSH') ? 'Tsh ' : '$ '}}{{number_format($invoice->invoiced_amount)}} | {{number_format($invoice->total_amount_in_tsh)}} | {{number_format($invoice->total_expense_amount)}} | {{number_format($invoice->profit_margin,2)}} | @if($invoice->total_amount_in_tsh){{number_format(($invoice->profit_margin/$invoice->total_amount_in_tsh)*100,2)}} @endif | {{--*/ $invoice_amount_total += $invoice->total_amount_in_tsh /*--}} {{--*/ $expenses_amount_total += $invoice->total_expense_amount /*--}}
TOTAL | {{$allocations}} | {{$truck_invoiced_total}} | {{$allocation_per_invoiced_total}} | {{number_format($invoice_amount_total)}} | {{number_format($expenses_amount_total)}} | {{number_format($invoice_amount_total-$expenses_amount_total,2)}} | @if($invoice_amount_total){{number_format((($invoice_amount_total-$expenses_amount_total)/$invoice_amount_total)*100,2)}} @endif |
NO DATA FOUND
@endif