ggwp
This commit is contained in:
@@ -6,7 +6,6 @@ namespace App\Http\Controllers;
|
|||||||
//Events
|
//Events
|
||||||
use App\Events\OperasiNotice;
|
use App\Events\OperasiNotice;
|
||||||
use App\Events\StatusLiked;
|
use App\Events\StatusLiked;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
@@ -135,37 +134,4 @@ class OperasiController extends Controller
|
|||||||
|
|
||||||
return view('operasi.hargaemas',compact('cawangan_info','api_url','harga_emas'));
|
return view('operasi.hargaemas',compact('cawangan_info','api_url','harga_emas'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createhargaemas(Request $request)
|
|
||||||
{
|
|
||||||
$auth_user = Auth::user();
|
|
||||||
$api_url = config('api.url');
|
|
||||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
||||||
$harga_emas = Http::get(config('api.url') . '/api/harga_emas/')->json();
|
|
||||||
|
|
||||||
$kemaskini = Http::post(config('api.url') . '/api/harga_emas/create/',[
|
|
||||||
'karat' => $request->karat,
|
|
||||||
'keterangan'=> $request->keterangan,
|
|
||||||
'harga' => $request->harga,
|
|
||||||
'harga2' => $request->harga
|
|
||||||
])->json();
|
|
||||||
|
|
||||||
return redirect('/operasi/hargaemas');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function updatehargaemas(Request $request)
|
|
||||||
{
|
|
||||||
|
|
||||||
$auth_user = Auth::user();
|
|
||||||
$api_url = config('api.url');
|
|
||||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
|
||||||
$harga_emas = Http::get(config('api.url') . '/api/harga_emas/')->json();
|
|
||||||
|
|
||||||
$kemaskini = Http::put(config('api.url') . '/api/harga_emas/update/',[
|
|
||||||
"recno" => $request->recno,
|
|
||||||
"harga" => $request->harga
|
|
||||||
])->json();
|
|
||||||
|
|
||||||
return redirect('/operasi/hargaemas');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
-2
@@ -244,7 +244,9 @@ async function openuptambahdanserah(e)
|
|||||||
input: 'text',
|
input: 'text',
|
||||||
inputPlaceholder: 'Amaun',
|
inputPlaceholder: 'Amaun',
|
||||||
confirmButtonText: 'Terima',
|
confirmButtonText: 'Terima',
|
||||||
allowOutsideClick: false
|
showCancelButton:true,
|
||||||
|
cancelButtonText:'Batal',
|
||||||
|
allowOutsideClick: true
|
||||||
})
|
})
|
||||||
|
|
||||||
if (amaun) {
|
if (amaun) {
|
||||||
@@ -289,7 +291,9 @@ async function openuptambahdanserah(e)
|
|||||||
input: 'text',
|
input: 'text',
|
||||||
inputPlaceholder: 'Amaun',
|
inputPlaceholder: 'Amaun',
|
||||||
confirmButtonText: 'Terima',
|
confirmButtonText: 'Terima',
|
||||||
allowOutsideClick: false
|
showCancelButton:true,
|
||||||
|
cancelButtonText:'Batal',
|
||||||
|
allowOutsideClick: true
|
||||||
})
|
})
|
||||||
|
|
||||||
if (amaun) {
|
if (amaun) {
|
||||||
|
|||||||
@@ -527,7 +527,7 @@
|
|||||||
});
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'get',
|
method:'get',
|
||||||
url:api_url + '/api/gadai/norujukan/'+histid,
|
url: api_url + '/api/gadai/norujukan/'+histid,
|
||||||
success:function(gadai){
|
success:function(gadai){
|
||||||
rekodasal(gadai);
|
rekodasal(gadai);
|
||||||
}
|
}
|
||||||
@@ -557,7 +557,7 @@
|
|||||||
});
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: api + '/api/transaction/' + histid,
|
url: api_url + '/api/transaction/' + histid,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
historybayarantable(data);
|
historybayarantable(data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form action="" id="maklumat_marhun" method="post">
|
<form action="" id="maklumat_marhun" method="post">
|
||||||
<div class="row">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<input type="hidden" name="kodcaw" id="kodcaw" value="">
|
<input type="hidden" name="kodcaw" id="kodcaw" value="">
|
||||||
@@ -191,21 +191,7 @@
|
|||||||
<div class="col-md-8"><input class="form-control" type="text" name="jumlah_nilai_marhun" id="jumlah_nilai_marhun" readonly></div>
|
<div class="col-md-8"><input class="form-control" type="text" name="jumlah_nilai_marhun" id="jumlah_nilai_marhun" readonly></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<img style="width:200px" src="{{ asset('img/logo_arrahn_baru.png') }}" alt="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group row" style="margin-right:auto;margin-left:auto">
|
|
||||||
<button class="btn btn-primary mr-2">KAMERA</button>
|
|
||||||
<button class="btn btn-primary">MUAT NAIK</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<input class="btn btn-primary mr-2" type="button" name="tambah_marhun" id="tambah_marhun" value="Tambah">
|
<input class="btn btn-primary mr-2" type="button" name="tambah_marhun" id="tambah_marhun" value="Tambah">
|
||||||
@@ -368,6 +354,7 @@
|
|||||||
total_nilai_marhun = total_nilai_marhun + Number(marhun_detail['n_marhun']);
|
total_nilai_marhun = total_nilai_marhun + Number(marhun_detail['n_marhun']);
|
||||||
total_berat = total_berat + Number(marhun_detail['berat']);
|
total_berat = total_berat + Number(marhun_detail['berat']);
|
||||||
marhun_details = marhun_details + marhun_detail['bil'] + " " + marhun_detail['marhun'] +",";
|
marhun_details = marhun_details + marhun_detail['bil'] + " " + marhun_detail['marhun'] +",";
|
||||||
|
jumlah_nilai_marhun += Number(marhun_detail['n_marhun']);
|
||||||
tablemarhun.row.add([
|
tablemarhun.row.add([
|
||||||
counter,
|
counter,
|
||||||
marhun_detail['recno'],
|
marhun_detail['recno'],
|
||||||
@@ -379,12 +366,12 @@
|
|||||||
marhun_detail['harga'],
|
marhun_detail['harga'],
|
||||||
"<div class='buttonpunya text-center'><button onclick='editmarhun(this)' class='btn btn-primary'><i class='fas fa-edit'></i></button> <button onclick='deletemarhun(this)' class='btn btn-danger'><i class='fas fa-trash-alt'></i></button></div>"
|
"<div class='buttonpunya text-center'><button onclick='editmarhun(this)' class='btn btn-primary'><i class='fas fa-edit'></i></button> <button onclick='deletemarhun(this)' class='btn btn-danger'><i class='fas fa-trash-alt'></i></button></div>"
|
||||||
]).draw();
|
]).draw();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
counter = counter + 1;
|
counter = counter + 1;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$('#bilangan_marhun').val(formatter.format(counter-1));
|
||||||
|
$('#jumlah_nilai_marhun').val(formatter.format(jumlah_nilai_marhun));
|
||||||
if (count == 1){
|
if (count == 1){
|
||||||
$('.buttonpunya').html("<button onclick='editmarhun(this)' class='btn btn-primary'><i class='fas fa-edit'></i></button>");
|
$('.buttonpunya').html("<button onclick='editmarhun(this)' class='btn btn-primary'><i class='fas fa-edit'></i></button>");
|
||||||
}
|
}
|
||||||
@@ -515,6 +502,7 @@
|
|||||||
var berat_emas = $('#berat_emas').val();
|
var berat_emas = $('#berat_emas').val();
|
||||||
var harga = $('#harga').val();
|
var harga = $('#harga').val();
|
||||||
var nilaimarhun = $('#nilai_marhun').val();
|
var nilaimarhun = $('#nilai_marhun').val();
|
||||||
|
var bilangan_marhun_daftar = Number($('#bilangan_marhun').val());
|
||||||
var nilai_marhun = Number(nilaimarhun.replace(/[^0-9.-]+/g,""));
|
var nilai_marhun = Number(nilaimarhun.replace(/[^0-9.-]+/g,""));
|
||||||
var nota_array = $('#nota').val();
|
var nota_array = $('#nota').val();
|
||||||
if(nota_array != null){
|
if(nota_array != null){
|
||||||
@@ -554,7 +542,7 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
if(jumlah_marhun<10){
|
if(bilangan_marhun_daftar<10){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'POST',
|
method:'POST',
|
||||||
url: api_url + '/api/marhun/'+kodcaw,
|
url: api_url + '/api/marhun/'+kodcaw,
|
||||||
@@ -619,6 +607,7 @@
|
|||||||
var berat_emas = $('#berat_emas').val();
|
var berat_emas = $('#berat_emas').val();
|
||||||
var harga = $('#harga').val();
|
var harga = $('#harga').val();
|
||||||
var nilaimarhun = $('#nilai_marhun').val();
|
var nilaimarhun = $('#nilai_marhun').val();
|
||||||
|
var bilangan_marhun_daftar = Number($('#bilangan_marhun').val());
|
||||||
var nilai_marhun = Number(nilaimarhun.replace(/[^0-9.-]+/g,""));
|
var nilai_marhun = Number(nilaimarhun.replace(/[^0-9.-]+/g,""));
|
||||||
var nota_array = $('#nota').val();
|
var nota_array = $('#nota').val();
|
||||||
console.log($.isNumeric(berat_emas));
|
console.log($.isNumeric(berat_emas));
|
||||||
@@ -655,7 +644,7 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
if(jumlah_marhun < 10){
|
if(bilangan_marhun_daftar < 10){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'POST',
|
method:'POST',
|
||||||
url: api_url + '/api/marhun/'+kodcaw,
|
url: api_url + '/api/marhun/'+kodcaw,
|
||||||
@@ -711,6 +700,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function verifyGadai(func){
|
function verifyGadai(func){
|
||||||
|
$("#terima_gadai").prop('disabled', true);
|
||||||
var kodcaw = $('#kodcaw').val();
|
var kodcaw = $('#kodcaw').val();
|
||||||
var nokp = $('#nokp').val();
|
var nokp = $('#nokp').val();
|
||||||
var nopelanggan = $('#nopelanggan').val();
|
var nopelanggan = $('#nopelanggan').val();
|
||||||
@@ -727,6 +717,7 @@
|
|||||||
var max_pinjaman = nilai_marhun_total * 0.80;
|
var max_pinjaman = nilai_marhun_total * 0.80;
|
||||||
|
|
||||||
if(pinjaman < min_pinjaman){
|
if(pinjaman < min_pinjaman){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -736,6 +727,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(pinjaman > max_pinjaman){
|
else if(pinjaman > max_pinjaman){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -745,8 +737,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(pinjaman > Number(pembiyaan_max_pelulus)+10){
|
if(pinjaman > Number(pembiyaan_max_pelulus)+10 || pinjaman >=10000){
|
||||||
|
|
||||||
const swalWithBootstrapButtons = Swal.mixin({
|
const swalWithBootstrapButtons = Swal.mixin({
|
||||||
customClass: {
|
customClass: {
|
||||||
confirmButton: 'btn btn-success',
|
confirmButton: 'btn btn-success',
|
||||||
@@ -756,7 +747,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
swalWithBootstrapButtons.fire({
|
swalWithBootstrapButtons.fire({
|
||||||
title: 'Dapatkan Pengesahan Daripada Operasi?',
|
title: 'Dapatkan Pengesahan Operasi',
|
||||||
text: "Tetapan margin melebihi 75% untuk Operasi!",
|
text: "Tetapan margin melebihi 75% untuk Operasi!",
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
|
|||||||
@@ -607,6 +607,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function verifyGadai(func){
|
function verifyGadai(func){
|
||||||
|
$("#terima_gadai").prop('disabled', true);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var kodcaw = $('#kodcaw').val();
|
var kodcaw = $('#kodcaw').val();
|
||||||
var nokp = $('#nokp').val();
|
var nokp = $('#nokp').val();
|
||||||
@@ -624,6 +625,7 @@
|
|||||||
var max_pinjaman = nilai_marhun_total * 0.80;
|
var max_pinjaman = nilai_marhun_total * 0.80;
|
||||||
|
|
||||||
if($.isNumeric(pinjaman) == false){
|
if($.isNumeric(pinjaman) == false){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -633,6 +635,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(pinjaman < min_pinjaman){
|
if(pinjaman < min_pinjaman){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -641,6 +644,7 @@
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}else if(pinjaman > max_pinjaman){
|
}else if(pinjaman > max_pinjaman){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Amaran!',
|
title: 'Amaran!',
|
||||||
@@ -655,6 +659,7 @@
|
|||||||
success:function(data){
|
success:function(data){
|
||||||
var check_komuditi = Object.keys(data).length;
|
var check_komuditi = Object.keys(data).length;
|
||||||
if(check_komuditi == 0){
|
if(check_komuditi == 0){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Unit Komuditi Berbaki Minumum',
|
title: 'Unit Komuditi Berbaki Minumum',
|
||||||
@@ -664,6 +669,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
if(Number(data['unit_komuditi']) < pinjaman){
|
if(Number(data['unit_komuditi']) < pinjaman){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: 'Baki Unit Komuditi Tidak Mencukupi',
|
title: 'Baki Unit Komuditi Tidak Mencukupi',
|
||||||
@@ -690,11 +696,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
swalWithBootstrapButtons.fire({
|
swalWithBootstrapButtons.fire({
|
||||||
title: 'Dapatkan Pengesahan Daripada Operasi?',
|
title: 'Dapatkan Pengesahan Operasi',
|
||||||
text: errortext,
|
text: errortext,
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonText: 'Setuju!',
|
confirmButtonText: 'Hantar',
|
||||||
cancelButtonText: 'Batal',
|
cancelButtonText: 'Batal',
|
||||||
reverseButtons: true
|
reverseButtons: true
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
@@ -754,7 +760,7 @@
|
|||||||
clearInterval(timerInterval);
|
clearInterval(timerInterval);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Menerima Pengesahan'
|
title: 'Telah Disahkan'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
$(func).attr("onSubmit","return true;");
|
$(func).attr("onSubmit","return true;");
|
||||||
$(func).submit();
|
$(func).submit();
|
||||||
@@ -769,6 +775,7 @@
|
|||||||
});
|
});
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
'Batal',
|
'Batal',
|
||||||
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
||||||
@@ -788,11 +795,11 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
swalWithBootstrapButtons.fire({
|
swalWithBootstrapButtons.fire({
|
||||||
title: 'Dapatkan Pengesahan Daripada Khazanah?',
|
title: 'Dapatkan Pengesahan Khazanah',
|
||||||
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
confirmButtonText: 'Setuju!',
|
confirmButtonText: 'Hantar',
|
||||||
cancelButtonText: 'Batal',
|
cancelButtonText: 'Batal',
|
||||||
reverseButtons: true
|
reverseButtons: true
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
@@ -853,7 +860,7 @@
|
|||||||
clearInterval(timerInterval);
|
clearInterval(timerInterval);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Menerima Pengesahan'
|
title: 'Telah Disahkan'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
|
|
||||||
$(func).attr("onSubmit","return true;");
|
$(func).attr("onSubmit","return true;");
|
||||||
@@ -870,6 +877,7 @@
|
|||||||
});
|
});
|
||||||
}, 3000);
|
}, 3000);
|
||||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||||
|
$("#terima_gadai").prop('disabled', false);
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
'Batal',
|
'Batal',
|
||||||
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
'Maklumat Gadaian Tidak Berjaya Disimpan',
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Mengesahkan Pengesahan'
|
title: 'Pengesahan Berjaya'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Mengesahkan Pengesahan'
|
title: 'Pengesahan Berjaya'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,19 +14,12 @@
|
|||||||
|
|
||||||
<form id="form-pendahuluan" action="{{ route('khazanah.KemaskiniSerahan') }}" method="post">
|
<form id="form-pendahuluan" action="{{ route('khazanah.KemaskiniSerahan') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<div class="row">
|
<div class="row mb-2">
|
||||||
<div class="col-2">Tarikh</div>
|
<div class="col-2">Tarikh</div>
|
||||||
<div class="col-3"> <input type="text" class="form-control" id="tarikh" name="tarikh" value="{{ $currdate=date('Y-m-d')}}" /></div>
|
<div class="col-3"><input type="text" class="form-control" id="tarikh" readonly name="tarikh" value="{{ $currdate=date('Y-m-d')}}" /></div>
|
||||||
<div class="col-4"></div> <div class="col-4"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-2">Teller ID </div>
|
<div class="col-2">Teller ID </div>
|
||||||
<div class="col-3"><input type="text" class="form-control" name="teller" value="{{ $array_reqteller['kodlaluan'] }}" readonly/></div>
|
<div class="col-3"><input type="text" class="form-control" name="teller" value="{{ $array_reqteller['kodlaluan'] }}" readonly/></div>
|
||||||
<div class="col-4"></div> <div class="col-4"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
|
||||||
|
|
||||||
<input type="hidden" name="no" value="{{ $array_reqteller['no'] }}"/>
|
<input type="hidden" name="no" value="{{ $array_reqteller['no'] }}"/>
|
||||||
|
|
||||||
@@ -42,9 +35,9 @@
|
|||||||
<div class="col-3"> </div>
|
<div class="col-3"> </div>
|
||||||
<div class="col-2"> </div>
|
<div class="col-2"> </div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<button type="button" data-toggle="modal" data-target="#marhunModal" class="btn btn-primary">Panduan Format Bundle</button>
|
<button type="button" data-toggle="modal" data-target="#marhunModal" class="btn btn-info">Panduan Format Bundle</button>
|
||||||
<input type="button" onclick="triggersubmit();" class="btn btn-primary" value="Terima"/>
|
<input type="button" onclick="triggersubmit();" class="btn btn-primary" value="Terima"/>
|
||||||
<a href="{{ url('/serahan') }}" class="btn btn-primary">Batal</a>
|
<a href="{{ url('/serahan') }}" class="btn btn-danger">Batal</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@@ -61,7 +54,7 @@
|
|||||||
<div class="tab-content" id="myTabContent">
|
<div class="tab-content" id="myTabContent">
|
||||||
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
||||||
|
|
||||||
<h4>Wang Bundle</h4>
|
<h4>Wang Bundle Dari Peti Besi</h4>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -120,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
||||||
|
|
||||||
<h4>Wang Keping</h4>
|
<h4>Wang Keping Dari Peti Besi</h4>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|||||||
@@ -14,21 +14,12 @@
|
|||||||
|
|
||||||
<form id="form-pendahuluan" action="{{ route('khazanah.kemaskiniPendahuluan') }}" method="post">
|
<form id="form-pendahuluan" action="{{ route('khazanah.kemaskiniPendahuluan') }}" method="post">
|
||||||
@csrf
|
@csrf
|
||||||
<div class="row">
|
<div class="row mb-2">
|
||||||
<div class="col-2">Tarikh</div>
|
<div class="col-2">Tarikh</div>
|
||||||
<div class="col-3"> <input type="text" class="form-control" id="tarikh" name="tarikh" value="{{ $currdate=date('Y-m-d')}}" /></div>
|
<div class="col-3"><input type="text" class="form-control" id="tarikh" readonly name="tarikh" value="{{ $currdate=date('Y-m-d')}}" /></div>
|
||||||
<div class="col-4"></div> <div class="col-4"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-2">Teller ID </div>
|
<div class="col-2">Teller ID </div>
|
||||||
<div class="col-3"><input type="text" class="form-control" name="teller" value="{{ $array_reqteller['kodlaluan'] }}" readonly/></div>
|
<div class="col-3"><input type="text" class="form-control" name="teller" value="{{ $array_reqteller['kodlaluan'] }}" readonly/></div>
|
||||||
<div class="col-4"></div> <div class="col-4"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" name="no" value="{{ $array_reqteller['no'] }}"/>
|
<input type="hidden" name="no" value="{{ $array_reqteller['no'] }}"/>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -43,9 +34,9 @@
|
|||||||
<div class="col-3"> </div>
|
<div class="col-3"> </div>
|
||||||
<div class="col-2"> </div>
|
<div class="col-2"> </div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<button type="button" data-toggle="modal" data-target="#marhunModal" class="btn btn-primary">Panduan Format Bundle</button>
|
<button type="button" data-toggle="modal" data-target="#marhunModal" class="btn btn-info">Panduan Format Bundle</button>
|
||||||
<input type="button" onclick="triggersubmit();" class="btn btn-primary" value="Terima"/>
|
<input type="button" onclick="triggersubmit();" class="btn btn-primary" value="Lulus"/>
|
||||||
<a href="{{ url('/pendahuluan') }}" class="btn btn-primary">Batal</a>
|
<a href="{{ url('/pendahuluan') }}" class="btn btn-danger">Batal</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@@ -63,7 +54,7 @@
|
|||||||
<div class="tab-content" id="myTabContent">
|
<div class="tab-content" id="myTabContent">
|
||||||
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
||||||
|
|
||||||
<h4>Wang Bundle</h4>
|
<h4>Wang Bundle Dari Peti Besi</h4>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -122,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
||||||
|
|
||||||
<h4>Wang Keping</h4>
|
<h4>Wang Keping Dari Peti Besi</h4>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form id="kemaskinihargala" method="post" action="{{ route('hargaemas.update') }}">
|
|
||||||
@csrf
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<input type="hidden" name="recno" id="recno"/>
|
<input type="hidden" name="recno" id="recno"/>
|
||||||
<label>Karat</label>
|
<label>Karat</label>
|
||||||
@@ -23,9 +21,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
||||||
<button type="submit" class="btn btn-success btn-lg">Terima</button>
|
<button type="button" class="btn btn-success btn-lg" id="terima_emas">Terima</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,24 +37,21 @@
|
|||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form method="post" action="{{ route('hargaemas.create') }}">
|
|
||||||
@csrf
|
|
||||||
<label>Karat</label>
|
<label>Karat</label>
|
||||||
<input name="karat" class="form-control"/>
|
<input name="karat" id="karat_baru" class="form-control"/>
|
||||||
|
|
||||||
<label>Keterangan</label>
|
<label>Keterangan</label>
|
||||||
<input name="keterangan" class="form-control"/>
|
<input name="keterangan" id="keterangan_baru" class="form-control"/>
|
||||||
|
|
||||||
<label>Harga</label>
|
<label>Harga</label>
|
||||||
<input name="harga" class="form-control"/>
|
<input name="harga" id="harga_baru" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
||||||
<button type="submit" class="btn btn-success btn-lg">Terima</button>
|
<button type="submit" class="btn btn-success btn-lg" id="terima_emas_baru">Terima</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
<td>{{ $he['tarikhupdate'] }}</td>
|
<td>{{ $he['tarikhupdate'] }}</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="#" onclick="editharga(this)" data-recno="{{ $he['recno'] }}" class="btn btn-primary"><i class="fas fa-edit"></i></a>
|
<a href="#" onclick="editharga(this)" data-recno="{{ $he['recno'] }}" class="btn btn-primary"><i class="fas fa-edit"></i></a>
|
||||||
<a href="#" onclick="hapusharga(this)" data-recno="{{ $he['recno'] }}" class="btn btn-danger"><i class="fas fa-trash-alt"></i></a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -60,8 +59,66 @@
|
|||||||
let api_url = "{{ $api_url }}";
|
let api_url = "{{ $api_url }}";
|
||||||
|
|
||||||
var tableemas = $('#table-emas').DataTable({
|
var tableemas = $('#table-emas').DataTable({
|
||||||
"scrollX": true
|
"scrollX": true
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#terima_emas').on('click',function(){
|
||||||
|
$('#kemaskiniHargaModal').modal('hide');
|
||||||
|
var recno = $('#recno').val();
|
||||||
|
var harga = $('#harga').val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'put',
|
||||||
|
datatype:'json',
|
||||||
|
url: api_url + '/api/harga_emas/update',
|
||||||
|
data:{
|
||||||
|
'recno': recno,
|
||||||
|
'harga': harga
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
if(data == 1){
|
||||||
|
Swal.fire(
|
||||||
|
'Berjaya!',
|
||||||
|
'Harga Emas Berjaya Dikemaskini',
|
||||||
|
'success'
|
||||||
|
).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#terima_emas_baru').on('click',function(){
|
||||||
|
$('#createHargaModal').modal('hide');
|
||||||
|
var karat = $('#karat_baru').val();
|
||||||
|
var harga = $('#harga_baru').val();
|
||||||
|
var keterangan = $('#keterangan_baru').val();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
method:'post',
|
||||||
|
datatype:'json',
|
||||||
|
url: api_url + '/api/harga_emas/create',
|
||||||
|
data:{
|
||||||
|
'karat' : karat,
|
||||||
|
'keterangan': keterangan,
|
||||||
|
'harga' : harga,
|
||||||
|
'harga2' : harga
|
||||||
|
},
|
||||||
|
success:function(data){
|
||||||
|
console.log(data);
|
||||||
|
if(data == 1){
|
||||||
|
Swal.fire(
|
||||||
|
'Berjaya!',
|
||||||
|
'Emas Baru Berjaya Ditambah',
|
||||||
|
'success'
|
||||||
|
).then(function(){
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function editharga(e)
|
function editharga(e)
|
||||||
|
|||||||
@@ -802,8 +802,7 @@
|
|||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Berjaya!',
|
title: 'Berjaya!',
|
||||||
text: 'You clicked the button!',
|
text: 'Penebusan Berjaya',
|
||||||
footer: '<a href>Why do I have this issue?</a>'
|
|
||||||
|
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
window.open(urlroute, '_blank');
|
window.open(urlroute, '_blank');
|
||||||
@@ -864,8 +863,8 @@
|
|||||||
urlroute = urlroute.replace(':id', norujukan);
|
urlroute = urlroute.replace(':id', norujukan);
|
||||||
|
|
||||||
Swal.fire(
|
Swal.fire(
|
||||||
'Good job!',
|
'Berjaya!',
|
||||||
'You clicked the button!',
|
'Bayaran Ansuran Berjaya',
|
||||||
'success'
|
'success'
|
||||||
).then(function() {
|
).then(function() {
|
||||||
window.open(urlroute, '_blank');
|
window.open(urlroute, '_blank');
|
||||||
@@ -962,8 +961,8 @@
|
|||||||
},
|
},
|
||||||
success:function(success_data){
|
success:function(success_data){
|
||||||
Swal.fire(
|
Swal.fire(
|
||||||
'Good job!',
|
'Berjaya!',
|
||||||
'You clicked the button!',
|
'Bayaran Ansuran Berjaya',
|
||||||
'success'
|
'success'
|
||||||
).then(function() {
|
).then(function() {
|
||||||
window.location.replace("{{ url('customer_info') }}");
|
window.location.replace("{{ url('customer_info') }}");
|
||||||
@@ -1161,8 +1160,8 @@
|
|||||||
|
|
||||||
console.log(success_data);
|
console.log(success_data);
|
||||||
Swal.fire(
|
Swal.fire(
|
||||||
'Good job!',
|
'Berjaya!',
|
||||||
'You clicked the button!',
|
'Tebus Separuh Berjaya',
|
||||||
'success'
|
'success'
|
||||||
) .then(function() {
|
) .then(function() {
|
||||||
window.open(urlroute, '_blank');
|
window.open(urlroute, '_blank');
|
||||||
@@ -1213,7 +1212,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
swalWithBootstrapButtons.fire({
|
swalWithBootstrapButtons.fire({
|
||||||
title: 'Dapatkan Pengesahan Daripada Khazanah?',
|
title: 'Dapatkan Pengesahan Khazanah',
|
||||||
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
@@ -1277,7 +1276,7 @@
|
|||||||
clearInterval(timerInterval);
|
clearInterval(timerInterval);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Menerima Pengesahan'
|
title: 'Telah Disahkan'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
|
|
||||||
tambahpinjamanfunc();
|
tambahpinjamanfunc();
|
||||||
@@ -1293,8 +1292,8 @@
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
'Cancelled',
|
'Gagal',
|
||||||
'Your imaginary file is safe :)',
|
'Gagal mendapatkan kelulusan khazanah',
|
||||||
'error'
|
'error'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1313,7 +1312,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
swalWithBootstrapButtons.fire({
|
swalWithBootstrapButtons.fire({
|
||||||
title: 'Dapatkan Pengesahan Daripada Operasi?',
|
title: 'Dapatkan Pengesahan Operasi',
|
||||||
text: "Tetapan margin melebihi 75% untuk Operasi!",
|
text: "Tetapan margin melebihi 75% untuk Operasi!",
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
@@ -1376,7 +1375,7 @@
|
|||||||
clearInterval(timerInterval);
|
clearInterval(timerInterval);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Anda Berjaya Menerima Pengesahan'
|
title: 'Telah Disahkan'
|
||||||
}).then(function(){
|
}).then(function(){
|
||||||
$(func).attr("onSubmit","return true;");
|
$(func).attr("onSubmit","return true;");
|
||||||
$(func).submit();
|
$(func).submit();
|
||||||
@@ -1392,8 +1391,8 @@
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||||
swalWithBootstrapButtons.fire(
|
swalWithBootstrapButtons.fire(
|
||||||
'Cancelled',
|
'Gagal',
|
||||||
'Your imaginary file is safe :)',
|
'Gagal mendapatkan kelulusan operasi',
|
||||||
'error'
|
'error'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1495,8 +1494,8 @@
|
|||||||
urlroute = urlroute.replace(':id', norujukan);
|
urlroute = urlroute.replace(':id', norujukan);
|
||||||
|
|
||||||
Swal.fire(
|
Swal.fire(
|
||||||
'Good job!',
|
'Berjaya!',
|
||||||
'You clicked the button!',
|
'Tambah Pinjaman Berjaya!',
|
||||||
'success'
|
'success'
|
||||||
).then(function() {
|
).then(function() {
|
||||||
window.open(urlroute, '_blank');
|
window.open(urlroute, '_blank');
|
||||||
@@ -1545,7 +1544,7 @@
|
|||||||
allowEnterKey: false,
|
allowEnterKey: false,
|
||||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
title: 'Maklumat anda Berjaya Direkodkan!'
|
title: 'Maklumat Anda Berjaya Direkodkan!'
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(data.nowakil);
|
console.log(data.nowakil);
|
||||||
|
|||||||
Reference in New Issue
Block a user