@include('includes.sidebar')
Customer Wallet Transaction
@if(!empty($wallet_trx))
| ID |
Kode Trx. Wallet |
Tipe Trx. |
Nominal |
{{-- Saldo Akhir | --}}
HB |
Status |
Wkt. Approval |
{{-- Wkt. Transaksi | --}}
@php
$nilai_baru = $last_val = 0;
@endphp
@foreach($wallet_trx as $k=>$v)
| {{ $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 }} | --}}
@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
{{ $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)) }} | --}}
@endforeach
| {{ $wallet_trx->appends(['sdate' => @$_GET['sdate'], 'edate' => @$_GET['edate'], 'find' => @$_GET['find']])->links() }} |
@endif
@include('includes.footer')
@endsection
@section('scripts')
@endsection