add pendahuluan serahan

This commit is contained in:
hafifierahman
2021-02-24 17:01:37 +08:00
parent d037e1ff0e
commit 1246890a88
17 changed files with 2063 additions and 192 deletions
+46 -38
View File
@@ -630,27 +630,27 @@
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: 'Ubah Gadai Tidak Dibenarkan'
});
return false;
}
// if(+harini !== +tarikhgadai2){
// Swal.fire({
// icon: 'error',
// title: 'Amaran',
// text: 'Ubah Gadai Tidak Dibenarkan'
// });
// 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);
if(+harini !== +tarikhgadai1){
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Ubah Gadai Tidak Dibenarkan'
});
return false;
}
// if(+harini !== +tarikhgadai1){
// Swal.fire({
// icon: 'error',
// title: 'Amaran',
// text: 'Ubah Gadai Tidak Dibenarkan'
// });
// return false;
// }
}
if(ubahid == null && $("input[name='options']:checked").val() == 'belum_tebus'){
@@ -723,22 +723,22 @@
}
});
//TIME INTERVAL
let timerInterval;
timerInterval = setInterval(function(){
$.ajax({
method:'get',
url: "{{ route('teller.getkelulusan') }}",
data: {
"norujukan" : ubahid
},
success:function(data){
console.log(data);
if(data != 0){
console.log('berjaya');
clearInterval(timerInterval);
var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
console.log(data);
if(data.norujukan == ubahid)
{
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan'
@@ -746,20 +746,28 @@
var urlroute = '{{ route("gadaian.edit", ":id") }}';
urlroute = urlroute.replace(':id', ubahid);
window.location.replace(urlroute);
return true;
});
}
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
else if(data.kelulusan == 'batal')
{
Swal.fire({
icon: 'warning',
title: 'Telah Dibatalkan',
text: `Komen : ${data.komen}`
}).then(function(){
// $("#terima_gadai").prop('disabled', false);
return false;
});
}
}
});
}, 3000);
}else if (result.dismiss === Swal.DismissReason.cancel){
swalWithBootstrapButtons.fire(
'Batal',
@@ -35,6 +35,9 @@
<div class="row">
<a href="{{ url('menu') }}" class="btn btn-primary btn-lg btn-block mb-3">Khazanah</a>
</div>
<div class="row">
<a href="{{ url('pendahuluanserahan') }}" class="btn btn-primary btn-lg btn-block mb-3">Pendahuluan - Serahan</a>
</div>
</div>
<div class="col-3 mx-1">
+18 -33
View File
@@ -29,11 +29,11 @@
@if($index1 == 0)
<li class="nav-item">
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-home" role="tab" aria-controls="pills-home" aria-selected="true">{{ $ls->name }}</a>
<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-profile" role="tab" aria-controls="pills-profile" aria-selected="false">{{ $ls->name }}</a>
<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>
{{-- <li class="nav-item">
<a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</a>
@@ -43,15 +43,12 @@
@endforeach
</ul>
<div class="tab-content" id="pills-tabContent">
@foreach($listUser as $index1=>$ls)
{{-- {{ dd(empty($arraytunai[1])) }} --}}
@if($index1 == 0)
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="tab-pane fade show active" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="col-12 row">
<div class="col-lg-6 col-xl-4 col-12">
@@ -64,7 +61,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -78,7 +74,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -92,7 +87,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
</div>
@@ -108,7 +102,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -122,7 +115,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -136,14 +128,13 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
</div>
<div class="mt-3">
<table class='table mt-4' id='table-tunai' style="width:100%;">
<table class='table mt-4' id='table-{{ $ls->id }}' style="width:100%;">
<thead>
<tr>
<th>bil</th>
@@ -176,9 +167,7 @@
</div>
@else
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
<div class="tab-pane fade" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-profile-tab">
<div class="col-12 row">
<div class="col-lg-6 col-xl-4 col-12">
@@ -191,7 +180,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -205,7 +193,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -219,7 +206,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
</div>
@@ -235,7 +221,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -249,7 +234,6 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
@@ -263,15 +247,14 @@
</div>
<div class="icon">
</div>
{{-- <a href="{{ route('home.gadaian6bulan') }}" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a> --}}
</div>
</div>
</div>
<div class="mt-3">
<table class='table mt-4' id='table-tunai2'>
<table class='table mt-4' id='table-{{ $ls->id }}'>
<thead>
<tr>
<th>bil</th>
@@ -285,7 +268,9 @@
</tr>
</thead>
<tbody>
{{-- {{ dd($arraytunai) }} --}}
@foreach ($arraytunai[$index1] as $tunai)
{{-- {{ dd($tunai) }} --}}
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $tunai['tarikh'] }}</td>
@@ -302,16 +287,12 @@
</div>
</div>
</div>
@endif
@endforeach
{{-- <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">...</div> --}}
</div>
@@ -324,12 +305,16 @@
</div>
<script>
var tablecapaian = $('#table-tunai').DataTable({
"scrollX": true
});
// var tablecapaian = $('#table-tunai').DataTable({
// "scrollX": true
// });
let namefordatatable = "{{ $listUser }}";
console.log(namefordatatable);
console.log(JSON.parse(namefordatatable));
</script>
</script>
@endsection
+2 -2
View File
@@ -30,7 +30,7 @@
<!-- small box -->
<div class="small-box bg-primary">
<div class="inner">
<h3>RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? $ringkasanharian['gadai'][0]['jumlahpinjaman'] : "0.00" }}</h3>
<h3>RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['gadai'][0]['jumlahpinjaman'],2) : "0.00" }}</h3>
<p>Gadai Hari Ini</p>
</div>
@@ -44,7 +44,7 @@
<!-- small box -->
<div class="small-box bg-primary">
<div class="inner">
<h3>RM {{ ($ringkasanharian['tebus'][0]['jumlahpinjaman']) ? $ringkasanharian['tebus'][0]['jumlahpinjaman'] : "0.00" }}</h3>
<h3>RM {{ ($ringkasanharian['tebus'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['tebus'][0]['jumlahpinjaman'],2) : "0.00" }}</h3>
<p>Tebus Hari Ini</p>
</div>
+91 -8
View File
@@ -127,17 +127,18 @@
<button class="btn btn-danger" data-norujukan="{{ $k['norujukan'] }}" data-pelulus="{{ $k['pelulus'] }}" data-siri="{{ $k['siri'] }}" onclick="updatebatal(this)"><i class="fas fa-thumbs-down"></i></button></td>
</tr>
@endforeach
@foreach($kelulusanmohonid as $index=>$km)
@foreach($arraykelulusanmohonid as $index=>$km)
<tr>
<td>{{ $km['norujukan'] }}</td>
<td><a href="#" data-toggle="modal" data-target="#kelulusanmodal" data-norujukan="{{ $km['norujukan'] }}">{{ $km['norujukan'] }} </a></td>
<td>{{ $km['teller'] }}</td>
<td>{{ $km['mohon'] }}</td>
<td>{{ $km['tarikh'] }}</td>
<td>{{ $cawangan_info['details_caw'] }}</td>
<td>{{ $km['norujukan'] }}</td>
<td>{{ $km['norujukan'] }}</td>
<td><button class="btn btn-primary mr-2" onclick="updatelulusmohon(this)" data-norujukan="{{ $km['norujukan'] }}"><i class="fas fa-thumbs-up"></i></button><button class="btn btn-danger"><i class="fas fa-thumbs-down"></i></button></td>
<td>{{ $km['pinjaman'] }}</td>
<td>{{ $km['nilaimarhun'] }}</td>
<td>{{ $km['berat'] }}</td>
<td>{{ $km['margin'] }}</td>
<td><button class="btn btn-primary mr-2" onclick="updatelulusmohon(this)" data-norujukan="{{ $km['norujukan'] }}"><i class="fas fa-thumbs-up"></i></button>
<button class="btn btn-danger" onclick="updatebatalmohon(this)" data-norujukan="{{ $km['norujukan'] }}"><i class="fas fa-thumbs-down"></i></button></td>
</tr>
@endforeach
@@ -425,7 +426,7 @@
{
const { value: katalaluan } = await Swal.fire({
title: 'Masukkan Katalaluan Semula',
title: 'Masukkan Katalaluan',
input: 'password',
inputPlaceholder: 'Katalaluan',
confirmButtonText: 'Hantar',
@@ -463,6 +464,7 @@
let norujukan = $(e).data('norujukan');
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
$.ajax({
method:'put',
url: "{{ route('khazanah.updatekelulusan') }}",
@@ -487,5 +489,86 @@
});
}
async function updatebatalmohon(e)
{
const { value: katalaluan } = await Swal.fire({
title: 'Masukkan Katalaluan Semula',
input: 'password',
inputPlaceholder: 'Katalaluan',
confirmButtonText: 'Hantar',
showCancelButton:true,
cancelButtonText:'Batal',
allowOutsideClick: true
})
let dataminta = '';
$.ajax({
method:'get',
url: "{{ route('khazanah.getmintasemulakelulusan') }}",
async:false,
data:{ passsemula : katalaluan },
success:function(data)
{
if(data == "False")
{
dataminta = data;
}
}
});
if(dataminta == 'False')
{
Swal.fire({
icon: 'error',
title: 'Pengesahan Katalaluan Tidak Berjaya'
})
event.preventDefault();
return false;
}
const { value: komenkelulusan } = await Swal.fire({
title: 'Masukkan Komen Daripada Khazanah',
input: 'text',
inputPlaceholder: 'Komen',
confirmButtonText: 'Hantar',
showCancelButton:false,
allowOutsideClick: false
})
let norujukan = $(e).data('norujukan');
let namakhazanah = "{{ $auth_user = Auth::user()->name }}";
$.ajax({
method:'put',
url: "{{ route('khazanah.updatekelulusan') }}",
data: {
"_token": "{{ csrf_token() }}",
"norujukan" : norujukan,
"khazanah" : namakhazanah,
"komenubahhapus" : komenkelulusan,
"batal" : 'batal'
},
success:function(data){
console.log(data);
Swal.fire({
icon: 'success',
title: 'Pengesahan Berjaya'
}).then(function(){
location.reload();
});
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
}
</script>
@endsection
+2 -2
View File
@@ -11,8 +11,8 @@
<a href="{{ url('khazanahgadaian') }}" class="btn btn-info ml-2">Gadai <span class="badge badge-light">{{ count($gadai) }}</span></a>
<a href="{{ url('khazanahtebus') }}" class="btn btn-info ml-2">Tebus <span class="badge badge-light">{{ count($listserah) }}</span></a>
<a href="{{ url('pendahuluan') }}" class="btn btn-info ml-2">Pendahuluan</a>
<a href="{{ url('serahan') }}" class="btn btn-info ml-2">Serahan</a>
<a href="{{ url('pendahuluan') }}" class="btn btn-info ml-2">Pendahuluan <span class="badge badge-light">{{ $countmodal }}</span></a>
<a href="{{ url('serahan') }}" class="btn btn-info ml-2">Serahan <span class="badge badge-light">{{ $countserahan }}</span></a>
</div>
</div>
</div>
@@ -0,0 +1,229 @@
@extends('layouts.app')
@section('content')
@include('modal.pendahuluanserahan')
@include('modal.denominasimodalpendahuluanserahan')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="card-header">{{ __('Pendahuluan Serahan') }}</div>
<div class="card-body">
<h5 class="text-center">Senarai Pendahuluan Serahan</h5>
<div class="mt-3 text-center mx-auto">
<table class='table mt-4' id='table-pendahuluanserahan' style="width: 100%;">
<thead>
<tr>
<th>Tarikh</th>
<th>Description</th>
<th>Pendahuluan (RM)</th>
<th>Serahan (RM)</th>
</tr>
</thead>
<tbody>
@foreach ($listgldetail as $gldetail)
<tr>
<td>{{ $gldetail['tarikh'] }}</td>
<td>{{ $gldetail['descpt'] }}</td>
<td>{{ $gldetail['pendahuluan'] }}</td>
<td>{{ $gldetail['serahan'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<button class="btn btn-primary mt-4" data-toggle="modal" data-target="#pendahuluanserahanModal">Daftar</button>
</div>
</div>
</div>
</div>
</div>
<script src="{{ asset('js/main.js') }}"></script>
<script>
var tablependahuluanserahan = $('#table-pendahuluanserahan').DataTable({
"scrollX": true,
"order": [[ 0, "desc" ]]
});
let api = "{{ config('api.url') }}";
let kodcaw = "{{ Auth::user()->cawangan }}";
let teller = "{{ Auth::user()->name }}";
$(document).ready(function(){
let date = new Date();
let year = date.getFullYear();
let month = 1 + date.getMonth();
let day = date.getDate();
let tarikh = day + '/' + month + '/' + year;
$('#tarikh').val(tarikh);
});
$("input[name='radwang']").click(function() {
let jenis = $('#radiopendahuluanserahan:checked').val();
if(jenis == 'pendahuluan')
{
$('#keterangan').val('Pendahuluan Daripada HQ');
$('#dtacct').val('1000/010');
$('#ktacct').val('7000/102');
}else if(jenis == 'serahan')
{
$('#keterangan').val('Serahan Kepada HQ');
$('#dtacct').val('1000/010');
$('#ktacct').val('1000/020');
}
else
{
$('#keterangan').val('Tiada Maklumat');
$('#dtacct').val(0);
$('#ktacct').val(0);
}
});
function validateformat(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
$('#pendahuluanserahanModal').on('shown.bs.modal', function (e) {
$('#bundle1').val('');
$('#totalb1').val(0.00);
$('#bundle5').val('');
$('#totalb5').val(0.00);
$('#bundle10').val('');
$('#totalb10').val(0.00);
$('#bundle20').val('');
$('#totalb20').val(0.00);
$('#bundle50').val('');
$('#totalb50').val(0.00);
$('#bundle100').val('');
$('#totalb100').val(0.00);
$('#amaunkiraan').val('');
$('#dtacct').val('');
$('#ktacct').val('');
$('#keterangan').val('');
$('#amaun').val('');
$('input[name="radwang"]').prop('checked', false);
});
function functerima()
{
let amaun = $('#amaun').val();
let keterangan = $('#keterangan').val();
let jenis = $('#radiopendahuluanserahan:checked').val();
let dtacct = $('#dtacct').val();
let ktacct = $('#ktacct').val();
$('#amaundiminta').val(amaun);
$('#denominasiHQModal').modal('show');
$('#pendahuluanserahanModal').modal('hide');
}
function funcbatal()
{
$('#denominasiHQModal').modal('hide');
$('#pendahuluanserahanModal').modal('show');
$('#bundle1').val('');
$('#totalb1').val(0.00);
$('#bundle5').val('');
$('#totalb5').val(0.00);
$('#bundle10').val('');
$('#totalb10').val(0.00);
$('#bundle20').val('');
$('#totalb20').val(0.00);
$('#bundle50').val('');
$('#totalb50').val(0.00);
$('#bundle100').val('');
$('#totalb100').val(0.00);
$('#amaunkiraan').val('');
}
function terimapost()
{
let amaun = $('#amaundiminta').val();
let keterangan = $('#keterangan').val();
let jenis = $('#radiopendahuluanserahan:checked').val();
let dtacct = $('#dtacct').val();
let ktacct = $('#ktacct').val();
//denominasi bundle
let bundle1 = $('#bundle1').val();let bundle5 = $('#bundle5').val();let bundle10 = $('#bundle10').val();
let bundle20 = $('#bundle20').val();let bundle50 = $('#bundle50').val();let bundle100 = $('#bundle100').val();
$.ajax({
method: 'post',
url: '{{ route("khazanah.pendahuluanserahanHQ") }}',
data: {
"_token": "{{ csrf_token() }}",
'amaun' : amaun,
'jenisgldetail' : jenis,
'keterangan' : keterangan,
'kodcaw' : kodcaw,
'teller' : teller,
'dtacct' : dtacct,
'ktacct' : ktacct,
'bundle1' : bundle1,
'bundle5' : bundle5,
'bundle10' : bundle10,
'bundle20' : bundle20,
'bundle50' : bundle50,
'bundle100' : bundle100
},
success:function(data){
if(data == 'LULUS'){
Swal.fire({
icon: 'success',
title: 'Transaksi Berjaya'
}).then(function(){
$('#denominasiHQModal').modal('hide');
$('#pendahuluanserahanModal').modal('hide');
});
}else if(data == 'GAGAL'){
Swal.fire({
icon: 'error',
title: 'Transaksi Gagal'
}).then(function(){
$('#denominasiHQModal').modal('hide');
$('#pendahuluanserahanModal').modal('hide');
});
}
}
});
}
</script>
@endsection
@@ -0,0 +1,77 @@
<div class="modal fade" id="denominasiHQModal" tabindex="-1" role="dialog" aria-labelledby="denominasiHQModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" data-toggle="pill" href="#home" role="tab" aria-controls="pills-flamingo" aria-selected="true">Bundle</a>
</li>
</ul>
<label class="mt-2 ml-3">Amaun Sebenar:</label><input type="text" class="form-control col-3 ml-3" id="amaundiminta" placeholder="0.00" readonly>
<label class="mt-2 ml-3">Amaun Kiraan:</label><input type="text" class="form-control col-3 ml-3" id="amaunkiraan" placeholder="0.00" readonly>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="tab-content">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="flamingo-tab">
<table class="table">
<tr>
<th></th>
<th>Ambilan</th>
<th>Total</th>
<th></th>
<th>Ambilan</th>
<th>Total (RM)</th>
</tr>
<tr>
<td>RM1</td>
<td><input type="text" name="ambilanb1" class="form-control" id="bundle1" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb1" class="form-control" id="totalb1" value="0.00" readonly/> </td>
<td> RM20</td>
<td><input type="text" name="ambilanb20" class="form-control" id="bundle20" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb20" class="form-control" id="totalb20" value="0.00" readonly/> </td>
</tr>
<tr>
<td>RM5</td>
<td><input type="text" name="ambilanb5" class="form-control" id="bundle5" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb5" class="form-control" id="totalb5" value="0.00" readonly/> </td>
<td>RM50</td>
<td><input type="text" name="ambilanb50" class="form-control" id="bundle50" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb50" class="form-control" id="totalb50" value="0.00" readonly/> </td>
</tr>
<tr>
<td>RM10</td>
<td><input type="text" name="ambilanb10" class="form-control" id="bundle10" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb10" class="form-control" id="totalb10" value="0.00" readonly/> </td>
<td>RM100 </td>
<td><input type="text" name="ambilanb100" class="form-control" id="bundle100" onkeyup="kiraan(this)"/> </td>
<td><input type="text" name="totalb100" class="form-control" id="totalb100" value="0.00" readonly/> </td>
</tr>
</table>
</div>
</div>
<input type="hidden" id="jenisjenis"/>
<input type="hidden" id="kodcawangan"/>
<input type="hidden" id="tellerla"/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" onclick="funcbatal()">Batal</button>
<button type="button" class="btn btn-success btn-lg" onclick="terimapost()">Terima</button>
</div>
</div>
</div>
</div>
@@ -0,0 +1,49 @@
<!-- Modal Wakil -->
<div class="modal fade" id="pendahuluanserahanModal" tabindex="-1" role="dialog" aria-labelledby="pendahuluanserahanModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="pendahuluanserahanModalTitle">Daftar Pendahuluan / Serahan</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="text-center mx-auto">
<input type="radio" name="radwang" id="radiopendahuluanserahan" value="pendahuluan"/><label class="ml-2">Wang Pendahuluan Daripada HQ</label>
<input type="radio" name="radwang" id="radiopendahuluanserahan" value="serahan" class="ml-3"/><label class="ml-2">Wang Serahan Daripada HQ</label>
</div>
<div class="text-center mx-auto mt-4">
<div class="row">
<label class="col-2 mt-2">Tarikh</label>
<input type="text" class="form-control col-4 mt-2" id="tarikh" name="tarikh" readonly/>
</div>
<div class="row">
<label class="col-2 mt-2">Debit Akaun</label>
<input type="text" class="form-control col-4 mt-2" name="dtacct" id="dtacct" readonly/>
</div>
<div class="row">
<label class="col-2 mt-2">Kredit (RM)</label>
<input type="text" class="form-control col-4 mt-2" name="ktacct" id="ktacct" readonly/>
</div>
<div class="row">
<label class="col-2 mt-2">Keterangan</label>
<input type="text" class="form-control col-8 mt-2" name="keterangan" readonly id="keterangan"/>
</div>
<div class="row">
<label class="col-2 mt-2">Amaun (RM)</label>
<input type="text" class="form-control col-4 mt-2" name="amaun" id="amaun" onkeypress="return validateformat(event)"/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
<button type="button" class="btn btn-success btn-lg" onclick="functerima()">Terima</button>
</div>
</div>
</div>
</div>
+137 -82
View File
@@ -849,29 +849,29 @@
}
$.ajax({
method:'get',
url: "{{ route('bayaran.ansuranstawarruq') }}",
data:{
"bayaran" : bayar,
"kodcaw" : kodcaw,
"norujukan" : norujukan,
"teller" : teller
},
success:function(success_data){
method:'get',
url: "{{ route('bayaran.ansuranstawarruq') }}",
data:{
"bayaran" : bayar,
"kodcaw" : kodcaw,
"norujukan" : norujukan,
"teller" : teller
},
success:function(success_data){
var urlroute = '{{ route("resit.ansurans", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
var urlroute = '{{ route("resit.ansurans", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
'Berjaya!',
'Bayaran Ansuran Berjaya',
'success'
).then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ url()->previous() }}");
})
}
});
Swal.fire(
'Berjaya!',
'Bayaran Ansuran Berjaya',
'success'
).then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ url()->previous() }}");
})
}
});
}
else if(tarikhgadai < tarikhtawarruq)
@@ -1065,7 +1065,7 @@
var kadarupah = "{{ $gadai['kadarupah'] }}";
var nilai_marhun_lama = parseFloat("{{ $gadai['nilaimarhun'] }}");
var nilai_marhun = parseFloat("{{ $gadai['nilaimarhun'] }}") - sumnilaimarhun;
var pinjamanbaru = $('#bakipinjaman').val();
var pinjamanbaru = $('#bakipinjaman').val().replace(/[^0-9.-]+/g,"");
var ansuran = 0;
var addpinjaman = 0;
var bakipinjaman = $('#perludibayar').val();
@@ -1078,6 +1078,7 @@
var marhun_detail = marhun_baru;
var kuantiti_marhun = Number("{{sizeof($marhun)}}") - array_recno.length;
var nowakil = nw;
var kadarupahbaru = 0;
@@ -1209,7 +1210,7 @@
allowEscapeKey: false,
allowEnterKey: false
})
let siricreated = 0;
$.ajax({
method:'post',
url: "{{ route('khazanah.createkelulusan') }}",
@@ -1222,6 +1223,7 @@
},
success:function(data){
console.log(data);
siricreated = data;
},
error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
@@ -1229,37 +1231,46 @@
}
});
//TIME INTERVAL
let timerInterval;
timerInterval = setInterval(function(){
$.ajax({
method:'get',
url: "{{ route('khazanah.getkelulusan') }}",
data: {
"norujukan" : norujukan
},
success:function(data){
if(data != '')
{
clearInterval(timerInterval);
Swal.fire({
icon: 'success',
title: 'Telah Disahkan'
}).then(function(){
tambahpinjamanfunc();
var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
cluster: 'ap1',
encrypted: true
});
}
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
var channel = pusher.subscribe('notice-kelulusan');
channel.bind('my-kelulusan', function(data) {
if(data.norujukan == norujukan && data.siri == siricreated)
{
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan',
text: `Komen : ${data.komen}`
}).then(function(){
tambahpinjamanfunc();
});
}
});
}, 3000);
else if(data.kelulusan == 'batal')
{
Swal.fire({
icon: 'warning',
title: 'Telah Dibatalkan',
text: `Komen : ${data.komen}`
}).then(function(){
// $("#terima_gadai").prop('disabled', false);
return false;
});
}
}
});
} else if (result.dismiss === Swal.DismissReason.cancel) {
swalWithBootstrapButtons.fire(
'Gagal',
@@ -1309,7 +1320,7 @@
allowEscapeKey: false,
allowEnterKey: false
})
let siricreated = 0;
$.ajax({
method:'post',
url: "{{ route('operasi.createkelulusan') }}",
@@ -1322,6 +1333,7 @@
},
success:function(data){
console.log(data);
siricreated = data;
},
error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
@@ -1329,36 +1341,79 @@
}
});
//TIME INTERVAL
let timerInterval;
timerInterval = setInterval(function(){
$.ajax({
method:'get',
url: "{{ route('operasi.getkelulusan') }}",
data: {
"norujukan" : norujukan
},
success:function(data){
if(data != ''){
clearInterval(timerInterval);
Swal.fire({
icon: 'success',
title: 'Telah Disahkan'
}).then(function(){
$(func).attr("onSubmit","return true;");
$(func).submit();
return true;
});
}
},
error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
var pusher = new Pusher('26b0ec2f297f94b7aa9b', {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('notice-kelulusan');
channel.bind('my-kelulusan', function(data) {
if(data.norujukan == norujukan && data.siri == siricreated)
{
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan',
text: `Komen : ${data.komen}`
}).then(function(){
$(func).attr("onSubmit","return true;");
$(func).submit();
return true;
});
}
});
}, 3000);
else if(data.kelulusan == 'batal')
{
Swal.fire({
icon: 'warning',
title: 'Telah Dibatalkan',
text: `Komen : ${data.komen}`
}).then(function(){
$("#terima_gadai").prop('disabled', false);
return false;
});
}
}
});
//TIME INTERVAL
// let timerInterval;
// timerInterval = setInterval(function(){
// $.ajax({
// method:'get',
// url: "{{ route('operasi.getkelulusan') }}",
// data: {
// "norujukan" : norujukan
// },
// success:function(data){
// if(data != ''){
// clearInterval(timerInterval);
// Swal.fire({
// icon: 'success',
// title: 'Telah Disahkan'
// }).then(function(){
// $(func).attr("onSubmit","return true;");
// $(func).submit();
// return true;
// });
// }
// },
// error: function(xhr, status, error) {
// var err = eval("(" + xhr.responseText + ")");
// alert(xhr.responseText);
// }
// });
// }, 3000);
}else if (result.dismiss === Swal.DismissReason.cancel){
swalWithBootstrapButtons.fire(
'Gagal',
@@ -1403,7 +1458,7 @@
var addpinjaman = $('#tambahpinjam').val() == '' ? 0 : parseFloat($('#tambahpinjam').val());
var maxpinjaman = parseFloat($('#tambahpinjamsebenar').val());
var bakipinjaman = maxpinjaman - parseFloat($('#tambahpinjam').val());
var bakiupah = 0;
var bakiupah = $('#bayaranditerima').val();
var historygadaian = "{{ $gadai['norujukan'] }}";
var marhun = "{{ $gadai['marhun'] }}";
var total_berat = parseFloat("{{ $gadai['berat'] }}");
@@ -424,13 +424,16 @@ hr.new5 {
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakipjm'],2) }} </td>
</tr>
<tr>
<td style="width:10px">(+) Tambah Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['addpinjaman'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Pembiayaan Baru</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['pinjaman'] + $penebusan['addpinjaman'],2) }} </td>
<td style="width:10px"><b>Pembiayaan Baru</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakipjm'] + $penebusan['addpinjaman'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Bayaran Keuntungan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
</tr>
@@ -516,13 +519,16 @@ hr.new5 {
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakipjm'],2) }} </td>
</tr>
<tr>
<td style="width:10px">(+) Tambah Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['addpinjaman'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Pembiayaan Baru</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['pinjaman'] + $penebusan['addpinjaman'],2) }} </td>
<td style="width:10px"><b>Pembiayaan Baru</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakipjm'] + $penebusan['addpinjaman'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Bayaran Keuntungan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
</tr>
@@ -0,0 +1,576 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
/* Red border */
hr.new1 {
border-top: 1px solid red;
}
/* Dashed red border */
hr.new2 {
border-top: 1px dashed red;
}
/* Dotted red border */
hr.new3 {
border-top: 1px dotted red;
}
/* Thick red border */
hr.new4 {
border: 1px solid red;
}
/* Large rounded green border */
hr.new5 {
border: 10px solid green;
border-radius: 5px;
}
</style>
<style>
#cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:20%;
font-size:10px;
border: 1px solid black;
}
#cust td, #cust th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align:right;
}
#cust tr:nth-child(even){background-color: #ffffff;}
#cust tr:hover {background-color: #ddd;}
#cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align:right;
background-color: #d9deda;
color: black;
padding:2px;
}
#cust {
margin-left: auto;
margin-right: 0;
}
</style>
<style>
hr.new1 {
border-top: 1px dotted black;
}
.khazanah{
border:1px solid black;
margin-left:20px;
padding:10px;
width : 250px;
transform: rotate(-90deg);
font-size:11px;
}
#inside {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#inside td, #inside th {
border: none;
padding: 2px;
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#semakan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
margin-top:40px;
font-size:10px;
}
#semakan td, #semakan th {
border: none;
padding: 2px;
text-align: center;
}
#semakan tr:nth-child(even){background-color: #ffffff;}
#semakan tr:hover {background-color: #ddd;}
#semakan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#salinan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:11px;
}
#salinan td, #salinan th {
padding: 2px;
}
#salinan tr:nth-child(even){background-color: #ffffff;}
#salinan tr:hover {background-color: #ffffff;}
#salinan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: right;
background-color: #ffffff;
color: black;
padding:2px;
}
#perjanjian {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#perjanjian td, #perjanjian th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#perjanjian tr:nth-child(even){background-color:#ffffff}
#perjanjian tr:hover {background-color: #ddd;}
#perjanjian th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:5px;
}
#keuntungan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#keuntungan td, #keuntungan th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#keuntungan tr:nth-child(even){background-color: #ffffff;}
#keuntungan tr:hover {background-color: #ddd;}
#keuntungan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 45%;
font-size:10px;
border: 1px solid black;
}
#payment td, #payment th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align: left;
}
#payment tr:nth-child(even){background-color: #ffffff;}
#payment tr:hover {background-color: #ddd;}
#payment th {
padding-top: 12px;
padding-bottom: 12px;
text-align:left;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
margin-left: auto;
margin-right: auto;
}
#akuan td, #akuan th {
padding: 7px;
font-size:9px;
padding:4px;
}
#akuan tr:nth-child(even){background-color:#ffffff;}
#akuan tr:hover {background-color: #ddd;}
#akuan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:3px;
}
.page-break{
page-break-before:always;
}
.formula{
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:10%;
font-size:10px;
}
#copy_cust tr:nth-child(even){background-color: #ffffff;}
#copy_cust tr:hover {background-color:#ffffff}
#copy_cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 50%;
font-size:10px;
}
#copy_cust td, #copy_cust th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
text-align:right;
width: 10%;
}
#copy_cust {
margin-right:0px;margin-left:auto
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
</style>
<table>
<td rowspan="4" style="width:50px;"> <img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" > </td>
<td rowspan="4" style="width:50px;"><img src="{{ asset('img/pkb.png') }}" style="width:50px" alt="User Image" class="center" > </td>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pelanggan</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr>
<tr>
<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>: @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>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['hargajualan']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($totaltransaction,2) }}</td>
</tr>
<tr>
<td style="width:10px"><b>Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakihargajualan'],2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Rebate</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['rebate'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Bayaran</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
<br>
<hr class="new2"></hr>
<br>
<br>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pejabat</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp </td>
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<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>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Harga Jualan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['hargajualan']),2) }} </td>
</tr>
<tr>
<td style="width:10px">(-) Bayaran Pelanggan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($totaltransaction,2) }} </td>
</tr>
<tr>
<td style="width:10px">Baki Harga Jualan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($gadai['bakihargajualan'],2) }}</td>
</tr>
<tr>
<td style="width:10px">(-) Rebate</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['rebate'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Bayaran</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['bakihargajualan'] - $penebusan['rebate']),2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
@@ -0,0 +1,564 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
/* Red border */
hr.new1 {
border-top: 1px solid red;
}
/* Dashed red border */
hr.new2 {
border-top: 1px dashed red;
}
/* Dotted red border */
hr.new3 {
border-top: 1px dotted red;
}
/* Thick red border */
hr.new4 {
border: 1px solid red;
}
/* Large rounded green border */
hr.new5 {
border: 10px solid green;
border-radius: 5px;
}
</style>
<style>
#cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:20%;
font-size:10px;
border: 1px solid black;
}
#cust td, #cust th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align:right;
}
#cust tr:nth-child(even){background-color: #ffffff;}
#cust tr:hover {background-color: #ddd;}
#cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align:right;
background-color: #d9deda;
color: black;
padding:2px;
}
#cust {
margin-left: auto;
margin-right: 0;
}
</style>
<style>
hr.new1 {
border-top: 1px dotted black;
}
.khazanah{
border:1px solid black;
margin-left:20px;
padding:10px;
width : 250px;
transform: rotate(-90deg);
font-size:11px;
}
#inside {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:10px;
}
#inside td, #inside th {
border: none;
padding: 2px;
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#semakan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
margin-top:40px;
font-size:10px;
}
#semakan td, #semakan th {
border: none;
padding: 2px;
text-align: center;
}
#semakan tr:nth-child(even){background-color: #ffffff;}
#semakan tr:hover {background-color: #ddd;}
#semakan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#salinan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:100%;
font-size:11px;
}
#salinan td, #salinan th {
padding: 2px;
}
#salinan tr:nth-child(even){background-color: #ffffff;}
#salinan tr:hover {background-color: #ffffff;}
#salinan th {
padding-top: 12px;
padding-bottom: 10px;
text-align: right;
background-color: #ffffff;
color: black;
padding:2px;
}
#perjanjian {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#perjanjian td, #perjanjian th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#perjanjian tr:nth-child(even){background-color:#ffffff}
#perjanjian tr:hover {background-color: #ddd;}
#perjanjian th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:5px;
}
#keuntungan {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 100%;
font-size:10px;
}
#keuntungan td, #keuntungan th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
}
#keuntungan tr:nth-child(even){background-color: #ffffff;}
#keuntungan tr:hover {background-color: #ddd;}
#keuntungan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 45%;
font-size:10px;
border: 1px solid black;
}
#payment td, #payment th {
border: 0px solid;
padding: 3px;
font-size:9px;
text-align: left;
}
#payment tr:nth-child(even){background-color: #ffffff;}
#payment tr:hover {background-color: #ddd;}
#payment th {
padding-top: 12px;
padding-bottom: 12px;
text-align:left;
background-color: #d9deda;
color: black;
padding:2px;
}
#payment {
margin-left: auto;
margin-right: auto;
}
#akuan td, #akuan th {
padding: 7px;
font-size:9px;
padding:4px;
}
#akuan tr:nth-child(even){background-color:#ffffff;}
#akuan tr:hover {background-color: #ddd;}
#akuan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:3px;
}
.page-break{
page-break-before:always;
}
.formula{
font-family: Arial, Helvetica, sans-serif;
font-size:12px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width:10%;
font-size:10px;
}
#copy_cust tr:nth-child(even){background-color: #ffffff;}
#copy_cust tr:hover {background-color:#ffffff}
#copy_cust th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
#copy_cust {
font-family: Arial, Helvetica, sans-serif;
border-collapse:collapse;
width: 50%;
font-size:10px;
}
#copy_cust td, #copy_cust th {
border: 1px solid #ddd;
padding: 2px;
font-size:9px;
text-align:right;
width: 10%;
}
#copy_cust {
margin-right:0px;margin-left:auto
}
#inside tr:nth-child(even){background-color: #ffffff;}
#inside tr:hover {background-color: #ddd;}
#inside th {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: #d9deda;
color: black;
padding:4px;
}
</style>
<table>
<td rowspan="4" style="width:50px;"> <img src="{{ asset('img/ARRAHN1.png') }}" style="width:50px" alt="User Image" class="center" > </td>
<td rowspan="4" style="width:50px;"><img src="{{ asset('img/pkb.png') }}" style="width:50px" alt="User Image" class="center" > </td>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pelanggan</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> </td> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg'] }} </td>
</tr>
<tr>
<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>: @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>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman']),2) }} </td>
</tr>
<tr>
<td style="width:10px">Jumlah Upah</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Tebus Keseluruhan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>
<br>
<hr class="new2"></hr>
<br>
<br>
</table>
<table id="cust">
<tr>
<th style="width:5px;"> Salinan Pejabat</th>
</tr>
<tr>
<td style="width:5px;"> RESIT BAYARAN </td>
</tr>
</table>
<br>
<table id="inside">
<tr>
<td colspan="3">Marhun</td> <td>: {{ $gadai['marhun'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> No SAG</td><td>: {{ $gadai['norujukan'] }} </td>
</tr>
<tr>
<td colspan="3">Nama</td> <td>: {{ $customers_info['nama'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tarikh Bayar</td><td>: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp </td>
</tr>
<tr>
<td colspan="3">No K/P </td> <td>: {{ $customers_info['kpbaru'] }} </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> Tempoh Simpan</td><td>: {{ $gadai['jbg`'] }} </td>
</tr>
<tr>
<td colspan="3">Nama Wakil </td> <td>: @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td> </td><td> </td>
</tr>
<tr>
<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>
</tr>
</table>
<br>
<table id="payment">
<tr>
<td style="width:10px"> Tarikh Bayaran</td><td style="width:5px"> </td><td style="width:10px">: @php $time = new DateTime($penebusan['t_tebus']); $date = $time->format('d/m/y'); echo $date; @endphp</td>
</tr>
<tr>
<td style="width:10px">Pembiayaan</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman']),2) }} </td>
</tr>
<tr>
<td style="width:10px">Jumlah Upah</td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format($penebusan['bakiupah'],2) }} </td>
</tr>
<tr>
<td style="width:10px"><b>Tebus Keseluruhan</b></td><td style="width:5px"> </td><td style="width:10px">: RM {{ number_format(($gadai['pinjaman'] + $penebusan['bakiupah']),2) }}</td>
</tr>
</table>
<br>
<table id="semakan">
<tr>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
<td></td>
<td colspan="3">.................................................... </td>
</tr>
<tr>
<td colspan="3">DiSemak </td>
<td></td>
<td colspan="3"> Cagaran Di Keluarkan</td>
<td></td>
<td colspan="3">Cagaran Diterima </td>
<td></td>
<td colspan="3"> Ar-Rahn</td>
</tr>
</table>
<br>