add WTD listing sementara untuk operasi

This commit is contained in:
Nur Izzati Zulkifli
2023-06-01 16:35:23 +08:00
parent 9393491293
commit fc819af518
9 changed files with 1201 additions and 10 deletions
@@ -784,6 +784,28 @@
</li>
</ul>
</li>
<li>
<div class="sidebar-menu-title">WTD (sementera)</div>
</li>
<li class="{{ (request()->is('wtd/')) ? 'active' : '' }}">
<a href="#wtdSubmenu" data-toggle="collapse" aria-expanded="false">
<div class="sidebar-menu">
<div class="sidebar-menu-main-title">
<span class="material-symbols-rounded sidebar-menu-item-main">
add_circle
</span>
Wang Tidak Dituntut
</div>
<span class="material-symbols-rounded sidebar-menu-item-expand">expand_more</span>
</div>
</a>
<ul class="list-unstyled collapse {{ (request()->is('wtd/*')) ? 'show' : '' }}" id="wtdSubmenu">
<li class="{{ (request()->is('wtd/listcawanganwtdproses/*') || request()->is('wtd/listcawanganwtdproses') ) ? 'active' : '' }}">
<a href="{{url('wtd/listcawanganwtdproses')}}">Dalam Proses</a>
</li>
</ul>
</li>
@endhasrole
@hasrole('jurulelong')
<li>
@@ -0,0 +1,80 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<div class="row ">
<div class="col">
<div class="card">
<div class="card-header header-style">
<div class="header-style-title">
Senarai Cawangan WTD Dalam Proses
</div>
</div>
<div class="card-body">
@if ($message = Session::get('success'))
<div class="alert alert-success">
{{ $message }}
</div>
@endif
<form id="exportform" action="" method="POST">
<input type="hidden" name="type" value="User">
<table class="table table-bordered table-xl" id="tablenotislelong" style="width:100%">
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>Cawangan</th>
<th>Bil.SAG</th>
<th>Jumlah (RM)</th>
<th>Senarai by SAG</th>
<th>Senarai by Customer</th>
</tr>
</thead>
<tbody>
@foreach ($cawangan_all as $bid)
<tr>
<td>{{$loop->iteration}}</td>
<td>
<b>{{ $bid->cawangan_info->caw_name}}</b>
</td>
<td><span class="badge badge-pill badge-info text-white" style="font-size:100%"> {{ $bid->bil[0]->bilangan}}</span></td>
<td align="right"> <b>{{ $bid->jumlahbaki}}</b></td>
<td align="center"><a class="btn btn-success btn-sm m-1" href="{{ route('wtd.listsagwtdproses',['kodcaw'=>$bid->cawangan_info->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a>
<a class="btn btn-warning btn-sm m-1" href="{{ route('wtd.pdflistsagwtdproses',['kodcaw'=>$bid->cawangan_info->caw_code]) }}" data-toggle="tooltip" data-placement="top" title="PDF"><i class="fas fa-download"></i></a>
<td align="center">
<a class="btn btn-success btn-sm m-1" href="{{ route('wtd.listsagwtdprosesbycust',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="PDF"><i class="fas fa-list"></i></a>
<a class="btn btn-warning btn-sm m-1" href="{{ route('wtd.pdflistsagwtdprosesbycust',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="PDF"><i class="fas fa-download"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
//Enable tooltips everywhere
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
var tablenotislelong = $('#tablenotislelong').DataTable({
order: [[0, 'asc']],
"info": false,
"lengthChange": false,
"pageLength": 99,
dom: 'Bfrtip',
});
</script>
@endsection
@@ -0,0 +1,130 @@
@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>
@foreach ($lelong_all as $lel)
{{-- {{dd($lel)}} --}}
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $lel->id }}"></td> --}}
<td>{{$loop->iteration}}</td>
<td align="left">{{$lel->cust_info->nama}}</td>
<td>{{$lel->nokp}}</td>
<td>{{$lel->norujukan}}</td>
<td> @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel->t_jual );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp</td>
<td align="right">{{number_format($lel->pinjaman, 2, '.', ',')}}</td>
<td align="right">{{number_format($lel->baki, 2, '.', ',')}}</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
@@ -0,0 +1,153 @@
@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
@@ -0,0 +1,226 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
/* text-align: left; */
}
#sim tr:nth-child(even){
/* border-bottom: 1px solid #ddd; */
}
#sim tr:hover {}
#sim th {
/* text-align: left; */
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
#sim2 {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim2 td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
/* text-align: left; */
}
#sim2 tr:nth-child(even){
/* border-bottom: 1px solid #ddd; */
}
#sim2 tr:hover {}
#sim2 th {
/* text-align: left; */
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
/* float: left; */
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
/* text-align: left; */
padding: 16px;
}
th{
/* text-align: left; */
padding: 16px;
/* text-align: left; */
table-layout:auto
color: black;
border-bottom: 1px solid #ddd;
/* background-color:gainsboro; */
}
tr:nth-child(even) {
/* background-color: #f2f2f2; */
}
</style>
<style>
/** Define now the real margins of every page in the PDF **/
body {
/* margin-top: 1cm; */
/* margin-left: 2cm; */
/* margin-right: 2cm; */
margin-bottom: 2cm;
}
/** Define the footer rules **/
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
height: 2cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
footer .pagenum:before {
content: counter(page);
}
</style>
<body>
<table width="100%" border="0" id="sim">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>SENARAI SAG WTD (DALAM PROSES)</b></u></td>
</tr>
</table>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim">
<thead>
<br>
<tr>
<td><b>Cawangan : {{$cawanganDetail->caw_name}}</b></td>
<td><b>Jumlah(RM): {{$jumlahbaki}} </b></td>
<td><b>Bilangan : {{$jumlahbil}}</b></td>
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" id="sim">
<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 LELONG</th>
<th>PEMBIAYAAN (RM)</th>
<th>BAKI (RM)</th>
</tr>
</thead>
<tbody>
@foreach ($lelong_all as $lel)
{{-- {{dd($lel)}} --}}
<tr>
{{-- <td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $lel->id }}"></td> --}}
<td>{{$loop->iteration}}</td>
<td>{{$lel->cust_info->nama}}</td>
<td align="center">{{$lel->nokp}}</td>
<td align="center" style='white-space:nowrap;'>{{$lel->norujukan}}</td>
<td align="center"> @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $lel->t_jual );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp</td>
<td align="right">{{number_format($lel->pinjaman, 2, '.', ',')}}</td>
<td align="right">{{number_format($lel->baki, 2, '.', ',')}}</td>
</tr>
@endforeach
<tr>
<td colspan="6"><b>Jumlah Keseluruhan</b></td>
<td align="right"><b>{{$jumlahbaki}}</b></td>
</tr>
</tbody>
</table>
@@ -0,0 +1,248 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
/* text-align: left; */
}
#sim tr:nth-child(even){
border-bottom: 1px solid #ddd;
}
#sim tr:hover {}
#sim th {
/* text-align: left; */
border: 0px solid;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
#sim2 {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim2 td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
/* text-align: left; */
}
#sim2 tr:nth-child(even){
/* border-bottom: 1px solid #ddd; */
}
#sim2 tr:hover {}
#sim2 th {
/* text-align: left; */
border: 1px solid;
/* table-layout:auto; */
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-left:-5px;
margin-right:-5px;
}
.column {
/* float: left; */
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
/* text-align: left; */
padding: 16px;
}
th{
/* text-align: left; */
padding: 16px;
/* text-align: left; */
table-layout:auto
color: black;
border-bottom: 1px solid #ddd;
/* background-color:gainsboro; */
}
tr:nth-child(even) {
/* background-color: #f2f2f2; */
}
</style>
<style>
/** Define now the real margins of every page in the PDF **/
body {
/* margin-top: 1cm; */
/* margin-left: 2cm; */
/* margin-right: 2cm; */
margin-bottom: 2cm;
}
/** Define the footer rules **/
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
height: 2cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
footer .pagenum:before {
content: counter(page);
}
</style>
<body>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim2">
<tr>
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
</tr>
<tr>
<td colspan="2"><u><b>SENARAI SAG WTD BY CUSTOMER (DALAM PROSES)</b></u></td>
</tr>
</table>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
<table cellspacing="" cellpadding="5" text-align="left" border="0" height="25" align="left" id="sim2">
<thead>
<br>
<tr>
<td><b>Cawangan : {{$cawanganDetail->caw_name}}</b></td>
<td><b>Jumlah(RM): {{$jumlahbaki}} </b></td>
{{-- <td><b>Bilangan : {{$jumlahbil}}</b></td> --}}
</thead>
</table>
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="1" width="100%" height="80" align="left" id="sim2">
<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 align='center' 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
<tr>
<td colspan="3"><b>Jumlah Keseluruhan</b></td>
<td align="right"><b>{{$jumlahbaki}}</b></td>
</tr>
</tbody>
</table>