@php $closing = $results['opening']; @endphp @foreach ($results['data'] as $i => $item) @php $closing += $item->dr_cr == 2 ? -$item->points : $item->points @endphp @endforeach
# {{__('obs.type')}} {{__('obs.customer_name')}} {{__('obs.inv_no')}} {{__('obs.inv_date') }} {{__('obs.by')}} {{__('obs.inv_amount')}} {{__('obs.point')}}
Opening {{ $results['opening'] }}
{{ ++$i }} {{ $item->transaction_type == 3 ? "Sales" : "Return" }} {{ $item->party }} {{ $item->invoice_no }} {{ date('d-m-Y h:i a', strtotime($item->date)) }} {{ $item->admin }} {{ number_format($item->net_total, 2) }} {{ ($item->dr_cr == 2 ? '-' : '').$item->points }}
Closign {{ $closing }}