@php($totalBill=0) @php($totalVat=0) @php($totalDiscount=0) @php($totalReceived=0) @foreach($sales as $sale) @php($sl = $loop->iteration) @php($totalBill += $sale->product_cost) @php($totalVat += $sale->vat) @php($totalDiscount += $sale->discount) @php($received=($sale->product_cost+$sale->vat-$sale->discount)) @php($totalReceived += $received) @endforeach
Sl Date Customer Mobile Bill(Tk) Vat(Tk) Discount(Tk) Received(Tk) Option
{{ numberFormat($sl) }} {{ dateFormat($sale->created_at,'d/m/Y') }} {{ $sale->client_name }} {{ $sale->client_mobile }}{{ numberFormat($sale->product_cost,2) }}{{ numberFormat($sale->vat,2) }}{{ numberFormat($sale->discount,2) }}{{ numberFormat($received,2) }}
Total {{ numberFormat($totalBill,2) }} {{ numberFormat($totalVat,2) }} {{ numberFormat($totalDiscount,2) }} {{ numberFormat($totalReceived,2) }}