Merge branch 'new-pipi' into 'new-super'
New pipi See merge request online-sistem1/kaunter!156
This commit is contained in:
@@ -109,8 +109,10 @@ class AliranTunaiController extends Controller
|
||||
|
||||
$requestkodlaluan = Http::get(config('api.url').'/api/get/pengguna/'.$auth_user['cawangan'],["namateller" => Auth::user()->name ])->json();
|
||||
$advansur = Http::get(config('api.url').'/api/AnsuranByTarikh/'.$auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai'));
|
||||
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast'));
|
||||
}
|
||||
|
||||
public function alirantunaiGadai(Request $request,$teller){
|
||||
@@ -581,5 +583,30 @@ class AliranTunaiController extends Controller
|
||||
return response($updateTunai);
|
||||
}
|
||||
|
||||
public function LaporanAliranTunai($teller)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
|
||||
$alirantunai = Http::get(config('api.url') . '/api/GetCurrentTunai/' . $auth_user['cawangan'],['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$addtunai = Http::get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$teller = $auth_user['name'];
|
||||
|
||||
return view('aliran_tunai.laporan.laporanalirantunai',compact('tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail','addtunai','alirantunai','teller'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -349,13 +349,13 @@ class GadaianController extends Controller
|
||||
// if(sizeof($customers_info) != 0)
|
||||
// $customers_info = $customers_info[0];
|
||||
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
|
||||
// dd($wakil);
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
|
||||
if($penebusan['nowakil'])
|
||||
{
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
}
|
||||
|
||||
return view('print.resitansuran',compact('transaction','gadai','customers_info','wakil'));
|
||||
}
|
||||
|
||||
|
||||
@@ -317,16 +317,17 @@ class KhazanahController extends Controller
|
||||
$arraytuntutbaki = [];
|
||||
$arrayaddtunai = [];
|
||||
|
||||
$listUser = User::where([['cawangan', '=', $auth_user['cawangan']],['role_harian','=','teller']])->get();
|
||||
|
||||
foreach($listUser as $index1 => $ls)
|
||||
$teller = Http::get( config('api.url') .'/api/get/tellerwork/'. $auth_user['cawangan'])->json();
|
||||
|
||||
foreach($teller as $index1 => $ls)
|
||||
{
|
||||
$tunai = Http::get( config('api.url') .'/api/GetCurrentTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls->name])->json();
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls->name])->json();
|
||||
$tunai = Http::get( config('api.url') .'/api/GetCurrentTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
|
||||
$gadai_tebus = Http::get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'].'/teller/',['tarikh' => $harini->toDateString(),'teller' => $ls->name])->json();
|
||||
$tuntutbaki = Http::get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'].'/teller/',['teller' => $ls->name])->json();
|
||||
$addtunai = Http::get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan/',['kodlaluan' => $ls->name])->json();
|
||||
$gadai_tebus = Http::get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'].'/teller/',['tarikh' => $harini->toDateString(),'teller' => $ls['kodlaluan']])->json();
|
||||
$tuntutbaki = Http::get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'].'/teller/',['teller' => $ls['kodlaluan']])->json();
|
||||
$addtunai = Http::get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan/',['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
|
||||
array_push($arraygadaitebus,$gadai_tebus);
|
||||
array_push($arraytuntutbaki,$tuntutbaki);
|
||||
@@ -340,7 +341,7 @@ class KhazanahController extends Controller
|
||||
|
||||
$petibesi = Http::get(config('api.url') . '/api/VaultController/all/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('khazanah.alirantunai',compact('cawangan_info','api_url','arraytunaiharini','arraytunai','listUser','petibesi','arraygadaitebus','arraytuntutbaki','arrayaddtunai'));
|
||||
return view('khazanah.alirantunai',compact('cawangan_info','api_url','arraytunaiharini','arraytunai','teller','petibesi','arraygadaitebus','arraytuntutbaki','arrayaddtunai'));
|
||||
}
|
||||
|
||||
|
||||
@@ -2997,4 +2998,27 @@ class KhazanahController extends Controller
|
||||
return view('print.laporan_upah', compact('advansur','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
|
||||
public function lelongan($norujukan)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$gadaidetail = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
|
||||
$noic = $gadaidetail[0][0]['nokp'];
|
||||
$customerdetail = Http::get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
$nama = $customerdetail['nama'];
|
||||
|
||||
$lelong = Http::get(config('api.url') . '/api/lelong/cawangan/'. $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||
|
||||
if(sizeof($lelong) > 0)
|
||||
{
|
||||
$lelong = $lelong[0];
|
||||
}
|
||||
|
||||
$gadai = $gadaidetail[0][0];
|
||||
|
||||
return view('lelongan.index-khazanah',compact('cawangan_info','api_url','gadai','nama','lelong'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,13 @@ class LelongController extends Controller
|
||||
|
||||
$lelong=Http::get(config('api.url').'/api/TuntutBaki/resit/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong'));
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $lelong['nowakil'])->json();
|
||||
|
||||
// dd($wakil);
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong','wakil'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="TAMBAH MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="tambahmodal" onclick="openuptambahdanserah(this)">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="TAMBAH MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="tambahmodal" onclick="serahankemaskini(this)">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="SERAHAN MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="serahanmodal" onclick="serahankemaskini(this)">
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,8 +125,10 @@
|
||||
|
||||
|
||||
<button type="button" onclick="periksaalirantunai();" class="btn btn-primary float-right">Kemaskini</button>
|
||||
<button type="button" onclick="cetaklaporanalirantunai()" class="btn btn-primary float-right mr-1">Cetak</button>
|
||||
<nav>
|
||||
<div class="nav nav-tabs mb-4" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link" id="nav-rekod-tab" data-toggle="tab" href="#nav-rekod" role="tab" aria-controls="nav-rekod" aria-selected="false">Rekod</a>
|
||||
<a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Gadai / Tebus</a>
|
||||
<a class="nav-item nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Tuntut Baki</a>
|
||||
@@ -134,8 +136,58 @@
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-pane fade" id="nav-rekod" role="tabpanel" aria-labelledby="nav-rekod-tab">
|
||||
|
||||
{{-- <div class="row justify-content-end">
|
||||
<div class="col-3 text-right" style="margin-bottom:-20px;">
|
||||
<span class="font-weight-bold">Tarikh:</span>
|
||||
<input type="text" class="col-9" id="tarikhaddtunai" name="tarikhaddtunai" autocomplete="off" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<br> --}}
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tablerekod">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Tarikh</th>
|
||||
<th>C/F</th>
|
||||
<th>Pendahuluan</th>
|
||||
<th>Serahan</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Penebusan</th>
|
||||
<th>B/F</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($tunaipast) || is_array($tunaipast))
|
||||
@foreach($tunaipast as $tp)
|
||||
<tr>
|
||||
<td>{{ $Tarikh = date("d-m-Y", strtotime($tp['tarikh'])) }}</td>
|
||||
<td>{{ number_format($tp['bakiawal'],2) }}</td>
|
||||
<td>{{ number_format($tp['tambah'],2) }}</td>
|
||||
<td>{{ number_format($tp['kurang'],2) }}</td>
|
||||
<td>{{ number_format($tp['keluar'],2) }}</td>
|
||||
<td>{{ number_format($tp['masuk'],2) }}</td>
|
||||
<td>{{ number_format($tp['baki'],2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||
|
||||
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-3 text-right" style="margin-bottom:-20px;">
|
||||
<span class="font-weight-bold">Tarikh:</span>
|
||||
<input type="text" class="col-9" id="tarikhaddtunai" name="tarikhaddtunai" autocomplete="off" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@@ -274,9 +326,27 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
|
||||
|
||||
var tableaddtunai = $('#tableaddtunai').DataTable({
|
||||
// "scrollX": true
|
||||
});
|
||||
"bPaginate": true,
|
||||
"bLengthChange": false,
|
||||
"bFilter": false,
|
||||
"bInfo": true
|
||||
});
|
||||
|
||||
var today = new Date();
|
||||
$('#tarikhaddtunai').datepicker({
|
||||
format: 'dd-mm-yyyy',
|
||||
autoclose:true,
|
||||
endDate: "today",
|
||||
maxDate: today
|
||||
});
|
||||
|
||||
var tablerekod = $('#tablerekod').DataTable({
|
||||
// "scrollX": true
|
||||
});
|
||||
|
||||
var tablegadaitebus = $('#tablegadaitebus').DataTable({
|
||||
// "scrollX": true
|
||||
@@ -464,6 +534,49 @@
|
||||
});
|
||||
}
|
||||
|
||||
function cetaklaporanalirantunai()
|
||||
{
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
let urlroute = '{{ route("laporan.alirantunai", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', teller);
|
||||
|
||||
window.open(urlroute, '_blank');
|
||||
|
||||
}
|
||||
|
||||
$('#tarikhaddtunai').change(function(){
|
||||
var input_date = this.value;
|
||||
var split_date = input_date.split('-');
|
||||
var today_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/getAddTunaiDate/' + kodcaw,
|
||||
data:{ 'tarikh' : today_date },
|
||||
success: function(addtunai){
|
||||
gadaitable(addtunai);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function gadaitable(data){
|
||||
var counter = 1;
|
||||
|
||||
tableaddtunai.clear().draw();
|
||||
$.each(data,function(index,addtunai){
|
||||
|
||||
tableaddtunai.row.add([
|
||||
counter,
|
||||
addtunai['tarikh'],
|
||||
formatter.format(addtunai['tambah']),
|
||||
formatter.format(addtunai['kurang']),
|
||||
addtunai['nota']
|
||||
]).draw();
|
||||
|
||||
counter = counter + 1;
|
||||
});
|
||||
}
|
||||
|
||||
let pusherenv = "{{ env('PUSHER_APP_KEY') }}";
|
||||
let laporanroute = "{{ route('laporan.serahanteller') }}";
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.header{
|
||||
font-size:12px;
|
||||
font-weight: bold;
|
||||
margin-left:40px;
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
background: white;
|
||||
}
|
||||
|
||||
page {
|
||||
background: white;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 0.5cm;
|
||||
/* box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); */
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
width: 21cm;
|
||||
/* height: 29.7cm; */
|
||||
}
|
||||
|
||||
page[size="A4"][layout="landscape"] {
|
||||
width: 29.7cm;
|
||||
height: 21cm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body, page {
|
||||
margin: 0;
|
||||
box-shadow: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.middleheader{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
width: 25%;
|
||||
border: 2px solid gray;
|
||||
border-radius: 15px;
|
||||
padding: 5px 10px 10px 30px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-left:40px;
|
||||
}
|
||||
|
||||
#header td, #customer th {
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* #header tr:hover {
|
||||
background-color: #ddd;
|
||||
} */
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.statements{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.statements th{
|
||||
font-size:14px;
|
||||
background-color: #f9ca24;
|
||||
border:1px solid gray;
|
||||
color:black;
|
||||
padding:4px 10px 4px 10px;
|
||||
}
|
||||
|
||||
.statements td{
|
||||
border:1px solid gray;
|
||||
padding:4px 4px 4px 4px;
|
||||
|
||||
}
|
||||
|
||||
.center{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
color: white;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body onload="window.print()">
|
||||
<page size="A4">
|
||||
<h6 class="header">SULIT DAN PERSENDIRIAN</h6>
|
||||
<table id="header">
|
||||
<tr>
|
||||
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/icon_pkb.png') }}" style="width:70px"></img></th>
|
||||
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h6 class="middleheader">PENYATA ALIRAN TUNAI : {{ $teller }}</h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="container" style="display:inline-block; margin-left:20px;">
|
||||
<h3>Baki Awal</h3>
|
||||
<span>RM {{ number_format($alirantunai['bakiawal'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Pendahuluan</h3>
|
||||
<span>RM {{ number_format($alirantunai['tambah'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Penebusan</h3>
|
||||
<span>RM {{ number_format($alirantunai['masuk'],2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:20px;">
|
||||
<div class="container" style="display:inline-block; margin-left:20px;">
|
||||
<h3>Baki Tunai Semasa</h3>
|
||||
<span>RM {{ number_format($alirantunai['baki'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Serahan</h3>
|
||||
<span>RM {{ number_format($alirantunai['kurang'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Gadaian</h3>
|
||||
<span>RM {{ number_format($alirantunai['keluar'],2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6 class="middleheader" style="margin-bottom:-5px;">KEMASUKAN TUNAI</h6>
|
||||
<br>
|
||||
|
||||
<table class="statements">
|
||||
<tr>
|
||||
<th>TARIKH</th>
|
||||
<th>DEBIT (RM)</th>
|
||||
<th>KREDIT (RM)</th>
|
||||
<th>NOTA</th>
|
||||
</tr>
|
||||
@php $totaltambah = 0; $totalkurang = 0; @endphp
|
||||
@foreach($addtunai as $index=>$ad)
|
||||
@php $totaltambah += $ad['tambah']; $totalkurang += $ad['kurang']; @endphp
|
||||
<tr style="text-align:center;">
|
||||
<td>{{ $ad['tarikh'] }}</td>
|
||||
<td>{{ number_format($ad['tambah'],2) }}</td>
|
||||
<td>{{ number_format($ad['kurang'],2) }}</td>
|
||||
<td>{{ $ad['nota'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr style="text-align:center;">
|
||||
<td style="font-weight:bold;">JUMLAH</td>
|
||||
<td>{{ number_format($totaltambah,2) }}</td>
|
||||
<td>{{ number_format($totalkurang,2) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</page>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -92,7 +92,7 @@
|
||||
<b>No Telefon</b>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="cust_telefon" id="cust_telefon" readonly value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : 'NIL' }}">
|
||||
<input type="text" class="form-control" name="cust_telefon" id="cust_telefon" readonly value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<a class="nav-item nav-link" id="nav-xtawarruq-tab" data-toggle="tab" href="#nav-xtawarruq" role="tab" aria-controls="nav-xtawarruq" aria-selected="false">Ar-Rahn</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-content" id="navtawarruqdannottawarruq">
|
||||
<div class="tab-pane fade show active" id="nav-tawarruq" role="tabpanel" aria-labelledby="nav-tawarruq-tab">
|
||||
<table class="table table-striped table-hover" id="myTable">
|
||||
<thead class="thead-dark">
|
||||
@@ -205,6 +205,7 @@
|
||||
<th>Jum Tuntut/Bayar</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Cetak</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -264,7 +265,7 @@
|
||||
No Telefon 1
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : 'NIL' }}" class='form-control'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,7 +274,7 @@
|
||||
No Telefon 2
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : 'NIL' }}" class='form-control'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -750,17 +751,34 @@
|
||||
}else if(jenistebus == "lelong"){
|
||||
var urlroute = '{{ route("lelongan", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong'])
|
||||
]).draw();
|
||||
|
||||
if(gadai_detail['trkhtuntut'] == null){
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong']),
|
||||
'<button class="btn btn-info" disabled>Cetak</button>'
|
||||
]).draw();
|
||||
}else{
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong']),
|
||||
'<button class="btn btn-info" onclick="cetaktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] +'>Cetak</button>'
|
||||
]).draw();
|
||||
}
|
||||
}
|
||||
counter = counter + 1;
|
||||
}
|
||||
@@ -768,6 +786,19 @@
|
||||
});
|
||||
}
|
||||
|
||||
function cetaktuntutbaki(e)
|
||||
{
|
||||
let norujukan = $(e).data('norujukan');
|
||||
|
||||
console.log(norujukan);
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
|
||||
window.open(urlroute, '_blank');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function checktuntutbaki(e)
|
||||
{
|
||||
let tarikhtuntut = $(e).data('tarikhtuntut');
|
||||
@@ -1552,8 +1583,13 @@
|
||||
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
|
||||
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
|
||||
|
||||
var id = $('.tab-content .active').attr('id');
|
||||
if(id == "nav-tawarruq-tab") {
|
||||
// var id = $('.tab-content .active').attr('id');
|
||||
|
||||
var activeTab = $("#navtawarruqdannottawarruq.tab-content").find(".active");
|
||||
var id = activeTab.attr('id');
|
||||
|
||||
console.log(id);
|
||||
if(id == "nav-tawarruq") {
|
||||
if(+harini !== +tarikhgadai2){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
@@ -1694,10 +1730,12 @@
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
// return false;
|
||||
|
||||
}else if($("input[name='options']:checked").val() == 'sudah_tebus'){
|
||||
let test = $('input[name="sudahtebus"]:checked').closest('tr').children('td:eq(2)').text();
|
||||
@@ -1926,6 +1964,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#poskod').change(function(){
|
||||
var poskod = this.value;
|
||||
console.log(poskod);
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url:api_url+'/api/poskod/'+poskod,
|
||||
success:function(poskod_detail){
|
||||
var koddaerah = poskod_detail['koddaerah'];
|
||||
var kodnegeri = poskod_detail['kodnegeri'];
|
||||
$.ajax({
|
||||
url:api_url+'/api/negeri/'+kodnegeri,
|
||||
method:'GET',
|
||||
success:function(negeri){
|
||||
console.log(negeri);
|
||||
$('#kodnegeri').val(negeri['negeri']);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:api_url+'/api/daerah/'+koddaerah,
|
||||
method:'GET',
|
||||
success:function(daerah){
|
||||
$('#koddaerah').val(daerah['namadaerah']);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function kemaskinifunc()
|
||||
{
|
||||
$('#btnkemaskini').addClass('btn-danger');
|
||||
@@ -1940,6 +2008,8 @@
|
||||
$('#kodbank').attr('disabled', false);
|
||||
$('#noakaun').attr('readonly', false);
|
||||
$('#nota').attr('readonly', false);
|
||||
$('#alamat').attr('readonly', false);
|
||||
$('#poskod').attr('readonly', false);
|
||||
|
||||
}
|
||||
|
||||
@@ -1959,6 +2029,8 @@
|
||||
$('#kodbank').attr('disabled', true);
|
||||
$('#noakaun').attr('readonly', true);
|
||||
$('#nota').attr('readonly', true);
|
||||
$('#alamat').attr('readonly', true);
|
||||
$('#poskod').attr('readonly', true);
|
||||
}
|
||||
|
||||
$("#kemaskiniform").submit(function(event) {
|
||||
@@ -1970,6 +2042,8 @@
|
||||
var kodbank = $('#kodbank').val();
|
||||
var noakaun = $('#noakaun').val();
|
||||
var nota = $('#nota').val();
|
||||
var alamat = $('#alamat').val();
|
||||
var poskod = $('#poskod').val();
|
||||
|
||||
$.ajax({
|
||||
method:"put",
|
||||
@@ -1979,7 +2053,9 @@
|
||||
"telefon2": telefon2,
|
||||
"kodbank":kodbank,
|
||||
"noakaun":noakaun,
|
||||
'nota':nota
|
||||
'nota':nota,
|
||||
'alamat':alamat,
|
||||
'poskod':poskod
|
||||
},
|
||||
success: function(success){
|
||||
$('#btnsave').css('display','none');
|
||||
@@ -2044,6 +2120,8 @@
|
||||
$('#noakaun').attr('readonly', true);
|
||||
$('#kodbank').attr('disabled', true);
|
||||
$('#nota').attr('readonly', true);
|
||||
$('#alamat').attr('readonly', true);
|
||||
$('#poskod').attr('readonly', true);
|
||||
|
||||
$('#kemaskiniform').trigger('submit');
|
||||
}
|
||||
|
||||
@@ -265,6 +265,8 @@
|
||||
}
|
||||
|
||||
window.onload = timedRefresh(100000);
|
||||
//Pusher
|
||||
|
||||
var table_gadaian_semasa = $('#table-gadaian-semasa').DataTable({
|
||||
"ordering": true
|
||||
});
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Aliran Tunai</li>
|
||||
</ol>
|
||||
|
||||
<button type="button" class="btn btn-danger float-right mr-3" data-toggle="modal" data-target="#exampleModalCenter">
|
||||
Peti Besi
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
{{-- {{ dd($tunai) }} --}}
|
||||
@@ -92,9 +96,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-danger float-right mr-3" data-toggle="modal" data-target="#exampleModalCenter">
|
||||
Peti Besi
|
||||
</button>
|
||||
|
||||
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
@@ -106,29 +107,30 @@
|
||||
{{-- {{ dd($arraytunai) }} --}}
|
||||
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
<script> let listu = [];</script>
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
<script> listu.push("{{ $ls->id }}"); </script>
|
||||
|
||||
@if($index1 == 0)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-{{ $ls->id }}" role="tab" aria-controls="pills-home" aria-selected="true">{{ $ls->name }}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-{{ $ls->id }}" role="tab" aria-controls="pills-profile" aria-selected="false">{{ $ls->name }}</a>
|
||||
</li>
|
||||
@endif
|
||||
<script> let listu = [];</script>
|
||||
@foreach($teller as $index1=>$ls)
|
||||
<script> listu.push("{{ $loop->iteration }}"); </script>
|
||||
|
||||
@if($index1 == 0)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-{{ $loop->iteration }}" role="tab" aria-controls="pills-home" aria-selected="true">{{ $ls['kodlaluan'] }}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-{{ $loop->iteration }}" role="tab" aria-controls="pills-profile" aria-selected="false">{{ $ls['kodlaluan'] }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
@foreach($teller as $index1=>$ls)
|
||||
|
||||
@if($index1 == 0)
|
||||
<div class="tab-pane fade show active" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
<div class="tab-pane fade show active" id="pills-{{ $loop->iteration }}" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
|
||||
<fieldset class="border p-2">
|
||||
<legend class="w-auto">Hari Ini</legend>
|
||||
@@ -220,26 +222,26 @@
|
||||
|
||||
<ul class="nav nav-tabs mt-4" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $ls->id }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $loop->iteration }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
|
||||
|
||||
|
||||
<table class='table table-striped table-hover' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<table class='table table-striped table-hover' id='table-{{ $loop->iteration }}' style="width:100%;">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -270,7 +272,7 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
@@ -279,7 +281,7 @@
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai-{{ $ls->id }}">
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -305,7 +307,7 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
@@ -314,7 +316,7 @@
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $ls->id }}">
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -345,7 +347,7 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
@@ -354,7 +356,7 @@
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -392,7 +394,7 @@
|
||||
|
||||
</div>
|
||||
@else
|
||||
<div class="tab-pane fade" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-profile-tab">
|
||||
<div class="tab-pane fade" id="pills-{{ $loop->iteration }}" role="tabpanel" aria-labelledby="pills-profile-tab">
|
||||
|
||||
<fieldset class="border p-2">
|
||||
<legend class="w-auto">Hari Ini</legend>
|
||||
@@ -485,27 +487,27 @@
|
||||
|
||||
<ul class="nav nav-tabs mt-4" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $ls->id }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $loop->iteration }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
|
||||
|
||||
|
||||
<table class='table table-striped table-hover' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<table class='table table-striped table-hover' id='table-{{ $loop->iteration }}' style="width:100%;">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -536,7 +538,7 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
@@ -547,7 +549,7 @@
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tableaddtunai-{{ $ls->id }}">
|
||||
<table class="table text-center table-striped table-hover" id="tableaddtunai-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -574,7 +576,7 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
@@ -584,7 +586,7 @@
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $ls->id }}">
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -615,7 +617,7 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
@@ -625,7 +627,7 @@
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['gadai'][0]['jumlahpinjaman'],2) : "0.00" }}</h3>
|
||||
|
||||
<p style="font-weight:bold;">Gadai Hari Ini</p>
|
||||
<p style="font-weight:bold;">Pembiayaan Hari Ini</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
@@ -171,7 +171,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($dashboard[0]['variasi']) ? number_format((float)$dashboard[0]['variasi'],2) : "0.00" }}</h3>
|
||||
|
||||
<p>Varian</p>
|
||||
<p>Varians</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($komuditicheck) ? number_format($komuditicheck['unit_komuditi'],2) : '0.00' }}</h3>
|
||||
|
||||
<p>Baki Komuditi</p>
|
||||
<p>Baki Komoditi</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
let tarikhtuntut = $(e).data('tarikhtuntut');
|
||||
let norujukan = $(e).data('norujukan');
|
||||
|
||||
var urlroute = '{{ route("lelongan", ":id") }}';
|
||||
var urlroute = '{{ route("lelongan.khazanah", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
|
||||
if (tarikhtuntut == null)
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.agingbulanan')}}" class="btn btn-danger btn-lg btn-block mb-3">Aging Bulan</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <div class="row">
|
||||
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Pemodal</a>
|
||||
</div> --}}
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.tuntutbaki')}}" class="btn btn-dark btn-lg btn-block mb-3">Tuntut Baki</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <a href="{{route('laporan.stokauditbersih')}}" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Bersih </a> --}}
|
||||
<a href="#" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Bersih </a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <a href="{{ route('laporan.stokauditdetails')}}" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Details</a> --}}
|
||||
<a href="#" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Details</a>
|
||||
@@ -65,10 +64,7 @@
|
||||
<div class="row">
|
||||
<a href="{{ route('laporan.datalejer_am') }}" class="btn btn-dark btn-lg btn-block mb-3">Lejer Am</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.tuntutbaki')}}" class="btn btn-dark btn-lg btn-block mb-3">Tuntut Baki</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-3 mx-1">
|
||||
<div class="row">
|
||||
|
||||
@@ -20,6 +20,17 @@
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@php
|
||||
$dt = \Carbon\Carbon::now();
|
||||
|
||||
$date = $dt->format('Y-m-d');
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="col-12 d-flex justify-content-end">
|
||||
<button class="btn btn-danger fas fa-trash-alt" onclick="togglepadam();"></button>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 mx-auto">
|
||||
{{-- @php $date = date('yy-m-d'); @endphp --}}
|
||||
<table class='table table-hover table-striped table-bordered' id='table-pendahuluanserahan' style="width: 100%;">
|
||||
@@ -29,7 +40,7 @@
|
||||
<th>Description</th>
|
||||
<th>Pendahuluan (RM)</th>
|
||||
<th>Serahan (RM)</th>
|
||||
{{-- <th>Tindakan</th> --}}
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -39,7 +50,7 @@
|
||||
<td>{{ $gldetail['descpt'] }}</td>
|
||||
<td>{{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }}</td>
|
||||
<td>{{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }}</td>
|
||||
{{-- @if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-trash-alt"></button></td>@else<td></td> @endif --}}
|
||||
@if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-minus-square"></button></td>@else<td></td> @endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -62,7 +73,14 @@
|
||||
|
||||
var tablependahuluanserahan = $('#table-pendahuluanserahan').DataTable({
|
||||
"scrollX": true,
|
||||
"order": [[ 0, "desc" ]]
|
||||
"order": [[ 0, "desc" ]],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 4 ],
|
||||
"visible": false,
|
||||
"searchable": false
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
let api = "{{ config('api.url') }}";
|
||||
@@ -112,6 +130,15 @@
|
||||
|
||||
});
|
||||
|
||||
function togglepadam()
|
||||
{
|
||||
event.preventDefault();
|
||||
|
||||
var column = tablependahuluanserahan.column(4);
|
||||
|
||||
column.visible(!column.visible());
|
||||
}
|
||||
|
||||
function deletependser()
|
||||
{
|
||||
Swal.fire({
|
||||
@@ -124,14 +151,14 @@
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Teruskan!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
});
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validateformat(evt)
|
||||
|
||||
@@ -68,6 +68,17 @@
|
||||
|
||||
</head>
|
||||
<body onload="startTime()" style="background-color:#BAC1C9;">
|
||||
|
||||
@php
|
||||
$auth_user = Auth::user();
|
||||
|
||||
if($auth_user['role_harian'] == 'teller')
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$gadai = Http::get( config('api.url') .'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'])->json();
|
||||
$listserah = Http::get(config('api.url').'/api/listSerahMarhunController/'.$auth_user['cawangan'])->json();
|
||||
}
|
||||
@endphp
|
||||
<div id="app">
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
|
||||
<div class="container">
|
||||
@@ -268,10 +279,29 @@
|
||||
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
@php
|
||||
if($auth_user['role_harian'] == 'teller')
|
||||
{
|
||||
echo '<div class="col-3">
|
||||
<div class="col-12 pl-5">
|
||||
<div class="row">
|
||||
<h5 class="pr-3">G : <span class="text-success">' . count($gadai) . '</span></h5>
|
||||
<h5>T : <span class="text-danger">' . count($listserah) . '</span></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
@endphp
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<main class="py-4">
|
||||
|
||||
@@ -0,0 +1,744 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('modal.wakil')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<h3 class="text-center text-uppercase mb-5">LELONGAN</h3>
|
||||
<div class="form-group row col-12">
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NAMA
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $nama }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO PELANGGGAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['nopelanggan'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO RUJUKAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="norujukan" value="{{ $gadai['norujukan'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO KAD PENGENALAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['nokp'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="form-group row">
|
||||
<div class="col-3">
|
||||
JENIS LELONG
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" disabled>
|
||||
<label class="custom-control-label" style="color:green;" for="radbakilelong" >Baki Lelong</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" disabled>
|
||||
<label class="custom-control-label" style="color:red;" for="radrugilelong" >Rugi Lelong</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-group row">
|
||||
<div class="col-2">
|
||||
WAKIL
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" name="wakil" id="wakiltxt" disabled/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary" id="caribtn" disabled>Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="col-12 form-group row">
|
||||
<div class="col-6" id="divbakihargajualan">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
TARIKH
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $lelong['t_lelong'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO SIRI
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $lelong['sirilel'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
HARGA JUAL (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="hargajual" value="{{ number_format($lelong['hargajual'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
PEMBIAYAAN (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="pembiayaan" value="{{ number_format($lelong['pinjaman'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
BATCH LELONG
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="batch" value="{{ $lelong['batchno'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
KEUNTUNGAN (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="keuntungan" value="{{ number_format($lelong['bakiupah'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
CAJ LELONG (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="cajlelong" value="{{ number_format($lelong['cajlelong'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
JUMLAH (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="jumlah" value="{{ number_format($lelong['baki'],2) }}" id="jumlah" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<input type="button" class="float-right btn btn-danger mr-2" value="BATAL" onclick="window.location.replace('{{ route('customer_info') }}')">
|
||||
<input type="button" id="terima_transaksi" class="float-right btn btn-primary mr-2" value="TERIMA" onclick="bayarantuntubaki()" disabled>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let jumlahbaki = parseFloat($('#jumlah').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
if(jumlahbaki > 0)
|
||||
{
|
||||
$("#radbakilelong").prop("checked", true);
|
||||
$("#radrugilelong").prop("checked", false);
|
||||
}else{
|
||||
$("#radbakilelong").prop("checked", false);
|
||||
$("#radrugilelong").prop("checked", true);
|
||||
}
|
||||
});
|
||||
|
||||
var api = '<?php echo $api_url ?>';
|
||||
let nw = 0;
|
||||
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
|
||||
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
wakil = wakil.replace(patternregex,"").toUpperCase();
|
||||
|
||||
if(wakil.length <= 12)
|
||||
{
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.search') }}",
|
||||
data:{
|
||||
'wakil' : wakil
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 'no-data')
|
||||
{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: 'Daftar',
|
||||
icon: 'info',
|
||||
title: 'Maklumat anda tiada dalam senarai wakil! Tekan button okay untuk mendaftar!'
|
||||
}).then(function(){
|
||||
daftarfunction(wakil);
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Maklumat Anda Berjaya Direkodkan!',
|
||||
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
|
||||
});
|
||||
nw = data.nowakil;
|
||||
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$(e).html("Ubah");
|
||||
$(e).attr("onclick","ubahwakil(this)");
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
titleText: 'Kad Pengenalan dan Passport',
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function daftarwakil()
|
||||
{
|
||||
let nopelanggan = $('#nopelangganwakil').val();
|
||||
let nowakil = $('#nowakil').val();
|
||||
let nama = $('#namawakil').val();
|
||||
let hubungan = $('#slthubungan').val();
|
||||
let alamat = $('#alamatwakil').val();
|
||||
let telefon = $('#notelwakil').val();
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
let boolnowakil = false;let boolnama = false;let boolalamat = false;let booltelefon = false;let boolnota = false;let boolnokp = false;
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
$("[name='errornowakil']").show();
|
||||
$("[name='errornowakil']").text("*No wakil tidak dijana lagi!");
|
||||
$("[name='nowakil']").addClass('is-invalid');
|
||||
|
||||
boolnowakil = true;
|
||||
}else{
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
boolnowakil = false;
|
||||
}
|
||||
|
||||
if(nama === null || nama === '')
|
||||
{
|
||||
$("[name='errornamawakil']").show();
|
||||
$("[name='errornamawakil']").text("*Isikan nama dalam kotak!");
|
||||
$("[name='namawakil']").addClass('is-invalid');
|
||||
|
||||
boolnama = true;
|
||||
}else{
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnama = false;
|
||||
}
|
||||
|
||||
if(alamat === null || alamat === '')
|
||||
{
|
||||
$("[name='erroralamatwakil']").show();
|
||||
$("[name='erroralamatwakil']").text("*Isikan alamat dalam kotak!");
|
||||
$("[name='alamatwakil']").addClass('is-invalid');
|
||||
|
||||
boolalamat = true;
|
||||
}else{
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
boolalamat = false;
|
||||
}
|
||||
|
||||
if(telefon === null || telefon === '')
|
||||
{
|
||||
$("[name='errornotelwakil']").show();
|
||||
$("[name='errornotelwakil']").text("*Isikan telefon dalam kotak!");
|
||||
$("[name='notelwakil']").addClass('is-invalid');
|
||||
|
||||
booltelefon = true;
|
||||
}else{
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
booltelefon = false;
|
||||
}
|
||||
|
||||
if(nota === null || nota === '')
|
||||
{
|
||||
$("[name='errornotawakil']").show();
|
||||
$("[name='errornotawakil']").text("*Isikan nota dalam kotak!");
|
||||
$("[name='notawakil']").addClass('is-invalid');
|
||||
|
||||
boolnota = true;
|
||||
}else{
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnota = false;
|
||||
}
|
||||
|
||||
if(nokp === null || nokp === '')
|
||||
{
|
||||
$("[name='errornokpwakil']").show();
|
||||
$("[name='errornokpwakil']").text("*Isikan nokp dalam kotak!");
|
||||
$("[name='nokpwakil']").addClass('is-invalid');
|
||||
|
||||
boolnokp = true;
|
||||
}else{
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
boolnokp = false;
|
||||
}
|
||||
|
||||
|
||||
if(boolnowakil == false && boolnama == false && boolalamat == false && booltelefon == false && boolnota == false && boolnokp == false)
|
||||
{
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('#WakilModal').on('hidden.bs.modal', function (e) {
|
||||
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
$(this).find(".invalid-feedback").hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function daftarfunction(id)
|
||||
{
|
||||
let kodcaw = "{{ Auth::user()->cawangan }}";
|
||||
|
||||
$('#nokpwakil').val(id);
|
||||
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.caricustomer') }}",
|
||||
url: api + '/api/customers/' + id,
|
||||
// data:{ "icno" : id },
|
||||
success:function(data){
|
||||
|
||||
$('#namawakil').val('');
|
||||
$('#alamatwakil').val('');
|
||||
$('#notelwakil').val('');
|
||||
|
||||
var size = Object.keys(data).length;
|
||||
|
||||
if(size > 0)
|
||||
{
|
||||
$('#namawakil').val(data['nama']);
|
||||
$('#alamatwakil').val(data['alamat1']);
|
||||
$('#notelwakil').val(data['telefon']);
|
||||
$('#nopelangganwakil').val(data['nopelanggan']);
|
||||
}
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.first') }}",
|
||||
url: api + '/api/firstwakil/' + kodcaw,
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
|
||||
Swal.close();
|
||||
$('#WakilModal').modal();
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
Swal.close();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Punyai Ralat dalam API wakil...',
|
||||
icon: 'error'
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ubahwakil(e)
|
||||
{
|
||||
$('#wakiltxt').prop( "disabled", false);
|
||||
$(e).html("Cari");
|
||||
$(e).attr( "onclick", "wakilfunction(this)");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function bayarantuntubaki()
|
||||
{
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = nw;
|
||||
let jenis = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
let cajlain = 0.00; let cajlelong = $('#cajlelong').val();
|
||||
let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,"");
|
||||
|
||||
$.ajax({
|
||||
method: 'put',
|
||||
url: "{{ route('lelong.tuntutbaki') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
'batchno' : batchno,
|
||||
'jenis' : jenis,
|
||||
'norujukan' : norujukan,
|
||||
'teller' : teller,
|
||||
'bakipjm' : bakipjm,
|
||||
'bakiupah' : bakiupah,
|
||||
'cajlain' : cajlain,
|
||||
'cajlelong' : cajlelong,
|
||||
'jumlah' : jumlah,
|
||||
'nowakil' : nowakil,
|
||||
'hargajual' : hargajual
|
||||
},
|
||||
success:function(data){
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
Swal.fire(
|
||||
'Berjaya!',
|
||||
'Tuntut Baki Berjaya',
|
||||
'success'
|
||||
) .then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
})
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
//let jumlah = $('#jumlah').val();let hargajual = $('#hargajual').val();
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Tuntutan Baki Pelanggan!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if(result.isConfirmed) {
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = 0;
|
||||
let jenis = '';
|
||||
let mohon = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
let cajlain = 0.00; let cajlelong = $('#cajlelong').val();
|
||||
let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,"");
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
var channel = pusher.subscribe('notice-ubahhapus');
|
||||
channel.bind('my-ubahhapus', function(data) {
|
||||
|
||||
|
||||
if(data.norujukan == norujukan && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
|
||||
$.ajax({
|
||||
method: 'put',
|
||||
url: "{{ route('lelong.tuntutbaki') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
'batchno' : batchno,
|
||||
'jenis' : jenis,
|
||||
'norujukan' : norujukan,
|
||||
'teller' : teller,
|
||||
'bakipjm' : bakipjm,
|
||||
'bakiupah' : bakiupah,
|
||||
'cajlain' : cajlain,
|
||||
'cajlelong' : cajlelong,
|
||||
'jumlah' : jumlah,
|
||||
'nowakil' : nowakil,
|
||||
'hargajual' : hargajual
|
||||
},
|
||||
success:function(data){
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
Swal.fire(
|
||||
'Berjaya!',
|
||||
'Tuntut Baki Berjaya',
|
||||
'success'
|
||||
) .then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
})
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else if(data.kelulusan == 'batal')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Telah Dibatalkan',
|
||||
text: `Komen : ${data.komen}`
|
||||
}).then(function(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Batal',
|
||||
'Tidak Berjaya Mendaptkan Pengesahan Khazanah',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,6 +1,8 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('modal.wakil')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
@@ -54,11 +56,11 @@
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" readonly>
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" disabled>
|
||||
<label class="custom-control-label" style="color:green;" for="radbakilelong" >Baki Lelong</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" readonly>
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" disabled>
|
||||
<label class="custom-control-label" style="color:red;" for="radrugilelong" >Rugi Lelong</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,6 +187,7 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let jumlahbaki = parseFloat($('#jumlah').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
if(jumlahbaki > 0)
|
||||
@@ -197,22 +200,354 @@
|
||||
}
|
||||
});
|
||||
|
||||
var api = '<?php echo $api_url ?>';
|
||||
let nw = 0;
|
||||
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
|
||||
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
wakil = wakil.replace(patternregex,"").toUpperCase();
|
||||
|
||||
if(wakil.length <= 12)
|
||||
{
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.search') }}",
|
||||
data:{
|
||||
'wakil' : wakil
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 'no-data')
|
||||
{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: 'Daftar',
|
||||
icon: 'info',
|
||||
title: 'Maklumat anda tiada dalam senarai wakil! Tekan button okay untuk mendaftar!'
|
||||
}).then(function(){
|
||||
daftarfunction(wakil);
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Maklumat Anda Berjaya Direkodkan!',
|
||||
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
|
||||
});
|
||||
nw = data.nowakil;
|
||||
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$(e).html("Ubah");
|
||||
$(e).attr("onclick","ubahwakil(this)");
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
titleText: 'Kad Pengenalan dan Passport',
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function daftarwakil()
|
||||
{
|
||||
let nopelanggan = $('#nopelangganwakil').val();
|
||||
let nowakil = $('#nowakil').val();
|
||||
let nama = $('#namawakil').val();
|
||||
let hubungan = $('#slthubungan').val();
|
||||
let alamat = $('#alamatwakil').val();
|
||||
let telefon = $('#notelwakil').val();
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
let boolnowakil = false;let boolnama = false;let boolalamat = false;let booltelefon = false;let boolnota = false;let boolnokp = false;
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
$("[name='errornowakil']").show();
|
||||
$("[name='errornowakil']").text("*No wakil tidak dijana lagi!");
|
||||
$("[name='nowakil']").addClass('is-invalid');
|
||||
|
||||
boolnowakil = true;
|
||||
}else{
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
boolnowakil = false;
|
||||
}
|
||||
|
||||
if(nama === null || nama === '')
|
||||
{
|
||||
$("[name='errornamawakil']").show();
|
||||
$("[name='errornamawakil']").text("*Isikan nama dalam kotak!");
|
||||
$("[name='namawakil']").addClass('is-invalid');
|
||||
|
||||
boolnama = true;
|
||||
}else{
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnama = false;
|
||||
}
|
||||
|
||||
if(alamat === null || alamat === '')
|
||||
{
|
||||
$("[name='erroralamatwakil']").show();
|
||||
$("[name='erroralamatwakil']").text("*Isikan alamat dalam kotak!");
|
||||
$("[name='alamatwakil']").addClass('is-invalid');
|
||||
|
||||
boolalamat = true;
|
||||
}else{
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
boolalamat = false;
|
||||
}
|
||||
|
||||
if(telefon === null || telefon === '')
|
||||
{
|
||||
$("[name='errornotelwakil']").show();
|
||||
$("[name='errornotelwakil']").text("*Isikan telefon dalam kotak!");
|
||||
$("[name='notelwakil']").addClass('is-invalid');
|
||||
|
||||
booltelefon = true;
|
||||
}else{
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
booltelefon = false;
|
||||
}
|
||||
|
||||
if(nota === null || nota === '')
|
||||
{
|
||||
$("[name='errornotawakil']").show();
|
||||
$("[name='errornotawakil']").text("*Isikan nota dalam kotak!");
|
||||
$("[name='notawakil']").addClass('is-invalid');
|
||||
|
||||
boolnota = true;
|
||||
}else{
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnota = false;
|
||||
}
|
||||
|
||||
if(nokp === null || nokp === '')
|
||||
{
|
||||
$("[name='errornokpwakil']").show();
|
||||
$("[name='errornokpwakil']").text("*Isikan nokp dalam kotak!");
|
||||
$("[name='nokpwakil']").addClass('is-invalid');
|
||||
|
||||
boolnokp = true;
|
||||
}else{
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
boolnokp = false;
|
||||
}
|
||||
|
||||
|
||||
if(boolnowakil == false && boolnama == false && boolalamat == false && booltelefon == false && boolnota == false && boolnokp == false)
|
||||
{
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('#WakilModal').on('hidden.bs.modal', function (e) {
|
||||
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
$(this).find(".invalid-feedback").hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function daftarfunction(id)
|
||||
{
|
||||
let kodcaw = "{{ Auth::user()->cawangan }}";
|
||||
|
||||
$('#nokpwakil').val(id);
|
||||
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.caricustomer') }}",
|
||||
url: api + '/api/customers/' + id,
|
||||
// data:{ "icno" : id },
|
||||
success:function(data){
|
||||
|
||||
$('#namawakil').val('');
|
||||
$('#alamatwakil').val('');
|
||||
$('#notelwakil').val('');
|
||||
|
||||
var size = Object.keys(data).length;
|
||||
|
||||
if(size > 0)
|
||||
{
|
||||
$('#namawakil').val(data['nama']);
|
||||
$('#alamatwakil').val(data['alamat1']);
|
||||
$('#notelwakil').val(data['telefon']);
|
||||
$('#nopelangganwakil').val(data['nopelanggan']);
|
||||
}
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.first') }}",
|
||||
url: api + '/api/firstwakil/' + kodcaw,
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
|
||||
Swal.close();
|
||||
$('#WakilModal').modal();
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
Swal.close();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Punyai Ralat dalam API wakil...',
|
||||
icon: 'error'
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ubahwakil(e)
|
||||
{
|
||||
$('#wakiltxt').prop( "disabled", false);
|
||||
$(e).html("Cari");
|
||||
$(e).attr( "onclick", "wakilfunction(this)");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function bayarantuntubaki()
|
||||
{
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = 0;
|
||||
let jenis = '';
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = nw;
|
||||
let jenis = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
|
||||
@@ -103,6 +103,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
<b>TEMPOH</b>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['tempoh'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
|
||||
@@ -232,42 +232,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini1'][0]['bil']) }}</span><br>
|
||||
<span>{{ $gad1 = ($kawalanstok[0]['gadai1'][0]['bil'] + $kawalanstok[0]['gadaiini1'][0]['bil']) }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj1 = ($kawalanstok[0]['gadai1'][0]['pinj'] + $kawalanstok[0]['gadaiini1'][0]['pinj']); echo number_format($gadpinj1,2) @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $gad2 = ($kawalanstok[0]['gadai2'][0]['bil'] + $kawalanstok[0]['gadaiini2'][0]['bil']); echo number_format($gad2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj2 = ($kawalanstok[0]['gadai2'][0]['pinj'] + $kawalanstok[0]['gadaiini2'][0]['pinj']); echo number_format($gadpinj2,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $gad3 = ($kawalanstok[0]['gadai3'][0]['bil'] + $kawalanstok[0]['gadaiini3'][0]['bil']); echo number_format($gad3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj3 = ($kawalanstok[0]['gadai3'][0]['pinj'] + $kawalanstok[0]['gadaiini3'][0]['pinj']); echo number_format($gadpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilgadaikeseluruhan = $kawalanstok[0]['gadai1'][0]['bil'] + $kawalanstok[0]['gadai2'][0]['bil'] + $kawalanstok[0]['gadai3'][0]['bil']; echo number_format($totalbilgadaikeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilgadaisehari = $kawalanstok[0]['gadaiini1'][0]['bil'] + $kawalanstok[0]['gadaiini2'][0]['bil'] + $kawalanstok[0]['gadaiini3'][0]['bil']; echo number_format($totalbilgadaisehari); @endphp</span><br>
|
||||
<span>@php $totalbilgadai = $totalbilgadaikeseluruhan + $totalbilgadaisehari; echo number_format($totalbilgadai); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjgadaikeseluruhan = $kawalanstok[0]['gadai1'][0]['pinj'] + $kawalanstok[0]['gadai2'][0]['pinj'] + $kawalanstok[0]['gadai3'][0]['pinj']; echo number_format($totalpinjgadaikeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjgadaisehari = $kawalanstok[0]['gadaiini1'][0]['pinj'] + $kawalanstok[0]['gadaiini2'][0]['pinj'] + $kawalanstok[0]['gadaiini3'][0]['pinj']; echo number_format($totalpinjgadaisehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjgadai = $totalpinjgadaikeseluruhan + $totalpinjgadaisehari; echo number_format($totalpinjgadai,2); @endphp</span>
|
||||
@@ -281,42 +281,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align:right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb1 = ($kawalanstok[1]['tebus1'][0]['bil'] + $kawalanstok[1]['tebusini1'][0]['bil']); echo number_format($teb1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj1 = ($kawalanstok[1]['tebus1'][0]['pinj'] + $kawalanstok[1]['tebusini1'][0]['pinj']); echo number_format($tebpinj1,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb2 = ($kawalanstok[1]['tebus2'][0]['bil'] + $kawalanstok[1]['tebusini2'][0]['bil']); echo number_format($teb2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj2 = ($kawalanstok[1]['tebus2'][0]['pinj'] + $kawalanstok[1]['tebusini2'][0]['pinj']); echo number_format($tebpinj2,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb3 = ($kawalanstok[1]['tebus3'][0]['bil'] + $kawalanstok[1]['tebusini3'][0]['bil']); echo number_format($teb3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj3 = ($kawalanstok[1]['tebus3'][0]['pinj'] + $kawalanstok[1]['tebusini3'][0]['pinj']); echo number_format($tebpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbiltebuskeseluruhan = $kawalanstok[1]['tebus1'][0]['bil'] + $kawalanstok[1]['tebus2'][0]['bil'] + $kawalanstok[1]['tebus3'][0]['bil']; echo number_format($totalbiltebuskeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbiltebussehari = $kawalanstok[1]['tebusini1'][0]['bil'] + $kawalanstok[1]['tebusini2'][0]['bil'] + $kawalanstok[1]['tebusini3'][0]['bil']; echo number_format($totalbiltebussehari); @endphp</span><br>
|
||||
<span>@php $totalbiltebus = $totalbiltebuskeseluruhan + $totalbiltebussehari; echo number_format($totalbiltebus); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjtebuskeseluruhan = $kawalanstok[1]['tebus1'][0]['pinj'] + $kawalanstok[1]['tebus2'][0]['pinj'] + $kawalanstok[1]['tebus3'][0]['pinj']; echo number_format($totalpinjtebuskeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjtebussehari = $kawalanstok[1]['tebusini1'][0]['pinj'] + $kawalanstok[1]['tebusini2'][0]['pinj'] + $kawalanstok[1]['tebusini3'][0]['pinj']; echo number_format($totalpinjtebussehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjtebus = $totalpinjtebuskeseluruhan + $totalpinjtebussehari; echo number_format($totalpinjtebus,2); @endphp</span>
|
||||
@@ -329,42 +329,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans1']['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[4]['ansini1']['bil']) }}</span><br>
|
||||
<span>@php $ans1 = ($kawalanstok[4]['ans1']['bil'] + $kawalanstok[4]['ansini1']['bil']); echo number_format($ans1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans1']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini1']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj1 = ($kawalanstok[4]['ans1']['pinj'] + $kawalanstok[4]['ansini1']['pinj']); echo number_format($anspinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans2']['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[4]['ansini2']['bil']) }}</span><br>
|
||||
<span>@php $ans2 = ($kawalanstok[4]['ans2']['bil'] + $kawalanstok[4]['ansini2']['bil']); echo number_format($ans2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans2']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini2']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj2 = ($kawalanstok[4]['ans2']['pinj'] + $kawalanstok[4]['ansini2']['pinj']); echo number_format($anspinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(intval($kawalanstok[4]['ans3']['bil'])) }}</span><br>
|
||||
<span>{{ number_format(intval($kawalanstok[4]['ansini3']['bil'])) }}</span><br>
|
||||
<span>@php $ans3 = ($kawalanstok[4]['ans3']['bil'] + $kawalanstok[4]['ansini3']['bil']); echo number_format($ans3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans3']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini3']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj3 = ($kawalanstok[4]['ans3']['pinj'] + $kawalanstok[4]['ansini3']['pinj']); echo number_format($anspinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilanskeseluruhan = $kawalanstok[4]['ans1']['bil'] + $kawalanstok[4]['ans2']['bil'] + $kawalanstok[4]['ans3']['bil']; echo number_format($totalbilanskeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilanssehari = $kawalanstok[4]['ansini1']['bil'] + $kawalanstok[4]['ansini2']['bil'] + $kawalanstok[4]['ansini3']['bil']; echo number_format($totalbilanssehari); @endphp</span><br>
|
||||
<span>@php $totalbilans = $totalbilanskeseluruhan + $totalbilanssehari; echo number_format($totalbilans); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjanskeseluruhan = $kawalanstok[4]['ans1']['pinj'] + $kawalanstok[4]['ans2']['pinj'] + $kawalanstok[4]['ans3']['pinj']; echo number_format($totalpinjanskeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjanssehari = $kawalanstok[4]['ansini1']['pinj'] + $kawalanstok[4]['ansini2']['pinj'] + $kawalanstok[4]['ansini3']['pinj']; echo number_format($totalpinjanssehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjans = floatval($totalpinjanskeseluruhan + $totalpinjanssehari); echo number_format($totalpinjans,2); @endphp</span>
|
||||
@@ -377,42 +377,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[2]['lelongini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $lel1 = ($kawalanstok[2]['lelong1'][0]['bil'] + $kawalanstok[2]['lelongini1'][0]['bil']); echo number_format($lel1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj1 = ($kawalanstok[2]['lelong1'][0]['pinj'] + $kawalanstok[2]['lelongini1'][0]['pinj']); echo number_format($lelpinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[2]['lelongini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $lel2 = ($kawalanstok[2]['lelong2'][0]['bil'] + $kawalanstok[2]['lelongini2'][0]['bil']); echo number_format($lel2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj2 = ($kawalanstok[2]['lelong2'][0]['pinj'] + $kawalanstok[2]['lelongini2'][0]['pinj']); echo number_format($lelpinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(intval($kawalanstok[2]['lelong3'][0]['bil'])) }}</span><br>
|
||||
<span>{{ number_format(intval($kawalanstok[2]['lelongini3'][0]['bil'])) }}</span><br>
|
||||
<span>@php $lel3 = ($kawalanstok[2]['lelong3'][0]['bil'] + $kawalanstok[2]['lelongini3'][0]['bil']); echo number_format($lel3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj3 = ($kawalanstok[2]['lelong3'][0]['pinj'] + $kawalanstok[2]['lelongini3'][0]['pinj']); echo number_format($lelpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbillelongkeseluruhan = $kawalanstok[2]['lelong1'][0]['bil'] + $kawalanstok[2]['lelong2'][0]['bil'] + $kawalanstok[2]['lelong3'][0]['bil']; echo number_format($totalbillelongkeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbillelongsehari = $kawalanstok[2]['lelongini1'][0]['bil'] + $kawalanstok[2]['lelongini2'][0]['bil'] + $kawalanstok[2]['lelongini3'][0]['bil']; echo number_format($totalbillelongsehari); @endphp</span><br>
|
||||
<span>@php $totalbillelong = $totalbillelongkeseluruhan + $totalbillelongsehari; echo number_format($totalbillelong); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjlelongkeseluruhan = $kawalanstok[2]['lelong1'][0]['pinj'] + $kawalanstok[2]['lelong2'][0]['pinj'] + $kawalanstok[2]['lelong3'][0]['pinj']; echo number_format($totalpinjlelongkeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjlelongsehari = $kawalanstok[2]['lelongini1'][0]['pinj'] + $kawalanstok[2]['lelongini2'][0]['pinj'] + $kawalanstok[2]['lelongini3'][0]['pinj']; echo number_format($totalpinjlelongsehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjlelong = floatval($totalpinjlelongkeseluruhan + $totalpinjlelongsehari); echo number_format($totalpinjlelong,2); @endphp</span>
|
||||
@@ -425,42 +425,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk1 = $kawalanstok[3]['hapuskira1'][0]['bil'] + $kawalanstok[3]['hapuskiraini1'][0]['bil']; echo number_format($hpk1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira1'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj1 = ($kawalanstok[3]['hapuskira1'][0]['pinj'] + $kawalanstok[3]['hapuskiraini1'][0]['pinj']); echo number_format($hpkpinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk2 = ($kawalanstok[3]['hapuskira2'][0]['bil'] + $kawalanstok[3]['hapuskiraini2'][0]['bil']); echo number_format($hpk2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira2'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj2 = ($kawalanstok[3]['hapuskira2'][0]['pinj'] + $kawalanstok[3]['hapuskiraini2'][0]['pinj']); echo number_format($hpkpinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk3 = ($kawalanstok[3]['hapuskira3'][0]['bil'] + $kawalanstok[3]['hapuskiraini3'][0]['bil']); echo number_format($hpk3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira3'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj3 = $kawalanstok[3]['hapuskira3'][0]['pinj'] + $kawalanstok[3]['hapuskiraini3'][0]['pinj']; echo number_format($hpkpinj3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilhapuskirakeseluruhan = $kawalanstok[3]['hapuskira1'][0]['bil'] + $kawalanstok[3]['hapuskira2'][0]['bil'] + $kawalanstok[3]['hapuskira3'][0]['bil']; echo number_format($totalbilhapuskirakeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilhapuskirasehari = $kawalanstok[3]['hapuskiraini1'][0]['bil'] + $kawalanstok[3]['hapuskiraini2'][0]['bil'] + $kawalanstok[3]['hapuskiraini3'][0]['bil']; echo number_format($totalbilhapuskirasehari); @endphp</span><br>
|
||||
<span>@php $totalbilhapuskira = $totalbilhapuskirakeseluruhan + $totalbilhapuskirasehari; echo number_format($totalbilhapuskira); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjhapuskirakeseluruhan = $kawalanstok[3]['hapuskira1'][0]['pinj'] + $kawalanstok[3]['hapuskira2'][0]['pinj'] + $kawalanstok[3]['hapuskira3'][0]['pinj']; echo number_format($totalpinjhapuskirakeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjhapuskirasehari = $kawalanstok[3]['hapuskiraini1'][0]['pinj'] + $kawalanstok[3]['hapuskiraini2'][0]['pinj'] + $kawalanstok[3]['hapuskiraini3'][0]['pinj']; echo number_format($totalpinjhapuskirasehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjhapuskira = $totalpinjhapuskirakeseluruhan + $totalpinjhapuskirasehari; echo number_format($totalpinjhapuskira,2); @endphp</span>
|
||||
@@ -470,61 +470,61 @@
|
||||
<tfoot>
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="2">Baki</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil1 = $gad1 - $teb1 - $lel1 - $ans1 - $hpk1; echo number_format($totalbil1);@endphp
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj1 = $gadpinj1 - $tebpinj1 - $lelpinj1 - $anspinj1 - $hpkpinj1; echo number_format($totalpinj1,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil2 = $gad2 - $teb2 - $lel2 - $ans2 - $hpk2; echo number_format($totalbil2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj2 = $gadpinj2 - $tebpinj2 - $lelpinj2 - $anspinj2 - $hpkpinj2; echo number_format($totalpinj2,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil3 = $gad3 - $teb3 - $lel3 = - $ans3 - $hpk3; echo number_format($totalbil3);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj3 = $gadpinj3 - $tebpinj3 - $lelpinj3 - $anspinj3 - $hpkpinj3; echo number_format($totalpinj3,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil = $totalbilgadai-$totalbiltebus/*-$totalbilans*/-$totalbillelong-$totalbilhapuskira; echo number_format($totalbil);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj = $totalpinjgadai-$totalpinjtebus-$totalpinjans-$totalpinjlelong-$totalpinjhapuskira; echo number_format($totalpinj,2);@endphp
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
|
||||
@php $percentbil1 = (($totalbil1)/$totalbil)*100; echo number_format($percentbil1,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj1 = (($totalpinj1)/$totalpinj)*100; echo number_format($percentpinj1,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentbil2 = (($totalbil2)/$totalbil)*100; echo number_format($percentbil2,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj2 = (($totalpinj2)/$totalpinj)*100; echo number_format($percentpinj2,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentbil3 = (($totalbil3)/$totalbil)*100; echo number_format($percentbil3,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj3 = (($totalpinj3)/$totalpinj)*100;; echo number_format($percentpinj3,2) . ' %';@endphp
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
@@ -224,14 +224,15 @@
|
||||
<td>{{ $lelong['tarikh'] }}</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<tr style="border-top:1px solid black;">
|
||||
<th>Nama wakil</th>
|
||||
<td></td>
|
||||
<td>@php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid black;">
|
||||
<th>No K/P</th>
|
||||
<td></td>
|
||||
<td>@php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -69,6 +69,7 @@ Route::get('/penebusan/{norujukan}',['as'=>'penebusan','uses' => 'PenebusanContr
|
||||
Route::get('/lelongan/{norujukan}',['as'=>'lelongan','uses' => 'LelongController@index'])->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai','AliranTunaiController@index')->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai/laporanserahan',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai/laporanalirantunai/{teller}',['as'=>'laporan.alirantunai','uses' => 'AliranTunaiController@LaporanAliranTunai'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/Gadaian',['as'=>'alirantunai.gadai','uses' => 'AliranTunaiController@alirantunaiGadai'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/Tebusan',['as'=>'alirantunai.tebus','uses' => 'AliranTunaiController@alirantunaiTebus'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/advansur',['as'=>'alirantunai.advansur','uses' => 'AliranTunaiController@alirantunaiUpahBknTawarruq'])->middleware('auth','teller');
|
||||
@@ -128,6 +129,8 @@ Route::get('/khazanah/customer_info',['as'=>'khazanah.customer_info','uses'=>'Kh
|
||||
Route::get('/khazanah/searchpelanggan',['as'=>'khazanah.searchpelanggan','uses'=>'KhazanahController@search'])->middleware('auth','khazanah');
|
||||
Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
|
||||
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
|
||||
Route::get('/lelongankhazanah/{norujukan}',['as'=>'lelongan.khazanah','uses' => 'KhazanahController@lelongan'])->middleware('auth','khazanah');
|
||||
|
||||
|
||||
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
||||
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
||||
|
||||
Reference in New Issue
Block a user