@extends('layouts.main') @section('content')
| Date | ID | Name | Phone | Gender | Age | Type | Address | Volumes | Cost | Paid | Balance | Commision | @foreach($records as $record)
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ 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')) }} |