@extends('layouts.erp_theme_01') @section('content')

Orders Report

@if (session('err_msg'))
{{ session('err_msg') }}
@endif
@php $sub_total =0.00; @endphp @foreach($all_orders as $row) @php $sub_total += $row->actual_payable_amount ; @endphp @endforeach
Order # Customer Item Snapshot Order Date Item Cost Discount Amount Received Sub-total
Order # {{ $row->id }} {{ $row->cust_name }} @php $item_names = array() @endphp @foreach($order_items as $order_item) @if( $row->id == $order_item->order_id) @php $item_names[] = $order_item->item_name; @endphp @endif @endforeach {{ implode("," , $item_names) }} {{ date('d-M-Y', strtotime($row->order_date)) }} {{ $row->total_items_cost }} {{ $row->total_items_discount + $row->additional_discount }} {{ $row->actual_payable_amount }} {{ $sub_total }}
{{ csrf_field() }}
@endsection @section('script') @endsection