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

{{$title}}

@foreach($records as $record) @endforeach
Date ID Name Phone Gender Age Type Address Volumes Cost Paid Balance Commision
{{ Carbon\Carbon::parse($record['customer']->created_at)->format("Y-m-d")}} {{"D".$record['customer']->id }} {{$record['customer']->name}} {{$record['customer']->phone_number}} {{$record['customer']->gender}} {{$record['customer']->age}} {{$record['customer']->customer_type}} {{$record['customer']->address}} {{$record['units']}} {{ $record['sales'] }} {{ $record['payments'] }} {{ $record['sales'] - $record['payments'] }} {{ $record['customer']->customer_type == 'Walkin' ? "":($record['units'] * env('COMISSION')) }}
@endsection