Customer Wallet Transaction
@if(trim(@$_GET['find'])!='' && !empty($wallet_trx[0]->wallet->customer->name)) {!! $wallet_trx[0]->wallet->customer->name . ' / ' . $wallet_trx[0]->wallet->customer->email . ' / '.(number_format($wallet_trx[0]->wallet->nominal + 0, 0, ',', '.')) !!} @else   @endif
@if(!empty($wallet_trx))
{{-- --}} {{-- --}} @php $nilai_baru = $last_val = 0; @endphp @foreach($wallet_trx as $k=>$v) {{-- --}} @php if($k == 0) { $nilai_baru = $last_val = $v->saldo_akhir; } else { if(in_array($v->type, ['4', '7'])) { $last_val = $last_val + $v->nominal; } else { # 3 $last_val = $last_val - $v->nominal; } $nilai_baru = $last_val; } @endphp {{-- --}} @endforeach
ID Kode Trx. Wallet Tipe Trx. NominalSaldo AkhirHB Status Wkt. ApprovalWkt. Transaksi
{{ $v->id }} {{ $v->code }} {{ App\Models\Wallet_transaction_model::TYPE[$v->type] }} @if($v->type==1) {{ @$v->metode_pembayaran->label }} @elseif($v->type==2) {{ $v->customer_bank . ' / '.preg_replace('/^\d{6}/', 'xxxxxx', $v->customer_bank_nomor_rekening) }} @elseif(in_array($v->type, [3, 4, 5, 7])) @if(in_array($v->type, [3, 4])) {{ @$v->parent_trx->code }} @elseif(in_array($v->type, [5, 7])) {{ @$v->transaksi->code }} @endif @endif {{ $v->nominal }}{{ $v->saldo_akhir }}{{ $nilai_baru }} {{ App\Models\Wallet_transaction_model::STATUS[$v->status] }} @if(empty($v->date_approved)) - @else {{ date('d-m-Y H:i:s', strtotime($v->date_approved)) }} @endif{{ date('d-m-Y H:i:s', strtotime($v->created_at)) }}
{{ $wallet_trx->appends(['sdate' => @$_GET['sdate'], 'edate' => @$_GET['edate'], 'find' => @$_GET['find']])->links() }}
@endif
@include('includes.footer')