@csrf @method('PUT')
@if ($errors->has('kode_transaksi_bank'))
{{ $message }}
@endif
@if ($errors->has('tanggal'))
{{ $message }}
@enderror
@if ($errors->has('tipe'))
{{ $message }}
@endif
@if ($errors->has('kode_akun'))
{{ $message }}
@endif
Detail Transaksi Bank
{{-- @if (!is_null(old('kode_lawan'))) --}} @if (!is_null(old('kode_lawan'))) @php $loop = array(); foreach(old('kode_lawan') as $i => $val){ $loop[] = array( 'kode_lawan' => old('kode_lawan.'.$i), 'subtotal' => (float)old('subtotal.'.$i), 'keterangan' => old('keterangan.'.$i), ); } @endphp @else @php $loop = $transaksi_bank_detail; @endphp @endif @php $no = 0; $total = 0; @endphp @foreach ($loop as $n => $edit) @php $no++; $linkHapus = $no==1 ? false : true; $harga = 0; $fields = array( 'kode_lawan' => 'kode_lawan.'.$n, 'subtotal' => 'subtotal.'.$n, 'keterangan' => 'keterangan.'.$n, ); if(!is_null(old('kode_lawan'))){ $total = $total + $edit['subtotal']; $idDetail = old('id_detail.'.$n); } else{ $total = $total + $edit['subtotal']; $idDetail = $edit['id']; } @endphp @include('pages.transaksi-bank.form-edit-detail-transaksi-bank',['hapus' => $linkHapus, 'no' => $no, 'kode_lawan' => $kode_lawan]) {{-- @include('pages.transaksi-bank.form-detail-transaksi-bank'); --}} @endforeach
Total : {{number_format($total, 2, ',', '.')}}
@push('custom-scripts') @endpush