perubahan sikit
This commit is contained in:
@@ -520,7 +520,7 @@
|
||||
</table>
|
||||
|
||||
<h5>CATATAN:</h5> Serahan kepada peti besi ialah sebanyak <span>RM </span>
|
||||
Baki Tunai Semasa sebanyak <span>RM </span>
|
||||
Baki Tunai Semasa sebanyak <span>RM {{ number_format($totalsemua,2) }}</span>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
@@ -454,6 +454,12 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
// here is the new selected tab id
|
||||
var selectedTabId = e.target.id;
|
||||
|
||||
});
|
||||
|
||||
var tablegadai = $('#myTable').DataTable({
|
||||
"scrollX": true
|
||||
});
|
||||
@@ -1494,14 +1500,154 @@
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
|
||||
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
|
||||
if(+harini !== +tarikhgadai2){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Gadai Tidak Dibenarkan'
|
||||
});
|
||||
return false;
|
||||
|
||||
var id = $('.tab-content .active').attr('id');
|
||||
if(id == "nav-tawarruq-tab") {
|
||||
if(+harini !== +tarikhgadai2){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Gadai Tidak Dibenarkan'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/upahlamatoday/' + kodcaw + '/' + hapusid,
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data == 1){
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Hapus Upah Lama!",
|
||||
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 mohon = "Hapus Upah Lama";
|
||||
let id = hapusid;
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : id,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
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 == id && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: api_url + '/api/removeupahlamatoday/' + kodcaw + '/' + id,
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Hapus!',
|
||||
'Maklumat upah lama telah dihapuskan.',
|
||||
'success'
|
||||
).then(function(){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Hapus!',
|
||||
'Maklumat Upah lama tidak berjaya untuk dihapuskan.',
|
||||
'error'
|
||||
).then(function(){
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Upah Tidak Dibenarkan'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
}else if($("input[name='options']:checked").val() == 'sudah_tebus'){
|
||||
let test = $('input[name="sudahtebus"]:checked').closest('tr').children('td:eq(2)').text();
|
||||
let tarikhgadai1 = new Date(test);tarikhgadai1.setHours(0, 0, 0, 0);
|
||||
|
||||
@@ -345,6 +345,8 @@
|
||||
|
||||
});
|
||||
}
|
||||
},error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.log(textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -328,8 +328,6 @@
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
//let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
var channel = pusher.subscribe('notice-ubahhapus');
|
||||
channel.bind('my-ubahhapus', function(data) {
|
||||
|
||||
@@ -2428,6 +2428,17 @@
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
console.log(wakil);
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
@@ -2499,7 +2510,16 @@
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila tunggu no wakil untuk proses dahulu sebelum tekan terima!',
|
||||
'error'
|
||||
)
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
|
||||
@@ -313,135 +313,6 @@
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<table id="title">
|
||||
<td> <b><u>LEJER AM</u></b></td>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
|
||||
<table id="tarikh_cetak">
|
||||
|
||||
<tr>
|
||||
<td style="width:5px" ><b>TARIKH DARI</b></td ><td style="width:1px"> {{$tarikh_mula}} </td>
|
||||
<td style="width:5px" ><b>HINGGA</b></td><td style="width:1px"> {{$tarikh_akhir}} </td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<table id="glejer">
|
||||
<tr>
|
||||
<th style="width:10px">KOD GL</th><th colspan="2" style="width:50px"> KETERANGAN</th> <th style="width:5px">DEBIT</th> <th style="width:5px" >KREDIT</th><th style="width:10px">JUMLAH</th>
|
||||
</tr>
|
||||
@foreach($data as $index=>$var)
|
||||
<tr>
|
||||
|
||||
<td style="width:10px">{{ $var['glcode']}}</td><td colspan="2" style="width:50px" >{{$var['descpt']}}</td><td style="width:5px" > {{$var['total_debit']}}</td><td style="width:5px"> {{$var['total_kredit']}} </td>
|
||||
|
||||
@if($var['totalharini'] >0 )
|
||||
<td style="width:10px"> {{
|
||||
|
||||
$var['totalharini']
|
||||
}}
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
@else
|
||||
<td>
|
||||
|
||||
|
||||
( {{ number_format(abs($var['totalharini']),2)}} )
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
@endif
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
|
||||
<td colspan="3" style="width:60px"><B>JUMLAH: </B></td><td><b>@foreach($debit as $db=>$vr) {{ number_format($vr['totalDebit'],2)}} @endforeach
|
||||
|
||||
</b></td><td> <b> @foreach($kredit as $db=>$vr) {{ number_format($vr['totalKredit'],2)}} @endforeach </b> </td>
|
||||
<td> <b>
|
||||
|
||||
|
||||
@foreach($kredit as $db=>$vr)
|
||||
@foreach($debit as $db2=>$vr2)
|
||||
|
||||
{{ number_format($vr['totalKredit'] -$vr2['totalDebit'] ,2) }}
|
||||
@endforeach
|
||||
@endforeach
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</b> </td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<table id="details">
|
||||
<tr>
|
||||
<th> </th><th> DISEMAK </th><th></th> <th> DISAHKAN </th><th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<table id="title">
|
||||
<td> <b><u>LEJER AM</u></b></td>
|
||||
</table>
|
||||
|
||||
@@ -394,11 +394,11 @@ hr.new5 {
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">Nama Wakil </td> <td>: </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
|
||||
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp</td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">No K/P Wakil </td> <td>: </td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
|
||||
<td colspan="3">No K/P Wakil </td> <td>: @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp</td> <td colspan="3"> </td> <td> </td><td> </td><td> </td><td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user