Files
lelong/resources/views/wtd/listsagwtdprosesbycust.blade.php
T
2023-06-01 16:35:23 +08:00

154 lines
6.7 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="col">
<div class="card">
<div class="card-header header-style">
<a href="javascript:window.history.go(-1);" class="header-style-icon">
<i class="fas fa-arrow-left"></i>
</a>
<div class="header-style-title">
Senarai SAG WTD : {{$cawanganDetail->caw_name}}
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@endif
<div class="col-3">
<div class="form-group row">
<label class="col-6 col-form-label text-left">Jumlah (RM)</label>
<div class="col-6">
<div class="input-group">
<input type="text" readonly class="form-control bg-light" value="{{$jumlahbaki}}">
</div>
</div>
</div>
</div>
<div class="col-3">
<div class="form-group row">
<label class="col-6 col-form-label text-left">Bil SAG WTD</label>
<div class="col-6">
<div class="input-group">
<input type="text" readonly class="form-control bg-light" value="{{$jumlahbil}}">
</div>
</div>
</div>
</div>
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table text-center table-bordered" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
{{-- <th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th> --}}
<th>Bil</th>
<th>NAMA</th>
<th>NOKP</th>
<th>NORUJUKAN</th>
<th>TARIKH JUAL</th>
<th>PEMBIAYAAN (RM)</th>
<th>BAKI (RM)</th>
</tr>
</thead>
<tbody>
{{-- {{dd($customers)}} --}}
@foreach ($customers as $customer)
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $lel->id }}"></td> --}}
<td>{{$loop->iteration}}</td>
<td style='word-wrap' align="left">{{$customer->nama}}</td>
<td style='word-wrap'>{{$customer->nokp}}</td>
<td style="white-space: nowrap;">@foreach($customer['gadai'] as $data)
{{$data->norujukan}}<br>
@endforeach
</td>
<td style="white-space: nowrap;">@foreach($customer['gadai'] as $data)
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $data->t_jual );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp<br>
@endforeach
</td>
<td align = 'right' style="white-space: nowrap;">
@php $jumpinjaman = 0;@endphp
@foreach($customer['gadai'] as $data)
@php
$jumpinjaman = $jumpinjaman + $data->pinjaman;
@endphp
{{$data->pinjaman}}<br>
@endforeach
<strong>{{ number_format($jumpinjaman, 2, '.', ',') }}</strong>
</td>
<td align = 'right' style="white-space: nowrap;">
@php $jumbaki = 0;@endphp
@foreach($customer['gadai'] as $data)
@php
$jumbaki = $jumbaki + $data->baki;
@endphp
{{$data->baki}}<br>
@endforeach
<strong>{{ number_format($jumbaki, 2, '.', ',') }}</strong>
</td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
order: [[0, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 9999999,
dom: 'Bfrtip',
// buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
// text: '<i class="fas fa-plus" id="test"></i>',
// titleAttr: 'Tambah Cawangan',
// action: function ( e, dt, node, config ) {
// // alert( 'Button activated' );
// // console.log('hye');
// $('#myModal').modal("show");
// $('#myModal').on('shown.bs.modal', function () {
// $('#rolename').trigger('focus')
// })
// }
// },
// {
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to CSV',
// text: '<i class="fas fa-download"></i>',
// action: function ( e, dt, node, config ) {
// $("#exportform").submit();
// }
// }
// ]
});
// $('.addcaw').tooltip();
// $('.export').tooltip();
// // $( '.dt-buttons').addClass('btn-group');
// $( '.addcaw').removeClass('dt-button');
// $( '.export').removeClass('dt-button');
</script>
@endsection