auto tawarruq
This commit is contained in:
@@ -1276,6 +1276,38 @@ class AliranTunaiController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function alirantunaiTebusAutoTawarruq(Request $request){
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan)->json();
|
||||
$gadai_detail = $gadai[0];
|
||||
|
||||
$tebus = Http::get(config('api.url') . '/api/listpenebusanhistory/'. $auth_user['cawangan'],['norujukan' => $request->norujukan])->json();
|
||||
$tebus_detail = $tebus[0];
|
||||
|
||||
$getTunai2=Http::get(config('api.url').'/api/GetCurrentTunai/'.$auth_user['cawangan'],['kodlaluan' => $tebus_detail['teller']])->json();
|
||||
|
||||
$keluar=$getTunai2['keluar'];
|
||||
$baki=$getTunai2['baki'];
|
||||
$masuk=$getTunai2['masuk'];
|
||||
$bakiawal=$getTunai2['bakiawal'];
|
||||
$pendahuluan=$getTunai2['tambah'];
|
||||
$serahan=$getTunai2['kurang'];
|
||||
$totalmasuk = 0;
|
||||
$bakiakhir = $baki;
|
||||
$totalkeluar = 0;
|
||||
|
||||
$bakiakhir = $bakiakhir + $request->totalbayaran;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$masuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
}
|
||||
|
||||
public function alirantunaiUpahBknTawarruq(Request $request){
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
@@ -425,6 +425,46 @@ class GadaianController extends Controller
|
||||
return view('print.resittebusseparuh',compact('transaction','gadai','customers_info','penebusan','wakil','totaltransaction'));
|
||||
}
|
||||
|
||||
public function resitautotawarruq($id)
|
||||
{
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
|
||||
|
||||
$totaltransaction = 0;
|
||||
|
||||
$transaction = Http::get(config('api.url') . '/api/transaction/'. $id)->json();
|
||||
|
||||
foreach($transaction as $trans)
|
||||
{
|
||||
$totaltransaction += $trans['duit_masuk'];
|
||||
}
|
||||
|
||||
if(sizeof($gadai) != 0)
|
||||
$gadai = $gadai[0][0];
|
||||
|
||||
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
|
||||
|
||||
$transaction_keuntungan = Http::get(config('api.url'). '/api/transaksi_keuntungan_latest/'. $id)->json();
|
||||
if(sizeof($customers_info) != 0)
|
||||
$customers_info = $customers_info[0];
|
||||
|
||||
|
||||
$penebusan = Http::get(config('api.url') . '/api/listpenebusanhistory/' . $auth_user['cawangan'],[ "norujukan" => $id])->json();
|
||||
|
||||
if(sizeof($penebusan) != 0)
|
||||
$penebusan = $penebusan[0];
|
||||
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
|
||||
// dd($wakil);
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resittebusautotawarruq',compact('transaction','gadai','customers_info','penebusan','wakil','totaltransaction','transaction_keuntungan'));
|
||||
}
|
||||
|
||||
public function resittebus($id)
|
||||
{
|
||||
|
||||
|
||||
@@ -697,6 +697,145 @@ class PenebusanController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function tebusautotawarruq(Request $request)
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$curent_year = substr($current->year,2,2);
|
||||
$curent_month = sprintf("%02d", $current->month);
|
||||
$current_day = sprintf("%02d", $current->day);
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
////////////////////////
|
||||
/// UPDATE TEBUS API////
|
||||
///////////////////////
|
||||
$updatetebus = Http::put(config('api.url').'/api/updateautotawarruq/'. $auth_user['cawangan'] .'/' . $request->norujukan,[
|
||||
'nopelanggan' => $request->nopelanggan,
|
||||
'jenistebus' => $request->jenistebus,
|
||||
'jbg' => $request->jbg,
|
||||
'kadarupah' => $request->kadarupah,
|
||||
'nilai_marhun' => $request->nilai_marhun,
|
||||
'pinjaman' => $request->pinjaman_lama,
|
||||
'ansuran' => $request->ansuran,
|
||||
'addpinjaman'=> $request->addpinjaman,
|
||||
'bakipinjaman' => $request->bakipinjaman,
|
||||
'bakiupah' => $request->bakiupah,
|
||||
'nowakil' => $request->nowakil,
|
||||
'historygadaian' => $request->historygadaian,
|
||||
'marhun' => $request->marhun,
|
||||
'jenisbayarantebus' => $request->jenisbayarantebus,
|
||||
'teller' => $request->teller,
|
||||
|
||||
'totalbayaran' => $request->totalbayaran,
|
||||
])->json();
|
||||
|
||||
|
||||
//////////////////////
|
||||
/// MAKING NEW SAG////
|
||||
/////////////////////
|
||||
$gadai_transaction = Http::get(config('api.url') . '/api/gadai/'. $auth_user['cawangan'] . '/' . $current->toDateString())->json();
|
||||
if($gadai_transaction){
|
||||
$new_sirig = $gadai_transaction['sirig'] + 1;
|
||||
|
||||
}else{
|
||||
$new_sirig = 1;
|
||||
}
|
||||
|
||||
$new_transaction = sprintf("%04d",$new_sirig);
|
||||
$norujukanbaru = strtoupper($auth_user['cawangan']) . $curent_year . $curent_month . $current_day . '-' .$new_transaction;
|
||||
|
||||
$gadai = Http::post(config('api.url').'/api/gadai/'.$auth_user['cawangan'],[
|
||||
'norujukan' => $norujukanbaru,
|
||||
'nopelanggan' => $request->nopelanggan,
|
||||
'nokp' => $request->noic,
|
||||
'sirig' => $new_sirig
|
||||
]);
|
||||
|
||||
|
||||
//////////////////////
|
||||
////Update SAG BARU///
|
||||
/////////////////////
|
||||
$keuntungan_sebln = $request->keuntungan_sebulan;
|
||||
$keuntungan_sebln = str_replace(',','',$keuntungan_sebln);
|
||||
|
||||
$total_nilai_marhun = $request->total_nilai_marhun;
|
||||
$margin_pinjaman = $request->pinjaman / $total_nilai_marhun;
|
||||
$kadarupah = $request->kadarkeuntungan * 100;
|
||||
$keuntungan6bulan = $keuntungan_sebln * 6;
|
||||
$keuntungan12bulan = $keuntungan_sebln * 12;
|
||||
$hargajualan = $request->pinjaman + $keuntungan12bulan;
|
||||
|
||||
|
||||
$gadai = Http::put(config('api.url').'/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'nilaimarhun' => round($total_nilai_marhun, 2),
|
||||
'berat' => round($request->total_berat, 2),
|
||||
'pinjaman' => round($request->pinjaman, 2),
|
||||
'kadarupah' => round($kadarupah, 2),
|
||||
'marhun' => $request->marhun_detail,
|
||||
'percentpinj' => $margin_pinjaman,
|
||||
'teller'=> $auth_user['name'],
|
||||
'upah6' => $keuntungan6bulan,
|
||||
'upah12' => $keuntungan12bulan,
|
||||
'hargajualan' => $hargajualan,
|
||||
'kuantiti_marhun' => $request->kuantiti_marhun
|
||||
])->json();
|
||||
|
||||
$komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[
|
||||
'unit_komuditi' => round($request->pinjaman, 2),
|
||||
'norujukan' => $norujukanbaru,
|
||||
'kodcaw' => $auth_user['cawangan'],
|
||||
'teller' => $auth_user['name']
|
||||
]);
|
||||
|
||||
////////////////////////////
|
||||
////Update History Gadaian///
|
||||
////////////////////////////
|
||||
|
||||
$updatehistorygadaian = Http::put(config('api.url').'/api/gadai/updatehistory/'. $auth_user['cawangan'] .'/' . $norujukanbaru,[
|
||||
'historygadaian' => $request->norujukan
|
||||
])->json();
|
||||
|
||||
///////////////////////////
|
||||
/// MARHUN UPDATE TABLE////
|
||||
//////////////////////////
|
||||
|
||||
|
||||
$arraymarhunbaru = [];
|
||||
|
||||
$marhunsediada = Http::get(config('api.url') . '/api/marhun/'. $request->norujukan)->json();
|
||||
|
||||
$marhunyangdiambil = $marhunsediada[0];
|
||||
foreach($marhunyangdiambil as $index=>$marhunloop)
|
||||
{
|
||||
$karatbaru = str_replace('.','-',$marhunloop['karat']);
|
||||
$hargabaru = Http::get(config('api.url') . '/api/harga_emas/'. $karatbaru)->json();
|
||||
|
||||
$nilaimarhun = (floatval($hargabaru['harga']) * floatval($marhunloop['berat']));
|
||||
|
||||
array_push($arraymarhunbaru, ["bil" => $marhunloop['bil'],"marhun" => $marhunloop['marhun'],"nota" => $marhunloop['nota'],"karat" => $marhunloop['karat'], "berat" => $marhunloop['berat'], "harga" => $hargabaru['harga'], "n_marhun" => $nilaimarhun]);
|
||||
}
|
||||
|
||||
foreach($arraymarhunbaru as $array1){
|
||||
$updatemarhun = Http::post(config('api.url').'/api/marhun/'. $auth_user['cawangan'],[
|
||||
'norujukan' => $norujukanbaru,
|
||||
'marhun' => $array1['marhun'],
|
||||
'nota' => $array1['nota'],
|
||||
'karat' => $array1['karat'],
|
||||
'berat_emas' => $array1['berat'],
|
||||
'harga' => $array1['harga'],
|
||||
'nilai_marhun' => $array1['n_marhun']
|
||||
])->json();
|
||||
}
|
||||
|
||||
$this->AliranTunaiController->alirantunaiTebusAutoTawarruq($request);
|
||||
|
||||
|
||||
return response()->json($updatemarhun,200);
|
||||
|
||||
}
|
||||
|
||||
public function tebusseparuh(Request $request)
|
||||
{
|
||||
|
||||
@@ -1758,305 +1758,280 @@
|
||||
|
||||
}else if($('#sltjenistebus').find(":selected").val() == 'AT'){
|
||||
|
||||
var keuntungan = parseFloat($('#jumlahupah').val().replace(/[^0-9.-]+/g,""));
|
||||
var pinjamasal = parseFloat($('#pinjamanasal').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
// if(separuhla <= 10)
|
||||
// {
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire('Amaran!','Margin Pembiayaan kurang daripada 10%!','error');
|
||||
// return false;
|
||||
// }
|
||||
var nm = parseFloat("{{ $gadai['nilaimarhun'] }}");
|
||||
var nmsemasa = parseFloat("{{ $nilaihargasemasa }}");
|
||||
|
||||
// if(separuhla >= 80)
|
||||
// {
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire('Amaran!','Margin Pembiayaan lebih daripada 80%!','error');
|
||||
// return false;
|
||||
// }
|
||||
var pinjaman_baru = parseFloat($('#pinjamanbaru').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
// if($('#perludibayar').val() < (parseFloat($('#bayaran').val()) + parseFloat($('#jumlahupah').val())))
|
||||
// {
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire('Amaran!','Jumlah bayaran kurang daripada jumlah yang perlu dibayar!','error');
|
||||
// return false;
|
||||
// }
|
||||
var marginsemasa = pinjaman_baru/nmsemasa * 100;
|
||||
|
||||
if(marginsemasa < 10)
|
||||
{
|
||||
$("#terima_transaksi").prop('disabled', false);
|
||||
Swal.fire('Amaran!','Margin Pembiayaan kurang daripada 10%!','error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// let maxbayaran = totalmarhun * 0.1;
|
||||
if(marginsemasa > 80)
|
||||
{
|
||||
$("#terima_transaksi").prop('disabled', false);
|
||||
Swal.fire('Amaran!','Margin Pembiayaan lebih daripada 80%!','error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// if($('#bakipinjaman').val() < maxbayaran || $('#bakipinjaman').val() < 50){
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire(
|
||||
// 'Amaran!',
|
||||
// `Baki margin pinjaman tidak boleh kurang 10% daripada nilai marhun \n [ RM ${totalmarhun.toFixed(2)} x 10% = RM ${maxbayaran.toFixed(2)} ]`,
|
||||
// 'error'
|
||||
// )
|
||||
// return false;
|
||||
// }
|
||||
if(marginsemasa > 70 && marginsemasa <= 75){
|
||||
|
||||
// //checked box
|
||||
// var checkboxes = document.querySelectorAll('input[type="checkbox"]');
|
||||
// var checkedOne = Array.prototype.slice.call(checkboxes).some(x => x.checked);
|
||||
// if (checkedOne == false) {
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire(
|
||||
// 'Amaran!',
|
||||
// 'Sila tick salah satu marhun!',
|
||||
// 'error'
|
||||
// )
|
||||
// return false;
|
||||
// }
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
// if(separuhla > 70 && separuhla <= 75){
|
||||
|
||||
// const swalWithBootstrapButtons = Swal.mixin({
|
||||
// customClass: {
|
||||
// confirmButton: 'btn btn-success',
|
||||
// cancelButton: 'btn btn-danger'
|
||||
// },
|
||||
// buttonsStyling: false
|
||||
// });
|
||||
|
||||
// swalWithBootstrapButtons.fire({
|
||||
// title: 'Dapatkan Pengesahan Khazanah',
|
||||
// text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
||||
// icon: 'info',
|
||||
// showCancelButton: true,
|
||||
// confirmButtonText: 'Hantar',
|
||||
// cancelButtonText: 'Batal',
|
||||
// reverseButtons: true
|
||||
// }).then((result) => {
|
||||
// if (result.isConfirmed) {
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Tetapan margin melebihi 70% untuk Khazanah!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
// let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = separuhla;
|
||||
// let komen = "Pembiayaan Melebihi Margin 70%|" + nm + "|" + ber + "|" + marg + "| Tebus Separuh";
|
||||
// let jumpinjam = $('#bakipinjaman').val();
|
||||
// let teller = "{{ Auth::user()->name }}";
|
||||
let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = marginsemasa;
|
||||
let komen = "Pembiayaan Melebihi Margin 70%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq";
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
// 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 siricreated = 0;
|
||||
// $.ajax({
|
||||
// method:'post',
|
||||
// url: "{{ route('khazanah.createkelulusan') }}",
|
||||
// data: {
|
||||
// "_token": "{{ csrf_token() }}",
|
||||
// "norujukan" : norujukan,
|
||||
// "komen" : komen,
|
||||
// "jumpinjam" : jumpinjam,
|
||||
// "teller" : teller
|
||||
// },
|
||||
// success:function(data){
|
||||
// siricreated = data;
|
||||
// },
|
||||
// error: function(xhr, status, error) {
|
||||
// var err = eval("(" + xhr.responseText + ")");
|
||||
// alert(xhr.responseText);
|
||||
// }
|
||||
// });
|
||||
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 siricreated = 0;
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: "{{ route('khazanah.createkelulusan') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan,
|
||||
"komen" : komen,
|
||||
"jumpinjam" : pinjaman_baru,
|
||||
"teller" : teller
|
||||
},
|
||||
success:function(data){
|
||||
siricreated = data;
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
// var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
// cluster: 'ap1',
|
||||
// encrypted: true
|
||||
// });
|
||||
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
// var channel = pusher.subscribe('notice-kelulusan');
|
||||
// channel.bind('my-kelulusan', function(data) {
|
||||
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(){
|
||||
// gadaiseparuhfunc();
|
||||
// });
|
||||
if(data.norujukan == norujukan && data.siri == siricreated)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan',
|
||||
text: `Komen : ${data.komen}`
|
||||
}).then(function(){
|
||||
gadaiautotawarruq();
|
||||
});
|
||||
|
||||
// }
|
||||
// else if(data.kelulusan == 'batal')
|
||||
// {
|
||||
// Swal.fire({
|
||||
// icon: 'warning',
|
||||
// title: 'Telah Dibatalkan',
|
||||
// text: `Komen : ${data.komen}`
|
||||
// }).then(function(){
|
||||
// return false;
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
else if(data.kelulusan == 'batal')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Telah Dibatalkan',
|
||||
text: `Komen : ${data.komen}`
|
||||
}).then(function(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// });
|
||||
});
|
||||
|
||||
|
||||
// } else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// swalWithBootstrapButtons.fire(
|
||||
// 'Gagal',
|
||||
// 'Gagal mendapatkan kelulusan khazanah',
|
||||
// 'error'
|
||||
// )
|
||||
// }
|
||||
// });
|
||||
// event.preventDefault();
|
||||
// return false;
|
||||
} else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
$("#terima_transaksi").prop('disabled', false);
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Gagal',
|
||||
'Gagal mendapatkan kelulusan khazanah',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
||||
// }else if((separuhla > 75 && separuhla <= 80) || pinjamanbaru >= 10000){
|
||||
}else if((marginsemasa > 75 && marginsemasa <= 80) || pinjaman_baru >= 10000){
|
||||
|
||||
// const swalWithBootstrapButtons = Swal.mixin({
|
||||
// customClass: {
|
||||
// confirmButton: 'btn btn-success',
|
||||
// cancelButton: 'btn btn-danger'
|
||||
// },
|
||||
// buttonsStyling: false
|
||||
// });
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
// let text = '';
|
||||
// if(separuhla > 75 && separuhla <= 80)
|
||||
// {
|
||||
// text = 'Tetapan margin melebihi 75% untuk Operasi!';
|
||||
// }else if(pinjamanbaru >= 10000)
|
||||
// {
|
||||
// text = 'Pembiayaan melebihi RM 10,000!';
|
||||
// }
|
||||
let text = '';
|
||||
if(marginsemasa > 75 && marginsemasa <= 80)
|
||||
{
|
||||
text = 'Tetapan margin melebihi 75% untuk Operasi!';
|
||||
}else if(pinjaman_baru >= 10000)
|
||||
{
|
||||
text = 'Pembiayaan melebihi RM 10,000!';
|
||||
}
|
||||
|
||||
|
||||
// swalWithBootstrapButtons.fire({
|
||||
// title: 'Dapatkan Pengesahan Operasi',
|
||||
// text: text,
|
||||
// icon: 'info',
|
||||
// showCancelButton: true,
|
||||
// confirmButtonText: 'Hantar',
|
||||
// cancelButtonText: 'Batal',
|
||||
// reverseButtons: true
|
||||
// }).then((result) => {
|
||||
// if (result.isConfirmed) {
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Operasi',
|
||||
text: text,
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
// let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = separuhla;
|
||||
// let komen = '';
|
||||
// if(separuhla > 75 && separuhla <= 80)
|
||||
// {
|
||||
// komen = "Pembiayaan Melebihi Margin 75%|" + nm + "|" + ber + "|" + marg + "| Tebus Separuh";
|
||||
// }else if(pinjamanbaru >= 10000)
|
||||
// {
|
||||
// komen = "Pembiayaan Melebihi RM 10,000|" + nm + "|" + ber + "|" + marg + "| Tebus Separuh";
|
||||
// }
|
||||
let nm = $('#nilai_marhun_total').text();let ber = $('#berat_marhun_total').text();let marg = marginsemasa;
|
||||
let komen = '';
|
||||
if(marginsemasa > 75 && marginsemasa <= 80)
|
||||
{
|
||||
komen = "Pembiayaan Melebihi Margin 75%|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq";
|
||||
}else if(pinjamanbaru >= 10000)
|
||||
{
|
||||
komen = "Pembiayaan Melebihi RM 10,000|" + nmsemasa + "|" + ber + "|" + marg + "| Auto Tawarruq";
|
||||
}
|
||||
|
||||
// let jumpinjam = $('#bakipinjaman').val();
|
||||
// let teller = "{{ Auth::user()->name }}";
|
||||
let jumpinjam = $('#bakipinjaman').val();
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
// Swal.fire({
|
||||
// title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.',
|
||||
// icon: 'info',
|
||||
// width: 600,
|
||||
// padding: '3em',
|
||||
// background: '#fffff',
|
||||
// showCancelButton: false,
|
||||
// showConfirmButton: false,
|
||||
// allowOutsideClick: false,
|
||||
// allowEscapeKey: false,
|
||||
// allowEnterKey: false
|
||||
// })
|
||||
// let siricreated = 0;
|
||||
// $.ajax({
|
||||
// method:'post',
|
||||
// url: "{{ route('operasi.createkelulusan') }}",
|
||||
// data: {
|
||||
// "_token": "{{ csrf_token() }}",
|
||||
// "norujukan" : norujukan,
|
||||
// "komen" : komen,
|
||||
// "jumpinjam" : jumpinjam,
|
||||
// "teller" : teller
|
||||
// },
|
||||
// success:function(data){
|
||||
// siricreated = data;
|
||||
// },
|
||||
// error: function(xhr, status, error) {
|
||||
// var err = eval("(" + xhr.responseText + ")");
|
||||
// alert(xhr.responseText);
|
||||
// }
|
||||
// });
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
let siricreated = 0;
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: "{{ route('operasi.createkelulusan') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan,
|
||||
"komen" : komen,
|
||||
"jumpinjam" : pinjaman_baru,
|
||||
"teller" : teller
|
||||
},
|
||||
success:function(data){
|
||||
siricreated = data;
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
// cluster: 'ap1',
|
||||
// encrypted: true
|
||||
// });
|
||||
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
// var channel = pusher.subscribe('notice-kelulusan');
|
||||
// channel.bind('my-kelulusan', function(data) {
|
||||
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(){
|
||||
// gadaiseparuhfunc();
|
||||
// return true;
|
||||
// });
|
||||
if(data.norujukan == norujukan && data.siri == siricreated)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan',
|
||||
text: `Komen : ${data.komen}`
|
||||
}).then(function(){
|
||||
gadaiautotawarruq();
|
||||
return true;
|
||||
});
|
||||
|
||||
// }
|
||||
// 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(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){
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// swalWithBootstrapButtons.fire(
|
||||
// 'Gagal',
|
||||
// 'Gagal mendapatkan kelulusan operasi',
|
||||
// 'error'
|
||||
// )
|
||||
// }
|
||||
// });
|
||||
// event.preventDefault();
|
||||
// return false;
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||
$("#terima_transaksi").prop('disabled', false);
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Gagal',
|
||||
'Gagal mendapatkan kelulusan operasi',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
||||
// }else if(separuhla > 80){
|
||||
// $("#terima_transaksi").prop('disabled', false);
|
||||
// Swal.fire(
|
||||
// 'Amaran!',
|
||||
// 'Pinjaman Haruslah Dalam Lingkungan 80%!',
|
||||
// 'error'
|
||||
// )
|
||||
// return false;
|
||||
// }
|
||||
}else if(marginsemasa > 80){
|
||||
$("#terima_transaksi").prop('disabled', false);
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Pinjaman Haruslah Dalam Lingkungan 80%!',
|
||||
'error'
|
||||
)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// gadaiseparuhfunc();
|
||||
gadaiautotawarruq();
|
||||
|
||||
/////////////
|
||||
//End File//
|
||||
@@ -2066,6 +2041,97 @@
|
||||
//Bayaran Semua function end file
|
||||
}
|
||||
|
||||
function gadaiautotawarruq()
|
||||
{
|
||||
|
||||
var nopelanggan = "{{ $gadai['nopelanggan'] }}";
|
||||
var jenistebus = 'T';
|
||||
var jbg = "{{ $gadai['tempoh'] }}";
|
||||
var kadarupah = "{{ $gadai['kadarupah'] }}";
|
||||
var nilai_marhun_lama = parseFloat("{{ $gadai['nilaimarhun'] }}");
|
||||
var nilai_marhun = parseFloat("{{ $nilaihargasemasa }}");
|
||||
var pinjamanbaru = $('#pinjamanbaru').val().replace(/[^0-9.-]+/g,"");
|
||||
var ansuran = 0;
|
||||
var addpinjaman = 0;
|
||||
var bakiupah = $('#jumlahupah').val().replace(/[^0-9.-]+/g,"");
|
||||
var bakipinjaman = parseFloat($('#pinjamanasal').val().replace(/[^0-9.-]+/g,"")) - bakiupah;
|
||||
|
||||
var historygadaian = "{{ $gadai['norujukan'] }}";
|
||||
var marhun = "{{ $gadai['marhun'] }}";
|
||||
var noic = "{{ $gadai['nokp'] }}";
|
||||
var total_berat = parseFloat("{{ $gadai['berat'] }}");
|
||||
var pinjaman = parseFloat("{{ $gadai['pinjaman']}}");
|
||||
var kuantiti_marhun = Number("{{sizeof($marhun)}}");
|
||||
var nowakil = nw;
|
||||
var perludibayar = parseFloat($('#perludibayartawarruq').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
var kadarupahbaru = 0;
|
||||
if(nilai_marhun > 0 && nilai_marhun < 400.99){
|
||||
kadarupahbaru = 1.20/100;
|
||||
}else if(nilai_marhun >= 401 && nilai_marhun < 2000.99){
|
||||
kadarupahbaru = 1.50/100;
|
||||
}else if(nilai_marhun >= 2001 ){
|
||||
kadarupahbaru = 1.70/100;
|
||||
}
|
||||
|
||||
var keuntungan_sebulan = pinjamanbaru * kadarupahbaru;
|
||||
var keuntungan_6bln = keuntungan_sebulan * 6;
|
||||
|
||||
$.ajax({
|
||||
method:"GET",
|
||||
url: "{{ route('tebus.autotawarruq') }}",
|
||||
data:{
|
||||
//yang lama
|
||||
"norujukan" : norujukan,
|
||||
"nopelanggan" : nopelanggan,
|
||||
"jenistebus" : jenistebus,
|
||||
"jbg" : jbg,
|
||||
"kadarupah" : kadarupah,
|
||||
"nilai_marhun" : nilai_marhun_lama,
|
||||
"pinjaman_lama" : pinjaman,
|
||||
"ansuran" : ansuran,
|
||||
"addpinjaman" : addpinjaman,
|
||||
"bakipinjaman" : bakipinjaman,
|
||||
"bakiupah" : bakiupah,
|
||||
"historygadaian" : historygadaian,
|
||||
"marhun" : marhun,
|
||||
"nowakil" : nowakil,
|
||||
"jenisbayarantebus" : "nottawarruq",
|
||||
"teller" : teller,
|
||||
|
||||
|
||||
//yang baru
|
||||
"noic" : noic,
|
||||
"total_nilai_marhun" : nilai_marhun,
|
||||
"pinjaman" : pinjamanbaru,
|
||||
"kadarkeuntungan" : kadarupahbaru,
|
||||
"keuntungan_6bln" : keuntungan_6bln,
|
||||
"keuntungan_sebulan" : keuntungan_sebulan,
|
||||
"total_berat" : total_berat,
|
||||
"marhun_detail" : marhun,
|
||||
"kuantiti_marhun" : kuantiti_marhun,
|
||||
|
||||
"totalbayaran" : perludibayar,
|
||||
|
||||
},
|
||||
success:function(success_data){
|
||||
|
||||
var urlroute = '{{ route("resit.autotawarruq", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
Swal.fire(
|
||||
'Berjaya!',
|
||||
'Tebus Auto Tawarruq Berjaya',
|
||||
'success'
|
||||
) .then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
})
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function gadaiseparuhfunc()
|
||||
{
|
||||
|
||||
@@ -2115,7 +2181,6 @@
|
||||
});
|
||||
|
||||
var nopelanggan = "{{ $gadai['nopelanggan'] }}";
|
||||
var jenistebus = $('#sltjenistebus').find(":selected").val();
|
||||
var jbg = "{{ $gadai['tempoh'] }}";
|
||||
var kadarupah = "{{ $gadai['kadarupah'] }}";
|
||||
var nilai_marhun_lama = parseFloat("{{ $gadai['nilaimarhun'] }}");
|
||||
@@ -2136,11 +2201,11 @@
|
||||
|
||||
var kadarupahbaru = 0;
|
||||
|
||||
if(nilai_marhun > 0 && nilai_marhun < 401.99){
|
||||
if(nilai_marhun > 0 && nilai_marhun < 400.99){
|
||||
kadarupahbaru = 1.2/100;
|
||||
}else if(nilai_marhun >= 402 && nilai_marhun < 2001.99){
|
||||
}else if(nilai_marhun >= 401 && nilai_marhun < 2000.99){
|
||||
kadarupahbaru = 1.50/100;
|
||||
}else if(nilai_marhun >= 2002 ){
|
||||
}else if(nilai_marhun >= 2001 ){
|
||||
kadarupahbaru = 1.70/100;
|
||||
}
|
||||
|
||||
@@ -2231,11 +2296,11 @@
|
||||
|
||||
var kadarupahbaru = 0;
|
||||
|
||||
if(nilai_marhun > 0 && nilai_marhun < 401.99){
|
||||
if(nilai_marhun > 0 && nilai_marhun < 400.99){
|
||||
kadarupahbaru = 1.20/100;
|
||||
}else if(nilai_marhun >= 402 && nilai_marhun < 2001.99){
|
||||
}else if(nilai_marhun >= 401 && nilai_marhun < 2000.99){
|
||||
kadarupahbaru = 1.50/100;
|
||||
}else if(nilai_marhun >= 2002 ){
|
||||
}else if(nilai_marhun >= 2001 ){
|
||||
kadarupahbaru = 1.70/100;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,565 @@
|
||||
|
||||
|
||||
<!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>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// window.print();
|
||||
// window.onfocus=function(){ window.close();}
|
||||
});
|
||||
</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:10px;
|
||||
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;
|
||||
}
|
||||
|
||||
hr.new1 {
|
||||
border-top: 1px dotted black;
|
||||
}
|
||||
.khazanah{
|
||||
border:1px solid black;
|
||||
margin-left:20px;
|
||||
padding:10px;
|
||||
width : 250px;
|
||||
transform: rotate(-90deg);
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
#inside {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
font-size:15px;
|
||||
}
|
||||
|
||||
#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:12px;
|
||||
}
|
||||
|
||||
#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:12px;
|
||||
}
|
||||
|
||||
#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:12px;
|
||||
|
||||
}
|
||||
|
||||
#perjanjian td, #perjanjian th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#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:12px;
|
||||
|
||||
}
|
||||
|
||||
#keuntungan td, #keuntungan th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#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:13px;
|
||||
border: 1px solid black;
|
||||
|
||||
}
|
||||
|
||||
#payment td, #payment th {
|
||||
border: 0px solid;
|
||||
padding: 3px;
|
||||
font-size:10px;
|
||||
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:10px;
|
||||
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:12px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#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:12px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#copy_cust td, #copy_cust th {
|
||||
border: 1px solid #ddd;
|
||||
padding: 2px;
|
||||
font-size:10px;
|
||||
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>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> </td> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></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>
|
||||
|
||||
<h1 style="float:left;position:absolute;margin-left:100px;">AT</h1>
|
||||
|
||||
|
||||
<table id="payment">
|
||||
<tr>
|
||||
<td style="width:10px">Pinjaman</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Bayaran Pinjaman</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan'],2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px"><b>Bayaran Upah</b></td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_keuntungan'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Pembiyaan Baru</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['pinjaman']-$transaction_keuntungan['bayaran_pembiayaan'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px"><b>Jumlah Bayaran</b></td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan']+$transaction_keuntungan['bayaran_keuntungan'],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 <br> <b>{{ Auth::user()->name }}</b></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>: @php if($customers_info['kpbaru'] == '') echo $customers_info['kplama']; else echo $customers_info['kpbaru']; @endphp </td> <td colspan="3"> <t/d> <td> </td><td> </td><td><b> Tempoh Simpan</b></td><td>:<b> {{ $gadai['tempoh'] }} </b></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>
|
||||
|
||||
<h1 style="float:left;position:absolute;margin-left:100px;">AT</h1>
|
||||
|
||||
|
||||
<table id="payment">
|
||||
<tr>
|
||||
<td style="width:10px">Pinjaman</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['pinjaman'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">(-) Bayaran Pinjaman</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan'],2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px"><b>Bayaran Upah</b></td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_keuntungan'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px">Pembiyaan Baru</td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($gadai['pinjaman']-$transaction_keuntungan['bayaran_pembiayaan'],2) }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:10px"><b>Jumlah Bayaran</b></td>
|
||||
<td style="width:5px"> </td>
|
||||
<td style="width:10px">: RM {{ number_format($transaction_keuntungan['bayaran_pembiayaan']+$transaction_keuntungan['bayaran_keuntungan'],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 <br> <b>{{ Auth::user()->name }}</b></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
@@ -97,6 +97,7 @@ Route::get('/kemaskinialirantunai',['as'=>'kemaskini.alirantunai','uses'=>'Alira
|
||||
|
||||
//MAINTENANCE
|
||||
Route::get('/tebuspenuh',['as'=>'tebus.penuh','uses'=>'PenebusanController@tebuspenuh'])->middleware('auth','teller');
|
||||
Route::get('/tebusautotawarruq',['as'=>'tebus.autotawarruq','uses'=>'PenebusanController@tebusautotawarruq'])->middleware('auth','teller');
|
||||
Route::get('/tebusseparuh',['as'=>'tebus.separuh','uses'=>'PenebusanController@tebusseparuh'])->middleware('auth','teller');
|
||||
Route::get('/tambahpinjaman',['as'=>'tambah.pinjaman','uses'=>'PenebusanController@tambahpinjaman'])->middleware('auth','teller');
|
||||
Route::get('/bayaransurans',['as'=>'bayaran.ansurans','uses'=>'PenebusanController@bayaransurans'])->middleware('auth','teller');
|
||||
@@ -214,6 +215,7 @@ Route::get('/resit/tebusseparuh/{id}',['as'=>'resit.tebusseparuh','uses'=>'Gadai
|
||||
Route::get('/resit/belumtebus/{id}',['as'=>'resit.belumtebus','uses'=>'GadaianController@resitbelumtebus'])->middleware('auth','teller');
|
||||
Route::get('/resit/tambahpinjam/{id}',['as'=>'resit.tambahpinjam','uses'=>'GadaianController@resittambahpinjam'])->middleware('auth','teller');
|
||||
Route::get('/resit/tuntutbaki/{id}',['as'=>'resit.tuntutbaki','uses'=>'LelongController@resittuntutbaki'])->middleware('auth','teller');
|
||||
Route::get('/resit/tebusautotawarruq/{id}',['as'=>'resit.autotawarruq','uses'=>'GadaianController@resitautotawarruq'])->middleware('auth','teller');
|
||||
|
||||
|
||||
Route::post('/barcodescanned',['as'=>'barcode.scanned','uses'=>'KhazanahController@barcodescanned'])->middleware('auth','khazanah');
|
||||
|
||||
Reference in New Issue
Block a user