@foreach ($vouchers as $v) @php $recurrent_info = json_decode($v->recurrent_info); @endphp @endforeach
Sl Voucher No Voucher Type Amount Recurrent Type Recurrent Period
@if($v->getChildVouchers->count() > 0) {{ $v->getChildVouchers->last()->voucher_no ?? "" }}/{{ date('d-m-Y', strtotime($v->getChildVouchers->last()->date ?? "")) }} @else @endif {{ $loop->iteration }} {{ $v->voucher_no }} {{ getFilterVoucherType($v->type) }} {{ $v->transaction_amount }}{{ $recurrent_info->type == 1 ? 'Yearly' : 'Monthly' }} {{ date($recurrent_info->type == 1 ? 'M/d' : 'd', strtotime('1990-'. $recurrent_info->month .'-'. $recurrent_info->day)) }}
Total: {{ $vouchers->sum('transaction_amount') }}