lastest
This commit is contained in:
@@ -109,8 +109,10 @@ class AliranTunaiController extends Controller
|
||||
|
||||
$requestkodlaluan = Http::get(config('api.url').'/api/get/pengguna/'.$auth_user['cawangan'],["namateller" => Auth::user()->name ])->json();
|
||||
$advansur = Http::get(config('api.url').'/api/AnsuranByTarikh/'.$auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai'));
|
||||
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => Auth::user()->name])->json();
|
||||
|
||||
return view('aliran_tunai.index',compact('cawangan_info','alirantunai','api_url','GT','denominasi','gadai_tebus','tuntutbaki','advansur','addtunai','tunaipast'));
|
||||
}
|
||||
|
||||
public function alirantunaiGadai(Request $request,$teller){
|
||||
@@ -446,7 +448,8 @@ class AliranTunaiController extends Controller
|
||||
$gadaian = floatval($totalgadai);
|
||||
|
||||
if(strtoupper(Auth::user()->name) === 'LELONG'){
|
||||
$bakisemasa = $lelongan;
|
||||
$penebusanbarcodescanned = floatval($lelongan);
|
||||
$bakisemasa = floatval($lelongan) - floatval($totalserahan);
|
||||
}else{
|
||||
$bakisemasa = floatval($bakiawal) + floatval($totalpendahuluan) + floatval($penebusan) - (floatval($gadaian) + floatval($totalserahan)) - floatval($totaltuntutbaki);
|
||||
}
|
||||
@@ -580,5 +583,30 @@ class AliranTunaiController extends Controller
|
||||
return response($updateTunai);
|
||||
}
|
||||
|
||||
public function LaporanAliranTunai($teller)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
|
||||
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
|
||||
$alirantunai = Http::get(config('api.url') . '/api/GetCurrentTunai/' . $auth_user['cawangan'],['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$addtunai = Http::get(config('api.url') . '/api/getAddTunai/' . $auth_user['cawangan'] . '/kodlaluan/',['kodlaluan' => $auth_user['name']])->json();
|
||||
|
||||
$teller = $auth_user['name'];
|
||||
|
||||
return view('aliran_tunai.laporan.laporanalirantunai',compact('tarikh_cetak','cawangan_info','cawangan','api_url','cawangan_detail','addtunai','alirantunai','teller'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ class CustomersController extends Controller
|
||||
$idtype = 'nokp';
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$bank = Http::get(config('api.url') . '/api/bank')->json();
|
||||
return view('customers.index',compact('search','cawangan_info','bank','api_url','idtype'));
|
||||
$blacklist_search = false;
|
||||
return view('customers.index',compact('search','blacklist_search','cawangan_info','bank','api_url','idtype'));
|
||||
}
|
||||
|
||||
public function info(Request $request){
|
||||
@@ -70,6 +71,9 @@ class CustomersController extends Controller
|
||||
$bank = Http::get(config('api.url') . '/api/bank')->json();
|
||||
$customer_info = Http::get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
|
||||
$blacklist = Http::get(config('api.url') . '/api/customer/blacklist',[
|
||||
'nokp' => $noic
|
||||
])->json();
|
||||
// if($customers_info){
|
||||
// $customer_info = $customers_info[0];
|
||||
// }else{
|
||||
@@ -77,13 +81,23 @@ class CustomersController extends Controller
|
||||
// }
|
||||
$request->session()->forget('page_reload');
|
||||
$request->session()->forget('norujukan');
|
||||
|
||||
$blacklist_search = false;
|
||||
$search = true;
|
||||
if($customer_info){
|
||||
Session::put('customer_info',$customer_info);
|
||||
return redirect()->route('customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
if($blacklist){
|
||||
$blacklist_search = true;
|
||||
return view('customers.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}else{
|
||||
Session::put('customer_info',$customer_info);
|
||||
return redirect()->route('customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
}
|
||||
}else{
|
||||
return view('customers.index',compact('customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
if($blacklist){
|
||||
$blacklist_search = true;
|
||||
return view('customers.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}else{
|
||||
return view('customers.index',compact('blacklist_search','customer_info','search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ class GadaianController extends Controller
|
||||
|
||||
public function resitansurans($id)
|
||||
{
|
||||
|
||||
$auth_user = Auth::user();
|
||||
$totaltransaction = 0;
|
||||
|
||||
$transaction = Http::get(config('api.url') . '/api/transaction/one/'. $id)->json();
|
||||
@@ -349,8 +349,14 @@ class GadaianController extends Controller
|
||||
// if(sizeof($customers_info) != 0)
|
||||
// $customers_info = $customers_info[0];
|
||||
|
||||
|
||||
return view('print.resitansuran',compact('transaction','gadai','customers_info'));
|
||||
if($penebusan['nowakil'])
|
||||
{
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
}
|
||||
|
||||
return view('print.resitansuran',compact('transaction','gadai','customers_info','wakil'));
|
||||
}
|
||||
|
||||
public function resitbelumansurans($id)
|
||||
|
||||
@@ -98,27 +98,55 @@ class KakitanganController extends Controller
|
||||
|
||||
$tunaisemalam = Http::get(config('api.url') . '/api/GetTunaiSemalam/'. $auth_user['cawangan'])->json();
|
||||
|
||||
if (sizeof($tunaisemalam) > 0)
|
||||
if(is_array($tunaisemalam))
|
||||
{
|
||||
foreach($tunaisemalam as $index=>$tunsem){
|
||||
if (sizeof($tunaisemalam) > 0)
|
||||
{
|
||||
foreach($tunaisemalam as $index=>$tunsem){
|
||||
|
||||
$latesttunai = Http::get(config('api.url') . '/api/GetCurrentTunai/'. $auth_user['cawangan'], ['kodlaluan' => $tunsem['kodlaluan']])->json();
|
||||
$latesttunai = Http::get(config('api.url') . '/api/GetCurrentTunai/'. $auth_user['cawangan'], ['kodlaluan' => $tunsem['kodlaluan']])->json();
|
||||
|
||||
if(sizeof($latesttunai) == 0)
|
||||
{
|
||||
$alirantunai = Http::post(config('api.url') . '/api/tunai/daftarTunai/' . $auth_user['cawangan'], [
|
||||
'kodcaw' => $tunsem['kodcaw'],
|
||||
'teller' => $tunsem['kodlaluan'],
|
||||
'bakiawal' => $tunsem['baki'],
|
||||
'masuk' => 0.00,
|
||||
'yuran' => 0.00,
|
||||
'keluar' => 0.00,
|
||||
'baki' => $tunsem['baki'],
|
||||
'tambah' => 0.00,
|
||||
'kurang' => 0.00
|
||||
])->json();
|
||||
if(sizeof($latesttunai) == 0)
|
||||
{
|
||||
$alirantunai = Http::post(config('api.url') . '/api/tunai/daftarTunai/' . $auth_user['cawangan'], [
|
||||
'kodcaw' => $tunsem['kodcaw'],
|
||||
'teller' => $tunsem['kodlaluan'],
|
||||
'bakiawal' => $tunsem['baki'],
|
||||
'masuk' => 0.00,
|
||||
'yuran' => 0.00,
|
||||
'keluar' => 0.00,
|
||||
'baki' => $tunsem['baki'],
|
||||
'tambah' => 0.00,
|
||||
'kurang' => 0.00
|
||||
])->json();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Denominasi
|
||||
$denominasi=Http::get(config('api.url').'/api/DenominasiController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
if(sizeof($denominasi) == 0)
|
||||
{
|
||||
$denominasi=Http::post(config('api.url').'/api/DenominasiCreate/'.$auth_user['cawangan'])->json();
|
||||
}
|
||||
else
|
||||
{
|
||||
$denominasi=$denominasi[0];
|
||||
}
|
||||
|
||||
//Peti Besi Cawangan
|
||||
$getVault=Http::get( config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
if(sizeof($getVault) == 0)
|
||||
{
|
||||
$peti_besi_terkini=Http::post(config('api.url').'/api/daftarVault/'.$auth_user['cawangan'])->json();
|
||||
$getVault = $peti_besi_terkini['bakiakhir'];
|
||||
|
||||
}else{
|
||||
$getVault = $getVault[0]['bakiakhir'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return redirect()->route('home');
|
||||
|
||||
@@ -84,6 +84,52 @@ class KhazanahController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function searchAdmin(Request $request){
|
||||
$noic = $request->noic;
|
||||
$idtype = $request->customerIDType;
|
||||
Session::put('noic', $noic);
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$bank = Http::get(config('api.url') . '/api/bank')->json();
|
||||
$customer_info = Http::get(config('api.url') . '/api/admin/customers/nokp/search',[
|
||||
'ic' => $noic
|
||||
])->json();
|
||||
|
||||
$request->session()->forget('page_reload');
|
||||
$request->session()->forget('norujukan');
|
||||
|
||||
$search = true;
|
||||
|
||||
if($customer_info){
|
||||
Session::put('customer_info_khazanah',$customer_info);
|
||||
return redirect()->route('admin.customer_info')->with( ['customer_info' => $customer_info,'cawangan_info'=>$cawangan_info,'api_url'=>$api_url]);
|
||||
}else{
|
||||
return view('admin.customer_index',compact('search','noic','cawangan_info','bank','api_url','idtype'));
|
||||
}
|
||||
}
|
||||
|
||||
public function infoAdmin(Request $request){
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$customer_info = Http::get(config('api.url') . '/api/admin/customers/nokp/search',[
|
||||
'ic' => Session::get('noic')
|
||||
])->json();
|
||||
|
||||
$bakilelong = Http::get(config('api.url') . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/baki')->json();
|
||||
$rugilelong = Http::get(config('api.url') . '/api/bakilelong/cawangan/' . $auth_user['cawangan'] . '/' . Session::get('noic') . '/rugi')->json();
|
||||
|
||||
$negeri = Http::get(config('api.url') . '/api/negeri/')->json();
|
||||
|
||||
|
||||
|
||||
$request->session()->forget('page_reload');
|
||||
$request->session()->forget('norujukan');
|
||||
|
||||
return view('admin.customer_info',compact('cawangan_info','api_url','customer_info','bakilelong','rugilelong','negeri'));
|
||||
}
|
||||
|
||||
public function info(Request $request){
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
@@ -271,16 +317,17 @@ class KhazanahController extends Controller
|
||||
$arraytuntutbaki = [];
|
||||
$arrayaddtunai = [];
|
||||
|
||||
$listUser = User::where([['cawangan', '=', $auth_user['cawangan']],['role_harian','=','teller']])->get();
|
||||
|
||||
foreach($listUser as $index1 => $ls)
|
||||
$teller = Http::get( config('api.url') .'/api/get/tellerwork/'. $auth_user['cawangan'])->json();
|
||||
|
||||
foreach($teller as $index1 => $ls)
|
||||
{
|
||||
$tunai = Http::get( config('api.url') .'/api/GetCurrentTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls->name])->json();
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls->name])->json();
|
||||
$tunai = Http::get( config('api.url') .'/api/GetCurrentTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
$tunaipast = Http::get( config('api.url') .'/api/getPastTunai/'. $auth_user['cawangan'],['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
|
||||
$gadai_tebus = Http::get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'].'/teller/',['tarikh' => $harini->toDateString(),'teller' => $ls->name])->json();
|
||||
$tuntutbaki = Http::get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'].'/teller/',['teller' => $ls->name])->json();
|
||||
$addtunai = Http::get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan/',['kodlaluan' => $ls->name])->json();
|
||||
$gadai_tebus = Http::get(config('api.url').'/api/gadaitebus/listharini/'.$auth_user['cawangan'].'/teller/',['tarikh' => $harini->toDateString(),'teller' => $ls['kodlaluan']])->json();
|
||||
$tuntutbaki = Http::get(config('api.url').'/api/TuntutBaki/'.$auth_user['cawangan'].'/teller/',['teller' => $ls['kodlaluan']])->json();
|
||||
$addtunai = Http::get(config('api.url').'/api/getAddTunai/'.$auth_user['cawangan'].'/kodlaluan/',['kodlaluan' => $ls['kodlaluan']])->json();
|
||||
|
||||
array_push($arraygadaitebus,$gadai_tebus);
|
||||
array_push($arraytuntutbaki,$tuntutbaki);
|
||||
@@ -294,7 +341,7 @@ class KhazanahController extends Controller
|
||||
|
||||
$petibesi = Http::get(config('api.url') . '/api/VaultController/all/'. $auth_user['cawangan'])->json();
|
||||
|
||||
return view('khazanah.alirantunai',compact('cawangan_info','api_url','arraytunaiharini','arraytunai','listUser','petibesi','arraygadaitebus','arraytuntutbaki','arrayaddtunai'));
|
||||
return view('khazanah.alirantunai',compact('cawangan_info','api_url','arraytunaiharini','arraytunai','teller','petibesi','arraygadaitebus','arraytuntutbaki','arrayaddtunai'));
|
||||
}
|
||||
|
||||
|
||||
@@ -329,91 +376,9 @@ class KhazanahController extends Controller
|
||||
|
||||
public function barcodescannedtebus(Request $request)
|
||||
{
|
||||
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan_barcode)->json();
|
||||
$gadai_detail = $gadai[0];
|
||||
$hargajual=$gadai[0]['hargajualan'];
|
||||
$upah12=$gadai[0]['upah12'];
|
||||
$tarikh_gadai=$gadai[0]['t_gadai'];
|
||||
$tebus = Http::get(config('api.url') . '/api/listpenebusanhistory/'. $auth_user['cawangan'],['norujukan' => $request->norujukan_barcode])->json();
|
||||
//dd($tebus);
|
||||
$tebus_detail = $tebus[0];
|
||||
$pinjaman=$tebus[0]['pinjaman'];
|
||||
$jenis_tebus=$tebus[0]['jenistebus'];
|
||||
$bakipjm=$tebus[0]['bakipjm'];
|
||||
$bakiupah=$tebus[0]['bakiupah'];
|
||||
$rebet=$tebus[0]['rebate'];
|
||||
|
||||
|
||||
|
||||
$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 = $getTunai2['baki'];
|
||||
$totalkeluar = 0;
|
||||
|
||||
$jum_bayaran=Http::get(config('api.url').'/api/transaction/one/'.$request->norujukan_barcode)->json();
|
||||
$jumlah_bayaran=$jum_bayaran['duit_masuk'];
|
||||
|
||||
$update=Http::put(config('api.url').'/api/updatetagterima/'.$auth_user['cawangan'].'/'.$request->norujukan_barcode)->json();
|
||||
|
||||
if($update == 'success'){
|
||||
if($tebus_detail['jenistebus'] == 'P')
|
||||
{
|
||||
$totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$totalmasuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
|
||||
if(empty($updateTunai)){
|
||||
dd('x masuk aliran tunai');
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
if($tebus_detail['jenistebus'] == 'S')
|
||||
{
|
||||
$totalmasuk = $tebus_detail['pinjaman'] + $tebus_detail['bakiupah'] + $masuk;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$totalmasuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
if(empty($updateTunai)){
|
||||
dd('x masuk aliran tunai');
|
||||
}
|
||||
}else{
|
||||
$totalmasuk = $tebus_detail['bakipjm'] + $masuk;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$totalmasuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
|
||||
if(empty($updateTunai)){
|
||||
dd('x masuk aliran tunai');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->route('khazanah.tebus');
|
||||
}
|
||||
@@ -687,7 +652,7 @@ class KhazanahController extends Controller
|
||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $auth_user['cawangan'] . '/' . $norujukan,[
|
||||
"pengesahan" => "operasi",
|
||||
'siri' => $request->siri,
|
||||
'namaoperasi' => $request->namaoperasi
|
||||
"namakhazanah" => $request->namakhazanah
|
||||
])->json();
|
||||
|
||||
}else{
|
||||
@@ -696,7 +661,7 @@ class KhazanahController extends Controller
|
||||
"pengesahan" => "operasi",
|
||||
'siri' => $request->siri,
|
||||
"pembatalan" => "batal",
|
||||
'namaoperasi' => $request->namaoperasi
|
||||
"namakhazanah" => $request->namakhazanah
|
||||
])->json();
|
||||
|
||||
event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller));
|
||||
@@ -1060,31 +1025,6 @@ class KhazanahController extends Controller
|
||||
|
||||
$auth_user = Auth::user();
|
||||
$scan_barcode = Http::put(config('api.url').'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'] .'/' . $request->norujukan_barcode)->json();
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $auth_user['cawangan'] .'/' .$request->norujukan_barcode)->json();
|
||||
$gadai_detail = $gadai[0];
|
||||
|
||||
$getTunai2=Http::get(config('api.url').'/api/GetCurrentTunai/'.$auth_user['cawangan'],['kodlaluan' => $gadai_detail['teller']])->json();
|
||||
|
||||
$keluar=$getTunai2['keluar'];
|
||||
$baki=$getTunai2['baki'];
|
||||
$masuk=$getTunai2['masuk'];
|
||||
$bakiawal = $getTunai2['bakiawal'];
|
||||
$pendahuluan=$getTunai2['tambah'];
|
||||
$serahan=$getTunai2['kurang'];
|
||||
$totalmasuk = 0;
|
||||
$bakiakhir = $getTunai2['baki'];
|
||||
$totalkeluar = 0;
|
||||
$upah12=$gadai[0]['upah12'];
|
||||
$totalkeluar = $gadai_detail['pinjaman'] + $keluar;
|
||||
|
||||
//masuk dalam tunai aliran
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $gadai_detail['teller'],
|
||||
'keluar' => $totalkeluar,
|
||||
'masuk' => $masuk,
|
||||
'bakiakhir' => $bakiakhir
|
||||
]);
|
||||
|
||||
event(new NotifikasiPembayaran('TellerkepadaKhazanah'));
|
||||
|
||||
@@ -1285,7 +1225,6 @@ class KhazanahController extends Controller
|
||||
]);
|
||||
|
||||
return redirect()->route('khazanah.serahan');
|
||||
|
||||
}
|
||||
|
||||
public function kemaskiniPendahuluan(Request $request) //Daftar Pendahuluan kepada Kaunter
|
||||
@@ -1447,9 +1386,6 @@ class KhazanahController extends Controller
|
||||
|
||||
$amount = $request->amt;
|
||||
|
||||
// if($amount>$baki_awal){
|
||||
// return redirect()->route('khazanah.serahan')->with('message', 'Jumlah yang dipinta melebihi baki dalam peti besi!.');
|
||||
// }else{
|
||||
$tarikh=$request->tarikh;
|
||||
$kodlaluan=$request->teller;
|
||||
|
||||
@@ -1561,8 +1497,6 @@ class KhazanahController extends Controller
|
||||
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
$GetLatestBakiTunai=Http::get( config('api.url').'/api/getLatestBaki/'.$auth_user['cawangan'])->json();
|
||||
$sumBaki=$GetLatestBakiTunai;
|
||||
|
||||
@@ -2333,6 +2267,7 @@ class KhazanahController extends Controller
|
||||
|
||||
public function pendahuluanserahanHQ(Request $request)
|
||||
{
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$gldetail = Http::post(config('api.url').'/api/gldetailkaunter/'. $auth_user['cawangan'],[
|
||||
@@ -3063,4 +2998,27 @@ class KhazanahController extends Controller
|
||||
return view('print.laporan_upah', compact('advansur','cawangan_detail','tarikh_cetak','mula_date','hingga_date','api_url'));
|
||||
}
|
||||
|
||||
public function lelongan($norujukan)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$gadaidetail = Http::get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
|
||||
$noic = $gadaidetail[0][0]['nokp'];
|
||||
$customerdetail = Http::get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
$nama = $customerdetail['nama'];
|
||||
|
||||
$lelong = Http::get(config('api.url') . '/api/lelong/cawangan/'. $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||
|
||||
if(sizeof($lelong) > 0)
|
||||
{
|
||||
$lelong = $lelong[0];
|
||||
}
|
||||
|
||||
$gadai = $gadaidetail[0][0];
|
||||
|
||||
return view('lelongan.index-khazanah',compact('cawangan_info','api_url','gadai','nama','lelong'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,13 @@ class LelongController extends Controller
|
||||
|
||||
$lelong=Http::get(config('api.url').'/api/TuntutBaki/resit/' . $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong'));
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $lelong['nowakil'])->json();
|
||||
|
||||
// dd($wakil);
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong','wakil'));
|
||||
|
||||
}
|
||||
|
||||
@@ -145,279 +151,14 @@ class LelongController extends Controller
|
||||
$serahan = $getTunai2['kurang'];
|
||||
|
||||
$bakiakhir = $baki;
|
||||
$jumlah_byr=$request->jumlah;
|
||||
|
||||
if($request->jenis == 'T')
|
||||
{
|
||||
$bakiakhir -= $request->jumlah;
|
||||
|
||||
|
||||
|
||||
$KOD_TUNAI='1000/010';
|
||||
$BAKI_LELONG='7000/090';
|
||||
|
||||
$get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_TUNAI])->json();
|
||||
$hariIni_Tunai=$get_lejerTunai[0]['hariini'];
|
||||
$kelmarin_Tunai=$get_lejerTunai[0]['kelmarin'];
|
||||
$jumlah_Tunai=$get_lejerTunai[0]['jumlah'];
|
||||
$kredit_Tunai=$get_lejerTunai[0]['kredit'];
|
||||
$debit_Tunai=$get_lejerTunai[0]['debit'];
|
||||
$recno_Tunai=$get_lejerTunai[0]['recno'];
|
||||
|
||||
|
||||
$kredit_Tunai=$kredit_Tunai+$jumlah_byr;
|
||||
$hariIni_Tunai=$debit_Tunai-$kredit_Tunai;
|
||||
$kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai;
|
||||
$updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_Tunai,
|
||||
'debit'=>$debit_Tunai,
|
||||
'kredit'=>$kredit_Tunai,
|
||||
'hariini'=>$hariIni_Tunai,
|
||||
'kelmarin' =>$kelmarin_Tunai,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$get_KOD_BL=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$BAKI_LELONG])->json();
|
||||
|
||||
$gl_cdetails_bl= $get_KOD_BL[0];
|
||||
$keterangan_bl= $get_KOD_BL[0]['descpt']; //keterangan glcode
|
||||
$actype_bl= $get_KOD_BL[0]['acttype'];
|
||||
|
||||
|
||||
$get_current_GLejer_Baki_Lelong=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$BAKI_LELONG])->json();
|
||||
|
||||
if(sizeof($get_current_GLejer_Baki_Lelong)==0)
|
||||
{
|
||||
$jumlah_bl=0.0;
|
||||
|
||||
$getGLedjer_bl_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$BAKI_LELONG])->json();
|
||||
if(sizeof($getGLedjer_bl_Semalam)==0)
|
||||
{
|
||||
$jumlah_bl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$jumlahSemalam_bl=$getGLedjer_bl_Semalam[0]['jumlah'];
|
||||
|
||||
$hariIniSemalam_bl=$getGLedjer_bl_Semalam[0]['hariini'];
|
||||
$jumlah_bl=$jumlahSemalam_bl+$hariIniSemalam_bl;
|
||||
|
||||
}
|
||||
$jumlahBulan_ini_bl=0.0;
|
||||
$get_GlejerBulan_Tahun_bl=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$BAKI_LELONG])->json();
|
||||
if( sizeof($get_GlejerBulan_Tahun_bl)==0)
|
||||
{
|
||||
$jumlahBulan_ini_bl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$jumlahBulan_ini_bl=$get_GlejerBulan_Tahun_bl[0]['jumlah'];
|
||||
$jumlahBulan_ini_bl=$jumlah_bl-$jumlahBulan_ini_bl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$Jumlah_TahunIni_bl=0.0;
|
||||
$get_Glejer_Tahun_bl=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$BAKI_LELONG])->json();
|
||||
|
||||
if(sizeof($get_Glejer_Tahun_bl)==0)
|
||||
{
|
||||
$Jumlah_TahunIni_bl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$JumTahunIni_bl=$get_Glejer_Tahun_bl[0]['jumlah'];
|
||||
$Jumlah_TahunIni_bl=$jumlah_bl-$JumTahunIni_bl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$HariIni_bl=0.0;
|
||||
$kelmarin_bl=$jumlah_bl-$HariIni_bl;
|
||||
$daftarGlejer_bl=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[
|
||||
|
||||
'kodcaw'=>$auth_user['cawangan'],
|
||||
'glcode'=>$BAKI_LELONG,
|
||||
'descpt'=>$keterangan_bl,
|
||||
'debit'=>$jumlah_byr,
|
||||
'kredit'=>0.0,
|
||||
'hariini'=>$HariIni_bl,
|
||||
'kelmarin'=>$kelmarin_bl,
|
||||
'jumlah'=>$jumlah_bl,
|
||||
'bulanini'=>$jumlahBulan_ini_bl,
|
||||
'tahunini'=>$Jumlah_TahunIni_bl,
|
||||
'acttype'=> $actype_bl
|
||||
|
||||
]);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$hariIni_BL=$get_current_GLejer_Baki_Lelong[0]['hariini'];
|
||||
$kelmarin_BL=$get_current_GLejer_Baki_Lelong[0]['kelmarin'];
|
||||
$jumlah_BL= $get_current_GLejer_Baki_Lelong[0]['jumlah'];
|
||||
$kredit_BL=$get_current_GLejer_Baki_Lelong[0]['kredit'];
|
||||
$debit_BL= $get_current_GLejer_Baki_Lelong[0]['debit'];
|
||||
$recno_BL=$get_current_GLejer_Baki_Lelong[0]['recno'];
|
||||
|
||||
$debit_BL=$debit_BL+$jumlah_byr;
|
||||
$hariIni_Tunai=$debit_BL-$kredit_BL;
|
||||
$kelmarin_BL=$jumlah_BL-$hariIni_BL;
|
||||
|
||||
$updateGlejer_BL=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_BL,
|
||||
'debit'=>$debit_BL,
|
||||
'kredit'=>$kredit_BL,
|
||||
'hariini'=>$hariIni_BL,
|
||||
'kelmarin' =>$kelmarin_BL,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$bakiakhir += -($request->jumlah);
|
||||
|
||||
|
||||
$KOD_TUNAI='1000/010';
|
||||
$get_lejerTunai=Http::get(config('api.url').'/api/getGlejer/'.$auth_user['cawangan'],['glcode'=>$KOD_TUNAI])->json();
|
||||
$hariIni_Tunai=$get_lejerTunai[0]['hariini'];
|
||||
$kelmarin_Tunai=$get_lejerTunai[0]['kelmarin'];
|
||||
$jumlah_Tunai=$get_lejerTunai[0]['jumlah'];
|
||||
$kredit_Tunai=$get_lejerTunai[0]['kredit'];
|
||||
$debit_Tunai=$get_lejerTunai[0]['debit'];
|
||||
$recno_Tunai=$get_lejerTunai[0]['recno'];
|
||||
|
||||
|
||||
$debit_Tunai=$debit_Tunai+$jumlah_byr;
|
||||
$hariIni_Tunai=$debit_Tunai-$kredit_Tunai;
|
||||
$kelmarin_Tunai=$jumlah_Tunai-$hariIni_Tunai;
|
||||
$updateGlejer_Tunai=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_Tunai,
|
||||
'debit'=>$debit_Tunai,
|
||||
'kredit'=>$kredit_Tunai,
|
||||
'hariini'=>$hariIni_Tunai,
|
||||
'kelmarin' =>$kelmarin_Tunai,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
|
||||
$RUGI_LELONG='3000/020';
|
||||
|
||||
$get_KOD_RL=Http::get(config('api.url').'/api/getGlCode/'. $auth_user['cawangan'],['glcode'=>$RUGI_LELONG])->json();
|
||||
|
||||
$gl_cdetails_rl= $get_KOD_RL[0];
|
||||
$keterangan_rl= $get_KOD_RL[0]['descpt']; //keterangan glcode
|
||||
$actype_rl= $get_KOD_RL[0]['acttype'];
|
||||
|
||||
|
||||
$get_current_GLejer_Rugi_Lelong=Http::get(config('api.url').'/api/getGlejer/'. $auth_user['cawangan'],['glcode'=>$RUGI_LELONG])->json();
|
||||
|
||||
if(sizeof($get_current_GLejer_Rugi_Lelong)==0)
|
||||
{
|
||||
$jumlah_rl=0.0;
|
||||
|
||||
$getGLedjer_rl_Semalam=Http::get(config('api.url').'/api/getSemalam_Glejer/'.$auth_user['cawangan'],['glcode'=>$RUGI_LELONG])->json();
|
||||
if(sizeof($getGLedjer_rl_Semalam)==0)
|
||||
{
|
||||
$jumlah_rl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$jumlahSemalam_rl=$getGLedjer_rl_Semalam[0]['jumlah'];
|
||||
|
||||
$hariIniSemalam_rl=$getGLedjer_rl_Semalam[0]['hariini'];
|
||||
$jumlah_rl=$jumlahSemalam_rl+$hariIniSemalam_rl;
|
||||
|
||||
}
|
||||
$jumlahBulan_ini_rl=0.0;
|
||||
$get_GlejerBulan_Tahun_rl=Http::get(config('api.url').'/api/getLejerMonthYear/'.$auth_user['cawangan'],['glcode'=>$RUGI_LELONG])->json();
|
||||
if( sizeof($get_GlejerBulan_Tahun_rl)==0)
|
||||
{
|
||||
$jumlahBulan_ini_rl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$jumlahBulan_ini_rl=$get_GlejerBulan_Tahun_rl[0]['jumlah'];
|
||||
$jumlahBulan_ini_rl=$jumlah_rl-$jumlahBulan_ini_rl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$Jumlah_TahunIni_rl=0.0;
|
||||
$get_Glejer_Tahun_rl=Http::get(config('api.url').'/api/getLejerYear/'.$auth_user['cawangan'],['glcode'=>$RUGI_LELONG])->json();
|
||||
|
||||
if(sizeof($get_Glejer_Tahun_rl)==0)
|
||||
{
|
||||
$Jumlah_TahunIni_rl=0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$JumTahunIni_rl=$get_Glejer_Tahun_rl[0]['jumlah'];
|
||||
$Jumlah_TahunIni_rl=$jumlah_rl-$JumTahunIni_rl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$HariIni_rl=0.0;
|
||||
$kelmarin_rl=$jumlah_rl-$HariIni_rl;
|
||||
$daftarGlejer_bl=Http::post(config('api.url').'/api/daftarGlejer/'.$auth_user['cawangan'],[
|
||||
|
||||
'kodcaw'=>$auth_user['cawangan'],
|
||||
'glcode'=>$RUGI_LELONG,
|
||||
'descpt'=>$keterangan_rl,
|
||||
'debit'=>0.0,
|
||||
'kredit'=>$jumlah_byr,
|
||||
'hariini'=>$HariIni_rl,
|
||||
'kelmarin'=>$kelmarin_rl,
|
||||
'jumlah'=>$jumlah_rl,
|
||||
'bulanini'=>$jumlahBulan_ini_rl,
|
||||
'tahunini'=>$Jumlah_TahunIni_rl,
|
||||
'acttype'=> $actype_rl
|
||||
|
||||
]);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$hariIni_RL=$get_current_GLejer_Rugi_Lelong[0]['hariini'];
|
||||
$kelmarin_RL=$get_current_GLejer_Rugi_Lelong[0]['kelmarin'];
|
||||
$jumlah_RL= $get_current_GLejer_Rugi_Lelong[0]['jumlah'];
|
||||
$kredit_RL=$get_current_GLejer_Rugi_Lelong[0]['kredit'];
|
||||
$debit_RL= $get_current_GLejer_Rugi_Lelong[0]['debit'];
|
||||
$recno_RL=$get_current_GLejer_Rugi_Lelong[0]['recno'];
|
||||
|
||||
$kredit_RL=$kredit_RL+$jumlah_byr;
|
||||
$hariIni_Tunai=$debit_RL-$kredit_RL;
|
||||
$kelmarin_BL=$jumlah_RL-$hariIni_RL;
|
||||
|
||||
$updateGlejer_RL=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_RL,
|
||||
'debit'=>$debit_RL,
|
||||
'kredit'=>$kredit_RL,
|
||||
'hariini'=>$hariIni_RL,
|
||||
'kelmarin' =>$kelmarin_RL,
|
||||
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
//masuk dalam tunai aliran
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Vendored
+18
@@ -165,6 +165,7 @@ function kiraan(datakeyin)
|
||||
var valkey = $(datakeyin).val();
|
||||
var amount = 0;
|
||||
let amountkiraan = 0;
|
||||
var id = $('#jenisjenis').val();
|
||||
|
||||
var validate = parseFloat($('#amaundiminta').val());
|
||||
|
||||
@@ -178,6 +179,23 @@ function kiraan(datakeyin)
|
||||
amount += arr[1];
|
||||
});
|
||||
|
||||
if(id === 'serahan')
|
||||
{
|
||||
var deno = $(datakeyin).data('deno');
|
||||
|
||||
if(valkey > deno)
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Peti Besi tidak mencukupi!'
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(amount > validate)
|
||||
{
|
||||
Swal.fire({
|
||||
|
||||
@@ -827,33 +827,7 @@
|
||||
return false;
|
||||
}
|
||||
}else if(id_type=='passport'){
|
||||
if(nokp.length < 5){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa Passport Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if(nokp.indexOf(' ') > 0){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Masukkan Passport Tanpa Ruang \'Kosong\' \n e.g(AP1111111)'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if(regex.test(nokp) == false){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Sila Periksa Passport Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="TAMBAH MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="tambahmodal" onclick="openuptambahdanserah(this)">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="TAMBAH MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="tambahmodal" onclick="serahankemaskini(this)">
|
||||
<input type="button" class="btn btn-lg btn-primary" value="SERAHAN MODAL" data-kodcaw="{{ $auth_user['cawangan'] }}" data-teller="{{ $auth_user['name'] }}" id="serahanmodal" onclick="serahankemaskini(this)">
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,8 +125,10 @@
|
||||
|
||||
|
||||
<button type="button" onclick="periksaalirantunai();" class="btn btn-primary float-right">Kemaskini</button>
|
||||
<button type="button" onclick="cetaklaporanalirantunai()" class="btn btn-primary float-right mr-1">Cetak</button>
|
||||
<nav>
|
||||
<div class="nav nav-tabs mb-4" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link" id="nav-rekod-tab" data-toggle="tab" href="#nav-rekod" role="tab" aria-controls="nav-rekod" aria-selected="false">Rekod</a>
|
||||
<a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Gadai / Tebus</a>
|
||||
<a class="nav-item nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-contact" role="tab" aria-controls="nav-contact" aria-selected="false">Tuntut Baki</a>
|
||||
@@ -134,8 +136,58 @@
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-pane fade" id="nav-rekod" role="tabpanel" aria-labelledby="nav-rekod-tab">
|
||||
|
||||
{{-- <div class="row justify-content-end">
|
||||
<div class="col-3 text-right" style="margin-bottom:-20px;">
|
||||
<span class="font-weight-bold">Tarikh:</span>
|
||||
<input type="text" class="col-9" id="tarikhaddtunai" name="tarikhaddtunai" autocomplete="off" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<br> --}}
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tablerekod">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Tarikh</th>
|
||||
<th>C/F</th>
|
||||
<th>Pendahuluan</th>
|
||||
<th>Serahan</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Penebusan</th>
|
||||
<th>B/F</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($tunaipast) || is_array($tunaipast))
|
||||
@foreach($tunaipast as $tp)
|
||||
<tr>
|
||||
<td>{{ $Tarikh = date("d-m-Y", strtotime($tp['tarikh'])) }}</td>
|
||||
<td>{{ number_format($tp['bakiawal'],2) }}</td>
|
||||
<td>{{ number_format($tp['tambah'],2) }}</td>
|
||||
<td>{{ number_format($tp['kurang'],2) }}</td>
|
||||
<td>{{ number_format($tp['keluar'],2) }}</td>
|
||||
<td>{{ number_format($tp['masuk'],2) }}</td>
|
||||
<td>{{ number_format($tp['baki'],2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||
|
||||
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-3 text-right" style="margin-bottom:-20px;">
|
||||
<span class="font-weight-bold">Tarikh:</span>
|
||||
<input type="text" class="col-9" id="tarikhaddtunai" name="tarikhaddtunai" autocomplete="off" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
@@ -274,9 +326,27 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var kodcaw = "<?php echo $cawangan_info['kodcaw'] ?>";
|
||||
|
||||
var tableaddtunai = $('#tableaddtunai').DataTable({
|
||||
// "scrollX": true
|
||||
});
|
||||
"bPaginate": true,
|
||||
"bLengthChange": false,
|
||||
"bFilter": false,
|
||||
"bInfo": true
|
||||
});
|
||||
|
||||
var today = new Date();
|
||||
$('#tarikhaddtunai').datepicker({
|
||||
format: 'dd-mm-yyyy',
|
||||
autoclose:true,
|
||||
endDate: "today",
|
||||
maxDate: today
|
||||
});
|
||||
|
||||
var tablerekod = $('#tablerekod').DataTable({
|
||||
// "scrollX": true
|
||||
});
|
||||
|
||||
var tablegadaitebus = $('#tablegadaitebus').DataTable({
|
||||
// "scrollX": true
|
||||
@@ -295,6 +365,15 @@
|
||||
function serahankemaskini(data)
|
||||
{
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: "{{ route('periksa.alirantunai') }}",
|
||||
@@ -323,6 +402,15 @@
|
||||
closeOnClickOutside: false
|
||||
}).then(function() {
|
||||
location.reload();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}else{
|
||||
@@ -333,6 +421,15 @@
|
||||
closeOnClickOutside: false
|
||||
}).then(function() {
|
||||
location.reload();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -345,6 +442,15 @@
|
||||
function periksaalirantunai()
|
||||
{
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: "{{ route('periksa.alirantunai') }}",
|
||||
@@ -357,6 +463,15 @@
|
||||
text: 'Aliran tunai selari dengan sistem!'
|
||||
}).then(function() {
|
||||
location.reload();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}else{
|
||||
@@ -371,6 +486,7 @@
|
||||
"penebusan" : balasbalik['penebusan']
|
||||
},
|
||||
success: function(balas){
|
||||
|
||||
if(balas == 'berjaya')
|
||||
{
|
||||
Swal.fire({
|
||||
@@ -380,6 +496,15 @@
|
||||
closeOnClickOutside: false
|
||||
}).then(function() {
|
||||
location.reload();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}else{
|
||||
@@ -390,6 +515,15 @@
|
||||
closeOnClickOutside: false
|
||||
}).then(function() {
|
||||
location.reload();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -400,6 +534,49 @@
|
||||
});
|
||||
}
|
||||
|
||||
function cetaklaporanalirantunai()
|
||||
{
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
let urlroute = '{{ route("laporan.alirantunai", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', teller);
|
||||
|
||||
window.open(urlroute, '_blank');
|
||||
|
||||
}
|
||||
|
||||
$('#tarikhaddtunai').change(function(){
|
||||
var input_date = this.value;
|
||||
var split_date = input_date.split('-');
|
||||
var today_date = split_date[2] + '-' +split_date[1]+'-'+split_date[0];
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/getAddTunaiDate/' + kodcaw,
|
||||
data:{ 'tarikh' : today_date },
|
||||
success: function(addtunai){
|
||||
gadaitable(addtunai);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function gadaitable(data){
|
||||
var counter = 1;
|
||||
|
||||
tableaddtunai.clear().draw();
|
||||
$.each(data,function(index,addtunai){
|
||||
|
||||
tableaddtunai.row.add([
|
||||
counter,
|
||||
addtunai['tarikh'],
|
||||
formatter.format(addtunai['tambah']),
|
||||
formatter.format(addtunai['kurang']),
|
||||
addtunai['nota']
|
||||
]).draw();
|
||||
|
||||
counter = counter + 1;
|
||||
});
|
||||
}
|
||||
|
||||
let pusherenv = "{{ env('PUSHER_APP_KEY') }}";
|
||||
let laporanroute = "{{ route('laporan.serahanteller') }}";
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.header{
|
||||
font-size:12px;
|
||||
font-weight: bold;
|
||||
margin-left:40px;
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
background: white;
|
||||
}
|
||||
|
||||
page {
|
||||
background: white;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 0.5cm;
|
||||
/* box-shadow: 0 0 0.5cm rgba(0,0,0,0.5); */
|
||||
}
|
||||
|
||||
page[size="A4"] {
|
||||
width: 21cm;
|
||||
/* height: 29.7cm; */
|
||||
}
|
||||
|
||||
page[size="A4"][layout="landscape"] {
|
||||
width: 29.7cm;
|
||||
height: 21cm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body, page {
|
||||
margin: 0;
|
||||
box-shadow: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.middleheader{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
width: 25%;
|
||||
border: 2px solid gray;
|
||||
border-radius: 15px;
|
||||
padding: 5px 10px 10px 30px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-left:40px;
|
||||
}
|
||||
|
||||
#header td, #customer th {
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* #header tr:hover {
|
||||
background-color: #ddd;
|
||||
} */
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.statements{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 95%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.statements th{
|
||||
font-size:14px;
|
||||
background-color: #f9ca24;
|
||||
border:1px solid gray;
|
||||
color:black;
|
||||
padding:4px 10px 4px 10px;
|
||||
}
|
||||
|
||||
.statements td{
|
||||
border:1px solid gray;
|
||||
padding:4px 4px 4px 4px;
|
||||
|
||||
}
|
||||
|
||||
.center{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
color: white;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body onload="window.print()">
|
||||
<page size="A4">
|
||||
<h6 class="header">SULIT DAN PERSENDIRIAN</h6>
|
||||
<table id="header">
|
||||
<tr>
|
||||
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/icon_pkb.png') }}" style="width:70px"></img></th>
|
||||
<th colspan="1">KOPERASI PERMODALAN KELANTAN BERHAD</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['namacaw'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat1'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ $cawangan_detail['alamat2'].' No Tel : '. $cawangan_detail['notel'].' No Faks : '. $cawangan_detail['nofaks'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h6 class="middleheader">PENYATA ALIRAN TUNAI : {{ $teller }}</h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="container" style="display:inline-block; margin-left:20px;">
|
||||
<h3>Baki Awal</h3>
|
||||
<span>RM {{ number_format($alirantunai['bakiawal'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Pendahuluan</h3>
|
||||
<span>RM {{ number_format($alirantunai['tambah'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Penebusan</h3>
|
||||
<span>RM {{ number_format($alirantunai['masuk'],2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:20px;">
|
||||
<div class="container" style="display:inline-block; margin-left:20px;">
|
||||
<h3>Baki Tunai Semasa</h3>
|
||||
<span>RM {{ number_format($alirantunai['baki'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Serahan</h3>
|
||||
<span>RM {{ number_format($alirantunai['kurang'],2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="container" style="display:inline-block;margin-left:10px;">
|
||||
<h3>Gadaian</h3>
|
||||
<span>RM {{ number_format($alirantunai['keluar'],2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h6 class="middleheader" style="margin-bottom:-5px;">KEMASUKAN TUNAI</h6>
|
||||
<br>
|
||||
|
||||
<table class="statements">
|
||||
<tr>
|
||||
<th>TARIKH</th>
|
||||
<th>DEBIT (RM)</th>
|
||||
<th>KREDIT (RM)</th>
|
||||
<th>NOTA</th>
|
||||
</tr>
|
||||
@php $totaltambah = 0; $totalkurang = 0; @endphp
|
||||
@foreach($addtunai as $index=>$ad)
|
||||
@php $totaltambah += $ad['tambah']; $totalkurang += $ad['kurang']; @endphp
|
||||
<tr style="text-align:center;">
|
||||
<td>{{ $ad['tarikh'] }}</td>
|
||||
<td>{{ number_format($ad['tambah'],2) }}</td>
|
||||
<td>{{ number_format($ad['kurang'],2) }}</td>
|
||||
<td>{{ $ad['nota'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr style="text-align:center;">
|
||||
<td style="font-weight:bold;">JUMLAH</td>
|
||||
<td>{{ number_format($totaltambah,2) }}</td>
|
||||
<td>{{ number_format($totalkurang,2) }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</page>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -520,7 +520,7 @@
|
||||
</table>
|
||||
|
||||
<h5>CATATAN:</h5> Serahan kepada peti besi ialah sebanyak <span>RM </span>
|
||||
Baki Tunai Semasa sebanyak <span>RM </span>
|
||||
Baki Tunai Semasa sebanyak <span>RM {{ number_format($totalsemua,2) }}</span>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@if($search == true )
|
||||
@if($search == true && $blacklist_search == false)
|
||||
<div class="text-center mt-3">
|
||||
<button type="button" style="margin:auto" class="btn btn-primary" onclick="newcustomer()">
|
||||
Daftar Pelanggan
|
||||
@@ -309,6 +309,7 @@
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var search = "<?php echo $search ?>";
|
||||
var type_id = "<?php echo $idtype ?>";
|
||||
var blacklist_search = "<?php echo $blacklist_search ?>";
|
||||
$(document).ready(function(){
|
||||
$('#passport_tarikh_lahir').datepicker({
|
||||
format: 'dd/mm/yyyy',
|
||||
@@ -318,13 +319,24 @@
|
||||
identifyIC(noic);
|
||||
|
||||
if(search == true){
|
||||
Swal.fire({
|
||||
icon: 'info',
|
||||
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||
text: 'Sila Daftar Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
if(blacklist_search == true){
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Amaran!',
|
||||
text: 'Pelanggan telah disenarai hitamkan dari gadaian'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else{
|
||||
Swal.fire({
|
||||
icon: 'info',
|
||||
title: 'Pelanggan Tiada Dalam Rekod!',
|
||||
text: 'Sila Daftar Pelanggan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<b>No Telefon</b>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="cust_telefon" id="cust_telefon" readonly value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : 'NIL' }}">
|
||||
<input type="text" class="form-control" name="cust_telefon" id="cust_telefon" readonly value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<a class="nav-item nav-link" id="nav-xtawarruq-tab" data-toggle="tab" href="#nav-xtawarruq" role="tab" aria-controls="nav-xtawarruq" aria-selected="false">Ar-Rahn</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-content" id="navtawarruqdannottawarruq">
|
||||
<div class="tab-pane fade show active" id="nav-tawarruq" role="tabpanel" aria-labelledby="nav-tawarruq-tab">
|
||||
<table class="table table-striped table-hover" id="myTable">
|
||||
<thead class="thead-dark">
|
||||
@@ -205,6 +205,7 @@
|
||||
<th>Jum Tuntut/Bayar</th>
|
||||
<th>Keuntungan</th>
|
||||
<th>Caj Lelong</th>
|
||||
<th>Cetak</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -264,7 +265,7 @@
|
||||
No Telefon 1
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : 'NIL' }}" class='form-control'>
|
||||
<input type="text" readonly name='' id='telefon' value="{{ $customer_info['telefon'] ? $customer_info['telefon'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,7 +274,7 @@
|
||||
No Telefon 2
|
||||
</div>
|
||||
<div class='col-md-7'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : 'NIL' }}" class='form-control'>
|
||||
<input type="text" readonly name='telefon2' id='telefon2' value="{{ $customer_info['telefon2'] ? $customer_info['telefon2'] : '' }}" class='form-control'>
|
||||
<span id="errortelefon2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -454,6 +455,12 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
// here is the new selected tab id
|
||||
var selectedTabId = e.target.id;
|
||||
|
||||
});
|
||||
|
||||
var tablegadai = $('#myTable').DataTable({
|
||||
"scrollX": true
|
||||
});
|
||||
@@ -487,188 +494,209 @@
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/polis/get/',
|
||||
url: api_url + '/api/check/serah/lelong',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
if(data == 0){
|
||||
|
||||
|
||||
var count = Object.keys(data).length;
|
||||
|
||||
if(count > 0)
|
||||
{
|
||||
if(data[0].tebus === 0)
|
||||
{
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger mr-1'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Surat Akuan Gadaian Hilang!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
let komen = "Surat Akuan Gadaian Hilang|" + '-' + "|" + '-' + "|" + '-' + "| Tambah Pinjaman";
|
||||
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" : '0.00',
|
||||
"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 channel = pusher.subscribe('notice-kelulusan');
|
||||
channel.bind('my-kelulusan', function(data) {
|
||||
|
||||
|
||||
if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
$.ajax({
|
||||
method:'put',
|
||||
url: api_url + '/api/polis/put/',
|
||||
data: {
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan,
|
||||
'tebus' : 1
|
||||
},
|
||||
success:function(data){
|
||||
location.reload();
|
||||
|
||||
},
|
||||
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(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Gagal',
|
||||
'Gagal mendapatkan kelulusan khazanah',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/check/serah/gadai',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
if(data == 'true'){
|
||||
window.location = urlpenebusan;
|
||||
}else if(data == 'false'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Gadaian Belum Scan Barcode'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/check/serah/gadai',
|
||||
url: api_url + '/api/polis/get/',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
if(data == 'true'){
|
||||
window.location = urlpenebusan;
|
||||
}else if(data == 'false'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Gadaian Belum Scan Barcode'
|
||||
});
|
||||
|
||||
var count = Object.keys(data).length;
|
||||
|
||||
if(count > 0)
|
||||
{
|
||||
if(data[0].tebus === 0)
|
||||
{
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger mr-1'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Surat Akuan Gadaian Hilang!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
let komen = "Surat Akuan Gadaian Hilang|" + '-' + "|" + '-' + "|" + '-' + "| Tambah Pinjaman";
|
||||
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" : '0.00',
|
||||
"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 channel = pusher.subscribe('notice-kelulusan');
|
||||
channel.bind('my-kelulusan', function(data) {
|
||||
|
||||
|
||||
if(data.norujukan == norujukan && data.siri == siricreated && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
$.ajax({
|
||||
method:'put',
|
||||
url: api_url + '/api/polis/put/',
|
||||
data: {
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan,
|
||||
'tebus' : 1
|
||||
},
|
||||
success:function(data){
|
||||
location.reload();
|
||||
|
||||
},
|
||||
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(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Gagal',
|
||||
'Gagal mendapatkan kelulusan khazanah',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/check/serah/gadai',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
if(data == 'true'){
|
||||
window.location = urlpenebusan;
|
||||
}else if(data == 'false'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Gadaian Belum Scan Barcode'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/check/serah/gadai',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
if(data == 'true'){
|
||||
window.location = urlpenebusan;
|
||||
}else if(data == 'false'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Gadaian Belum Scan Barcode'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}else if(data == 1){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Gadaian Sedang Dilelong..'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -723,17 +751,34 @@
|
||||
}else if(jenistebus == "lelong"){
|
||||
var urlroute = '{{ route("lelongan", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong'])
|
||||
]).draw();
|
||||
|
||||
if(gadai_detail['trkhtuntut'] == null){
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong']),
|
||||
'<button class="btn btn-info" disabled>Cetak</button>'
|
||||
]).draw();
|
||||
}else{
|
||||
tablelelong.row.add([
|
||||
counter,
|
||||
'<a href="#" onclick="checktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] + ' data-tarikhtuntut=' + gadai_detail['trkhtuntut'] + '>' + gadai_detail['norujukan'] + '</a>',
|
||||
gadai_detail['t_lelong'],
|
||||
gadai_detail['trkhtuntut'],
|
||||
'RM '+ formatter.format(gadai_detail['pinjaman']),
|
||||
'RM '+formatter.format(gadai_detail['hargajual']),
|
||||
'RM '+formatter.format(gadai_detail['baki']),
|
||||
'RM '+formatter.format(gadai_detail['bakiupah']),
|
||||
'RM '+formatter.format(gadai_detail['cajlelong']),
|
||||
'<button class="btn btn-info" onclick="cetaktuntutbaki(this)" data-norujukan=' + gadai_detail['norujukan'] +'>Cetak</button>'
|
||||
]).draw();
|
||||
}
|
||||
}
|
||||
counter = counter + 1;
|
||||
}
|
||||
@@ -741,6 +786,19 @@
|
||||
});
|
||||
}
|
||||
|
||||
function cetaktuntutbaki(e)
|
||||
{
|
||||
let norujukan = $(e).data('norujukan');
|
||||
|
||||
console.log(norujukan);
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
|
||||
window.open(urlroute, '_blank');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function checktuntutbaki(e)
|
||||
{
|
||||
let tarikhtuntut = $(e).data('tarikhtuntut');
|
||||
@@ -801,40 +859,56 @@
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url:'{{ route("gadai.history") }}',
|
||||
data:{ "norujukan" : histid},
|
||||
success:function(data)
|
||||
{
|
||||
$('#historytebusModal').modal();
|
||||
|
||||
historytebustable(data);
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/transaction/' + histid,
|
||||
success: function(data){
|
||||
historybayarantable(data);
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/'+histid,
|
||||
success:function(gadai){
|
||||
rekodasal(gadai);
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid,
|
||||
success:function(ansuran){
|
||||
rekodansuran(ansuran);
|
||||
|
||||
Swal.close();
|
||||
$('#historytebusModal').modal();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/transaction/' + histid,
|
||||
success: function(data){
|
||||
historybayarantable(data);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/'+histid,
|
||||
success:function(gadai){
|
||||
rekodasal(gadai);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid,
|
||||
success:function(ansuran){
|
||||
rekodansuran(ansuran);
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if($("input[name='options']:checked").val() == 'sudah_tebus'){
|
||||
let histid = $('input[name="sudahtebus"]:checked').val();
|
||||
@@ -846,39 +920,53 @@
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url:'{{ route("gadai.history") }}',
|
||||
data:{ "norujukan" : histid},
|
||||
success:function(data){
|
||||
$('#historytebusModal').modal();
|
||||
historytebustable(data);
|
||||
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/transaction/' + histid,
|
||||
success: function(data){
|
||||
historybayarantable(data);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url:api_url + '/api/gadai/norujukan/'+histid,
|
||||
success:function(gadai){
|
||||
rekodasal(gadai);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid,
|
||||
success:function(ansuran){
|
||||
rekodansuran(ansuran);
|
||||
}
|
||||
});
|
||||
|
||||
$('#historytebusModal').modal();
|
||||
Swal.close();
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: api_url + '/api/transaction/' + histid,
|
||||
success: function(data){
|
||||
historybayarantable(data);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url:api_url + '/api/gadai/norujukan/'+histid,
|
||||
success:function(gadai){
|
||||
rekodasal(gadai);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/ansuran/' + "{{ $cawangan_info['kodcaw'] }}" + '/' + histid,
|
||||
success:function(ansuran){
|
||||
rekodansuran(ansuran);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1237,10 +1325,10 @@
|
||||
return 'Masukkan No Kad Pengenalan yang betul!';
|
||||
}
|
||||
|
||||
if(isNaN(value))
|
||||
{
|
||||
return 'Kad Pengenalan hendaklah dalam bentuk nombor!'
|
||||
}
|
||||
// if(isNaN(value))
|
||||
// {
|
||||
// return 'Kad Pengenalan hendaklah dalam bentuk nombor!'
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1494,14 +1582,161 @@
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
let test1 = $('input[name="belum"]:checked').closest('tr').children('td:eq(2)').text();
|
||||
let tarikhgadai2 = new Date(test1);tarikhgadai2.setHours(0, 0, 0, 0);
|
||||
if(+harini !== +tarikhgadai2){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Gadai Tidak Dibenarkan'
|
||||
|
||||
// var id = $('.tab-content .active').attr('id');
|
||||
|
||||
var activeTab = $("#navtawarruqdannottawarruq.tab-content").find(".active");
|
||||
var id = activeTab.attr('id');
|
||||
|
||||
console.log(id);
|
||||
if(id == "nav-tawarruq") {
|
||||
if(+harini !== +tarikhgadai2){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Gadai Tidak Dibenarkan'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/upahlamatoday/' + kodcaw + '/' + hapusid,
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data == 1){
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Hapus Upah Lama!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if(result.isConfirmed) {
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
let mohon = "Hapus Upah Lama";
|
||||
let id = hapusid;
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : id,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
var channel = pusher.subscribe('notice-ubahhapus');
|
||||
channel.bind('my-ubahhapus', function(data) {
|
||||
|
||||
if(data.norujukan == id && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: api_url + '/api/removeupahlamatoday/' + kodcaw + '/' + id,
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Hapus!',
|
||||
'Maklumat upah lama telah dihapuskan.',
|
||||
'success'
|
||||
).then(function(){
|
||||
location.reload();
|
||||
});
|
||||
}else{
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Hapus!',
|
||||
'Maklumat Upah lama tidak berjaya untuk dihapuskan.',
|
||||
'error'
|
||||
).then(function(){
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Hapus Upah Tidak Dibenarkan'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
@@ -1729,6 +1964,36 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('#poskod').change(function(){
|
||||
var poskod = this.value;
|
||||
console.log(poskod);
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url:api_url+'/api/poskod/'+poskod,
|
||||
success:function(poskod_detail){
|
||||
var koddaerah = poskod_detail['koddaerah'];
|
||||
var kodnegeri = poskod_detail['kodnegeri'];
|
||||
$.ajax({
|
||||
url:api_url+'/api/negeri/'+kodnegeri,
|
||||
method:'GET',
|
||||
success:function(negeri){
|
||||
console.log(negeri);
|
||||
$('#kodnegeri').val(negeri['negeri']);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:api_url+'/api/daerah/'+koddaerah,
|
||||
method:'GET',
|
||||
success:function(daerah){
|
||||
$('#koddaerah').val(daerah['namadaerah']);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function kemaskinifunc()
|
||||
{
|
||||
$('#btnkemaskini').addClass('btn-danger');
|
||||
@@ -1743,6 +2008,8 @@
|
||||
$('#kodbank').attr('disabled', false);
|
||||
$('#noakaun').attr('readonly', false);
|
||||
$('#nota').attr('readonly', false);
|
||||
$('#alamat').attr('readonly', false);
|
||||
$('#poskod').attr('readonly', false);
|
||||
|
||||
}
|
||||
|
||||
@@ -1762,6 +2029,8 @@
|
||||
$('#kodbank').attr('disabled', true);
|
||||
$('#noakaun').attr('readonly', true);
|
||||
$('#nota').attr('readonly', true);
|
||||
$('#alamat').attr('readonly', true);
|
||||
$('#poskod').attr('readonly', true);
|
||||
}
|
||||
|
||||
$("#kemaskiniform").submit(function(event) {
|
||||
@@ -1773,6 +2042,8 @@
|
||||
var kodbank = $('#kodbank').val();
|
||||
var noakaun = $('#noakaun').val();
|
||||
var nota = $('#nota').val();
|
||||
var alamat = $('#alamat').val();
|
||||
var poskod = $('#poskod').val();
|
||||
|
||||
$.ajax({
|
||||
method:"put",
|
||||
@@ -1782,7 +2053,9 @@
|
||||
"telefon2": telefon2,
|
||||
"kodbank":kodbank,
|
||||
"noakaun":noakaun,
|
||||
'nota':nota
|
||||
'nota':nota,
|
||||
'alamat':alamat,
|
||||
'poskod':poskod
|
||||
},
|
||||
success: function(success){
|
||||
$('#btnsave').css('display','none');
|
||||
@@ -1847,6 +2120,8 @@
|
||||
$('#noakaun').attr('readonly', true);
|
||||
$('#kodbank').attr('disabled', true);
|
||||
$('#nota').attr('readonly', true);
|
||||
$('#alamat').attr('readonly', true);
|
||||
$('#poskod').attr('readonly', true);
|
||||
|
||||
$('#kemaskiniform').trigger('submit');
|
||||
}
|
||||
|
||||
@@ -265,6 +265,8 @@
|
||||
}
|
||||
|
||||
window.onload = timedRefresh(100000);
|
||||
//Pusher
|
||||
|
||||
var table_gadaian_semasa = $('#table-gadaian-semasa').DataTable({
|
||||
"ordering": true
|
||||
});
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Aliran Tunai</li>
|
||||
</ol>
|
||||
|
||||
<button type="button" class="btn btn-danger float-right mr-3" data-toggle="modal" data-target="#exampleModalCenter">
|
||||
Peti Besi
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
{{-- {{ dd($tunai) }} --}}
|
||||
@@ -92,9 +96,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-danger float-right mr-3" data-toggle="modal" data-target="#exampleModalCenter">
|
||||
Peti Besi
|
||||
</button>
|
||||
|
||||
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
@@ -106,29 +107,30 @@
|
||||
{{-- {{ dd($arraytunai) }} --}}
|
||||
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
<script> let listu = [];</script>
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
<script> listu.push("{{ $ls->id }}"); </script>
|
||||
|
||||
@if($index1 == 0)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-{{ $ls->id }}" role="tab" aria-controls="pills-home" aria-selected="true">{{ $ls->name }}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-{{ $ls->id }}" role="tab" aria-controls="pills-profile" aria-selected="false">{{ $ls->name }}</a>
|
||||
</li>
|
||||
@endif
|
||||
<script> let listu = [];</script>
|
||||
@foreach($teller as $index1=>$ls)
|
||||
<script> listu.push("{{ $loop->iteration }}"); </script>
|
||||
|
||||
@if($index1 == 0)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pills-home-tab" data-toggle="pill" href="#pills-{{ $loop->iteration }}" role="tab" aria-controls="pills-home" aria-selected="true">{{ $ls['kodlaluan'] }}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="pills-profile-tab" data-toggle="pill" href="#pills-{{ $loop->iteration }}" role="tab" aria-controls="pills-profile" aria-selected="false">{{ $ls['kodlaluan'] }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
@foreach($teller as $index1=>$ls)
|
||||
|
||||
@if($index1 == 0)
|
||||
<div class="tab-pane fade show active" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
<div class="tab-pane fade show active" id="pills-{{ $loop->iteration }}" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
|
||||
<fieldset class="border p-2">
|
||||
<legend class="w-auto">Hari Ini</legend>
|
||||
@@ -220,26 +222,26 @@
|
||||
|
||||
<ul class="nav nav-tabs mt-4" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $ls->id }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $loop->iteration }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
|
||||
|
||||
|
||||
<table class='table table-striped table-hover' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<table class='table table-striped table-hover' id='table-{{ $loop->iteration }}' style="width:100%;">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -270,9 +272,16 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai-{{ $ls->id }}">
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table table-striped table-hover text-center" id="tableaddtunai-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -298,9 +307,16 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $ls->id }}">
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -331,9 +347,16 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -371,7 +394,7 @@
|
||||
|
||||
</div>
|
||||
@else
|
||||
<div class="tab-pane fade" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-profile-tab">
|
||||
<div class="tab-pane fade" id="pills-{{ $loop->iteration }}" role="tabpanel" aria-labelledby="pills-profile-tab">
|
||||
|
||||
<fieldset class="border p-2">
|
||||
<legend class="w-auto">Hari Ini</legend>
|
||||
@@ -464,27 +487,27 @@
|
||||
|
||||
<ul class="nav nav-tabs mt-4" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
<a class="nav-link active" id="history-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-history" role="tab" aria-controls="home" aria-selected="true">Rekod Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
<a class="nav-link" id="addtunai-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-addtunai" role="tab" aria-controls="profile" aria-selected="false">Tunai</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
<a class="nav-link" id="gt-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-gt" role="tab" aria-controls="contact" aria-selected="false">Gadai/Tebus</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
<a class="nav-link" id="tuntutbaki-tab" data-toggle="tab" href="#nav-{{ $loop->iteration }}-tuntutbaki" role="tab" aria-controls="contact" aria-selected="false">Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $ls->id }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $loop->iteration }}-history" role="tabpanel" aria-labelledby="history-tab">
|
||||
|
||||
|
||||
|
||||
<table class='table table-striped table-hover' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<table class='table table-striped table-hover' id='table-{{ $loop->iteration }}' style="width:100%;">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -515,9 +538,18 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-addtunai" role="tabpanel" aria-labelledby="addtunai-tab">
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tableaddtunai-{{ $ls->id }}">
|
||||
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tableaddtunai-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -544,9 +576,17 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-gt" role="tabpanel" aria-labelledby="gt-tab">
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $ls->id }}">
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tablegadaitebus-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
@@ -577,9 +617,17 @@
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
<div class="tab-pane fade" id="nav-{{ $loop->iteration }}-tuntutbaki" role="tabpanel" aria-labelledby="tuntutbaki-tab">
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
{{-- <div class="input-group mb-3 col-4" style="margin-left:-15px;">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon1">Tarikh</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetarikh" name="datetarikh" aria-describedby="basic-addon1">
|
||||
</div> --}}
|
||||
|
||||
|
||||
<table class="table text-center table-striped table-hover" id="tabletuntutbaki-{{ $loop->iteration }}">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['gadai'][0]['jumlahpinjaman'],2) : "0.00" }}</h3>
|
||||
|
||||
<p style="font-weight:bold;">Gadai Hari Ini</p>
|
||||
<p style="font-weight:bold;">Pembiayaan Hari Ini</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
@@ -171,7 +171,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($dashboard[0]['variasi']) ? number_format((float)$dashboard[0]['variasi'],2) : "0.00" }}</h3>
|
||||
|
||||
<p>Variasi</p>
|
||||
<p>Varians</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
@@ -231,7 +231,7 @@
|
||||
<div class="inner">
|
||||
<h3>RM {{ ($komuditicheck) ? number_format($komuditicheck['unit_komuditi'],2) : '0.00' }}</h3>
|
||||
|
||||
<p>Baki Komuditi</p>
|
||||
<p>Baki Komoditi</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
</div>
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
let tarikhtuntut = $(e).data('tarikhtuntut');
|
||||
let norujukan = $(e).data('norujukan');
|
||||
|
||||
var urlroute = '{{ route("lelongan", ":id") }}';
|
||||
var urlroute = '{{ route("lelongan.khazanah", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
|
||||
if (tarikhtuntut == null)
|
||||
|
||||
@@ -16,30 +16,24 @@
|
||||
</nav>
|
||||
|
||||
<div class="card-body text-center">
|
||||
<div class="row form-group">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-15">
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-15"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<form method="post" onsubmit="loadingmodal()">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-2">Tarikh</div>
|
||||
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker2" name="datetimepicker2" autocomplete="off" aria-describedby="basic-addon1"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<form method="post">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-sm-2">Tarikh</div>
|
||||
<div class="col-sm-4"><input type="text" class="form-control" placeholder="Pilih Tarikh" aria-label="Tarikh" id="datetimepicker2" name="datetimepicker2" autocomplete="off" aria-describedby="basic-addon1"></div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-1"> <input type="submit" class="btn btn-success ml-md-1" id="submit_button" name="submit_button" value="Cetak Laporan " formaction="{{route('imbangduga.cetak')}}">
|
||||
</div>
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-1"> <input type="submit" class="btn btn-success ml-md-1" id="submit_button" name="submit_button" value="Cetak Laporan " formaction="{{route('imbangduga.cetak')}}"></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!--end section form-->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,6 +54,18 @@
|
||||
|
||||
});
|
||||
|
||||
function loadingmodal()
|
||||
{
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.agingbulanan')}}" class="btn btn-danger btn-lg btn-block mb-3">Aging Bulan</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <div class="row">
|
||||
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Pemodal</a>
|
||||
</div> --}}
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.tuntutbaki')}}" class="btn btn-dark btn-lg btn-block mb-3">Tuntut Baki</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <a href="{{route('laporan.stokauditbersih')}}" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Bersih </a> --}}
|
||||
<a href="#" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Bersih </a>
|
||||
</div>
|
||||
<div class="row">
|
||||
{{-- <a href="{{ route('laporan.stokauditdetails')}}" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Details</a> --}}
|
||||
<a href="#" class="btn btn-danger btn-lg btn-block mb-3">Stok Audit Details</a>
|
||||
@@ -65,10 +64,7 @@
|
||||
<div class="row">
|
||||
<a href="{{ route('laporan.datalejer_am') }}" class="btn btn-dark btn-lg btn-block mb-3">Lejer Am</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.tuntutbaki')}}" class="btn btn-dark btn-lg btn-block mb-3">Tuntut Baki</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-3 mx-1">
|
||||
<div class="row">
|
||||
@@ -87,7 +83,7 @@
|
||||
<a href="" class="btn btn-danger btn-lg btn-block mb-3">Aging Kawalan Stok</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.imbangduga')}}" class="btn btn-dark btn-lg btn-block mb-3">Imbang Duga</a>
|
||||
<a href="{{route('laporan.imbangduga')}}" class="btn btn-dark btn-lg btn-block mb-3">Imbang Duga</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{route('laporan.petibesi')}}" class="btn btn-dark btn-lg btn-block mb-3">Peti Besi</a>
|
||||
|
||||
@@ -49,11 +49,9 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot class="thead-dark">
|
||||
<th colspan="3">TOTAL</th>
|
||||
<th id="pinjamantotal"></th>
|
||||
<th id="upah12total"></th>
|
||||
<th id="nmtotal"></th>
|
||||
<th id="berattotal"></th>
|
||||
<th colspan="5">TOTAL</th>
|
||||
<th id="totalcajlelong"></th>
|
||||
<th id="totaljumlah"></th>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@@ -116,15 +114,16 @@
|
||||
|
||||
function gadaitable(data){
|
||||
var counter = 1;
|
||||
var total_pinjaman = 0;
|
||||
var total_upah12 = 0;
|
||||
var total_nm = 0;
|
||||
var total_berat = 0;
|
||||
var totaljumlah = 0;
|
||||
var totalcajlelong = 0;
|
||||
|
||||
tabletuntutbaki.clear().draw();
|
||||
|
||||
$.each(data,function(index,tb){
|
||||
|
||||
totaljumlah += tb['jumlah'];
|
||||
totalcajlelong += tb['cajlelong'];
|
||||
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/gadai/norujukan/' + tb['norujukan'],
|
||||
@@ -136,14 +135,16 @@
|
||||
|
||||
tabletuntutbaki.row.add([
|
||||
counter,
|
||||
customer[0]['nama'],
|
||||
customer['nama'],
|
||||
gadai[0][0]['nokp'],
|
||||
tb['norujukan'],
|
||||
tb['teller'],
|
||||
tb['cajlelong'],
|
||||
tb['jumlah']
|
||||
]).draw();
|
||||
|
||||
counter = counter + 1;
|
||||
$('#totalcajlelong').text(formatter.format(totalcajlelong));
|
||||
$('#totaljumlah').text(formatter.format(totaljumlah));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,6 +20,17 @@
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
@php
|
||||
$dt = \Carbon\Carbon::now();
|
||||
|
||||
$date = $dt->format('Y-m-d');
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="col-12 d-flex justify-content-end" style="visibility: hidden;">
|
||||
<button class="btn btn-danger fas fa-trash-alt" onclick="togglepadam();"></button>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 mx-auto">
|
||||
{{-- @php $date = date('yy-m-d'); @endphp --}}
|
||||
<table class='table table-hover table-striped table-bordered' id='table-pendahuluanserahan' style="width: 100%;">
|
||||
@@ -29,7 +40,7 @@
|
||||
<th>Description</th>
|
||||
<th>Pendahuluan (RM)</th>
|
||||
<th>Serahan (RM)</th>
|
||||
{{-- <th>Tindakan</th> --}}
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -39,7 +50,7 @@
|
||||
<td>{{ $gldetail['descpt'] }}</td>
|
||||
<td>{{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }}</td>
|
||||
<td>{{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }}</td>
|
||||
{{-- @if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-trash-alt"></button></td>@else<td></td> @endif --}}
|
||||
@if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-minus-square"></button></td>@else<td></td> @endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -62,7 +73,14 @@
|
||||
|
||||
var tablependahuluanserahan = $('#table-pendahuluanserahan').DataTable({
|
||||
"scrollX": true,
|
||||
"order": [[ 0, "desc" ]]
|
||||
"order": [[ 0, "desc" ]],
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 4 ],
|
||||
"visible": false,
|
||||
"searchable": false
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
let api = "{{ config('api.url') }}";
|
||||
@@ -112,6 +130,15 @@
|
||||
|
||||
});
|
||||
|
||||
function togglepadam()
|
||||
{
|
||||
event.preventDefault();
|
||||
|
||||
var column = tablependahuluanserahan.column(4);
|
||||
|
||||
column.visible(!column.visible());
|
||||
}
|
||||
|
||||
function deletependser()
|
||||
{
|
||||
Swal.fire({
|
||||
@@ -124,14 +151,14 @@
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Teruskan!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
});
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Your file has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validateformat(evt)
|
||||
@@ -217,10 +244,11 @@
|
||||
|
||||
if(boolamaun === false && boolketerangan === false && booljenis === false)
|
||||
{
|
||||
console.log('masuk');
|
||||
$('#amaundiminta').val(amaun);
|
||||
$('#denominasiHQModal').modal('show');
|
||||
$('#pendahuluanserahanModal').modal('hide');
|
||||
$('#jenisjenis').val(jenis);
|
||||
|
||||
return true;
|
||||
}else{
|
||||
|
||||
@@ -276,6 +304,7 @@
|
||||
$("#terima_transaksi").prop('disabled', true);
|
||||
|
||||
let amaun = $('#amaundiminta').val();
|
||||
let kiraan = $('#amaunkiraan').val();
|
||||
let keterangan = $('#keterangan').val();
|
||||
let jenis = $('#radiopendahuluanserahan:checked').val();
|
||||
let dtacct = $('#dtacct').val();
|
||||
@@ -290,6 +319,26 @@
|
||||
let ringgit1 = $('#ringgit1').val();let ringgit5 = $('#ringgit5').val();let ringgit10 = $('#ringgit10').val();let ringgit20 = $('#ringgit20').val();let ringgit50 = $('#ringgit50').val();
|
||||
let ringgit100 = $('#ringgit100').val();
|
||||
|
||||
if(Number(amaun) !== Number(kiraan))
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Sila Periksa Amaun dan Kiraan.'
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading();
|
||||
$('#denominasiHQModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '{{ route("khazanah.pendahuluanserahanHQ") }}',
|
||||
@@ -325,7 +374,9 @@
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Transaksi Berjaya'
|
||||
title: 'Transaksi Berjaya',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false
|
||||
}).then(function(){
|
||||
|
||||
$('#denominasiHQModal').modal('hide');
|
||||
@@ -336,7 +387,9 @@
|
||||
}else if(data == 'GAGAL'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Transaksi Gagal'
|
||||
title: 'Transaksi Gagal',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false
|
||||
}).then(function(){
|
||||
|
||||
$('#denominasiHQModal').modal('hide');
|
||||
@@ -345,6 +398,8 @@
|
||||
|
||||
});
|
||||
}
|
||||
},error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.log(textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +68,17 @@
|
||||
|
||||
</head>
|
||||
<body onload="startTime()" style="background-color:#BAC1C9;">
|
||||
|
||||
@php
|
||||
$auth_user = Auth::user();
|
||||
|
||||
if($auth_user['role_harian'] == 'teller')
|
||||
{
|
||||
$api_url = config('api.url');
|
||||
$gadai = Http::get( config('api.url') .'/api/gadai/serah_marhun/khazanah/'. $auth_user['cawangan'])->json();
|
||||
$listserah = Http::get(config('api.url').'/api/listSerahMarhunController/'.$auth_user['cawangan'])->json();
|
||||
}
|
||||
@endphp
|
||||
<div id="app">
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
|
||||
<div class="container">
|
||||
@@ -268,10 +279,29 @@
|
||||
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
@php
|
||||
if($auth_user['role_harian'] == 'teller')
|
||||
{
|
||||
echo '<div class="col-3">
|
||||
<div class="col-12 pl-5">
|
||||
<div class="row">
|
||||
<h5 class="pr-3">G : <span class="text-success">' . count($gadai) . '</span></h5>
|
||||
<h5>T : <span class="text-danger">' . count($listserah) . '</span></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
@endphp
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
<main class="py-4">
|
||||
|
||||
@@ -0,0 +1,744 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('modal.wakil')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<h3 class="text-center text-uppercase mb-5">LELONGAN</h3>
|
||||
<div class="form-group row col-12">
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NAMA
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $nama }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO PELANGGGAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['nopelanggan'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO RUJUKAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="norujukan" value="{{ $gadai['norujukan'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO KAD PENGENALAN
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['nokp'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="form-group row">
|
||||
<div class="col-3">
|
||||
JENIS LELONG
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" disabled>
|
||||
<label class="custom-control-label" style="color:green;" for="radbakilelong" >Baki Lelong</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" disabled>
|
||||
<label class="custom-control-label" style="color:red;" for="radrugilelong" >Rugi Lelong</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="form-group row">
|
||||
<div class="col-2">
|
||||
WAKIL
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" name="wakil" id="wakiltxt" disabled/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary" id="caribtn" disabled>Cari</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="col-12 form-group row">
|
||||
<div class="col-6" id="divbakihargajualan">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
TARIKH
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $lelong['t_lelong'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
NO SIRI
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $lelong['sirilel'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
HARGA JUAL (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="hargajual" value="{{ number_format($lelong['hargajual'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
PEMBIAYAAN (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="pembiayaan" value="{{ number_format($lelong['pinjaman'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
BATCH LELONG
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="batch" value="{{ $lelong['batchno'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
KEUNTUNGAN (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="keuntungan" value="{{ number_format($lelong['bakiupah'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
CAJ LELONG (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="cajlelong" value="{{ number_format($lelong['cajlelong'],2) }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
JUMLAH (RM)
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" id="jumlah" value="{{ number_format($lelong['baki'],2) }}" id="jumlah" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<input type="button" class="float-right btn btn-danger mr-2" value="BATAL" onclick="window.location.replace('{{ route('customer_info') }}')">
|
||||
<input type="button" id="terima_transaksi" class="float-right btn btn-primary mr-2" value="TERIMA" onclick="bayarantuntubaki()" disabled>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let jumlahbaki = parseFloat($('#jumlah').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
if(jumlahbaki > 0)
|
||||
{
|
||||
$("#radbakilelong").prop("checked", true);
|
||||
$("#radrugilelong").prop("checked", false);
|
||||
}else{
|
||||
$("#radbakilelong").prop("checked", false);
|
||||
$("#radrugilelong").prop("checked", true);
|
||||
}
|
||||
});
|
||||
|
||||
var api = '<?php echo $api_url ?>';
|
||||
let nw = 0;
|
||||
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
|
||||
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
wakil = wakil.replace(patternregex,"").toUpperCase();
|
||||
|
||||
if(wakil.length <= 12)
|
||||
{
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.search') }}",
|
||||
data:{
|
||||
'wakil' : wakil
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 'no-data')
|
||||
{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: 'Daftar',
|
||||
icon: 'info',
|
||||
title: 'Maklumat anda tiada dalam senarai wakil! Tekan button okay untuk mendaftar!'
|
||||
}).then(function(){
|
||||
daftarfunction(wakil);
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Maklumat Anda Berjaya Direkodkan!',
|
||||
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
|
||||
});
|
||||
nw = data.nowakil;
|
||||
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$(e).html("Ubah");
|
||||
$(e).attr("onclick","ubahwakil(this)");
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
titleText: 'Kad Pengenalan dan Passport',
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function daftarwakil()
|
||||
{
|
||||
let nopelanggan = $('#nopelangganwakil').val();
|
||||
let nowakil = $('#nowakil').val();
|
||||
let nama = $('#namawakil').val();
|
||||
let hubungan = $('#slthubungan').val();
|
||||
let alamat = $('#alamatwakil').val();
|
||||
let telefon = $('#notelwakil').val();
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
let boolnowakil = false;let boolnama = false;let boolalamat = false;let booltelefon = false;let boolnota = false;let boolnokp = false;
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
$("[name='errornowakil']").show();
|
||||
$("[name='errornowakil']").text("*No wakil tidak dijana lagi!");
|
||||
$("[name='nowakil']").addClass('is-invalid');
|
||||
|
||||
boolnowakil = true;
|
||||
}else{
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
boolnowakil = false;
|
||||
}
|
||||
|
||||
if(nama === null || nama === '')
|
||||
{
|
||||
$("[name='errornamawakil']").show();
|
||||
$("[name='errornamawakil']").text("*Isikan nama dalam kotak!");
|
||||
$("[name='namawakil']").addClass('is-invalid');
|
||||
|
||||
boolnama = true;
|
||||
}else{
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnama = false;
|
||||
}
|
||||
|
||||
if(alamat === null || alamat === '')
|
||||
{
|
||||
$("[name='erroralamatwakil']").show();
|
||||
$("[name='erroralamatwakil']").text("*Isikan alamat dalam kotak!");
|
||||
$("[name='alamatwakil']").addClass('is-invalid');
|
||||
|
||||
boolalamat = true;
|
||||
}else{
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
boolalamat = false;
|
||||
}
|
||||
|
||||
if(telefon === null || telefon === '')
|
||||
{
|
||||
$("[name='errornotelwakil']").show();
|
||||
$("[name='errornotelwakil']").text("*Isikan telefon dalam kotak!");
|
||||
$("[name='notelwakil']").addClass('is-invalid');
|
||||
|
||||
booltelefon = true;
|
||||
}else{
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
booltelefon = false;
|
||||
}
|
||||
|
||||
if(nota === null || nota === '')
|
||||
{
|
||||
$("[name='errornotawakil']").show();
|
||||
$("[name='errornotawakil']").text("*Isikan nota dalam kotak!");
|
||||
$("[name='notawakil']").addClass('is-invalid');
|
||||
|
||||
boolnota = true;
|
||||
}else{
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnota = false;
|
||||
}
|
||||
|
||||
if(nokp === null || nokp === '')
|
||||
{
|
||||
$("[name='errornokpwakil']").show();
|
||||
$("[name='errornokpwakil']").text("*Isikan nokp dalam kotak!");
|
||||
$("[name='nokpwakil']").addClass('is-invalid');
|
||||
|
||||
boolnokp = true;
|
||||
}else{
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
boolnokp = false;
|
||||
}
|
||||
|
||||
|
||||
if(boolnowakil == false && boolnama == false && boolalamat == false && booltelefon == false && boolnota == false && boolnokp == false)
|
||||
{
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('#WakilModal').on('hidden.bs.modal', function (e) {
|
||||
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
$(this).find(".invalid-feedback").hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function daftarfunction(id)
|
||||
{
|
||||
let kodcaw = "{{ Auth::user()->cawangan }}";
|
||||
|
||||
$('#nokpwakil').val(id);
|
||||
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.caricustomer') }}",
|
||||
url: api + '/api/customers/' + id,
|
||||
// data:{ "icno" : id },
|
||||
success:function(data){
|
||||
|
||||
$('#namawakil').val('');
|
||||
$('#alamatwakil').val('');
|
||||
$('#notelwakil').val('');
|
||||
|
||||
var size = Object.keys(data).length;
|
||||
|
||||
if(size > 0)
|
||||
{
|
||||
$('#namawakil').val(data['nama']);
|
||||
$('#alamatwakil').val(data['alamat1']);
|
||||
$('#notelwakil').val(data['telefon']);
|
||||
$('#nopelangganwakil').val(data['nopelanggan']);
|
||||
}
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.first') }}",
|
||||
url: api + '/api/firstwakil/' + kodcaw,
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
|
||||
Swal.close();
|
||||
$('#WakilModal').modal();
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
Swal.close();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Punyai Ralat dalam API wakil...',
|
||||
icon: 'error'
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ubahwakil(e)
|
||||
{
|
||||
$('#wakiltxt').prop( "disabled", false);
|
||||
$(e).html("Cari");
|
||||
$(e).attr( "onclick", "wakilfunction(this)");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function bayarantuntubaki()
|
||||
{
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = nw;
|
||||
let jenis = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
let cajlain = 0.00; let cajlelong = $('#cajlelong').val();
|
||||
let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,"");
|
||||
|
||||
$.ajax({
|
||||
method: 'put',
|
||||
url: "{{ route('lelong.tuntutbaki') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
'batchno' : batchno,
|
||||
'jenis' : jenis,
|
||||
'norujukan' : norujukan,
|
||||
'teller' : teller,
|
||||
'bakipjm' : bakipjm,
|
||||
'bakiupah' : bakiupah,
|
||||
'cajlain' : cajlain,
|
||||
'cajlelong' : cajlelong,
|
||||
'jumlah' : jumlah,
|
||||
'nowakil' : nowakil,
|
||||
'hargajual' : hargajual
|
||||
},
|
||||
success:function(data){
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
Swal.fire(
|
||||
'Berjaya!',
|
||||
'Tuntut Baki Berjaya',
|
||||
'success'
|
||||
) .then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
})
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
});
|
||||
|
||||
//let jumlah = $('#jumlah').val();let hargajual = $('#hargajual').val();
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Khazanah',
|
||||
text: "Tuntutan Baki Pelanggan!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Hantar',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if(result.isConfirmed) {
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = 0;
|
||||
let jenis = '';
|
||||
let mohon = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
let cajlain = 0.00; let cajlelong = $('#cajlelong').val();
|
||||
let jumlah = $('#jumlah').val().replace(/[^0-9.-]+/g,"");let hargajual = $('#hargajual').val().replace(/[^0-9.-]+/g,"");
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
var channel = pusher.subscribe('notice-ubahhapus');
|
||||
channel.bind('my-ubahhapus', function(data) {
|
||||
|
||||
|
||||
if(data.norujukan == norujukan && data.teller == teller)
|
||||
{
|
||||
if(data.kelulusan == 'lulus')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Telah Disahkan'
|
||||
}).then(function(){
|
||||
|
||||
$.ajax({
|
||||
method: 'put',
|
||||
url: "{{ route('lelong.tuntutbaki') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
'batchno' : batchno,
|
||||
'jenis' : jenis,
|
||||
'norujukan' : norujukan,
|
||||
'teller' : teller,
|
||||
'bakipjm' : bakipjm,
|
||||
'bakiupah' : bakiupah,
|
||||
'cajlain' : cajlain,
|
||||
'cajlelong' : cajlelong,
|
||||
'jumlah' : jumlah,
|
||||
'nowakil' : nowakil,
|
||||
'hargajual' : hargajual
|
||||
},
|
||||
success:function(data){
|
||||
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', norujukan);
|
||||
Swal.fire(
|
||||
'Berjaya!',
|
||||
'Tuntut Baki Berjaya',
|
||||
'success'
|
||||
) .then(function() {
|
||||
window.open(urlroute, '_blank');
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
})
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
else if(data.kelulusan == 'batal')
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Telah Dibatalkan',
|
||||
text: `Komen : ${data.komen}`
|
||||
}).then(function(){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel){
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Batal',
|
||||
'Tidak Berjaya Mendaptkan Pengesahan Khazanah',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,6 +1,8 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('modal.wakil')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
@@ -54,11 +56,11 @@
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" readonly>
|
||||
<input type="radio" class="custom-control-input" id="radbakilelong" name="radlelong" value="baki" disabled>
|
||||
<label class="custom-control-label" style="color:green;" for="radbakilelong" >Baki Lelong</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" readonly>
|
||||
<input type="radio" class="custom-control-input" id="radrugilelong" name="radlelong" value="rugi" disabled>
|
||||
<label class="custom-control-label" style="color:red;" for="radrugilelong" >Rugi Lelong</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,6 +187,7 @@
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
let jumlahbaki = parseFloat($('#jumlah').val().replace(/[^0-9.-]+/g,""));
|
||||
|
||||
if(jumlahbaki > 0)
|
||||
@@ -197,22 +200,354 @@
|
||||
}
|
||||
});
|
||||
|
||||
var api = '<?php echo $api_url ?>';
|
||||
let nw = 0;
|
||||
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
|
||||
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
wakil = wakil.replace(patternregex,"").toUpperCase();
|
||||
|
||||
if(wakil.length <= 12)
|
||||
{
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.search') }}",
|
||||
data:{
|
||||
'wakil' : wakil
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 'no-data')
|
||||
{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: 'Daftar',
|
||||
icon: 'info',
|
||||
title: 'Maklumat anda tiada dalam senarai wakil! Tekan button okay untuk mendaftar!'
|
||||
}).then(function(){
|
||||
daftarfunction(wakil);
|
||||
});
|
||||
}else{
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Maklumat Anda Berjaya Direkodkan!',
|
||||
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
|
||||
});
|
||||
nw = data.nowakil;
|
||||
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$(e).html("Ubah");
|
||||
$(e).attr("onclick","ubahwakil(this)");
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
titleText: 'Kad Pengenalan dan Passport',
|
||||
text: 'mestilah tidak melebihi dan kurang daripada 12 patah perkataan'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function daftarwakil()
|
||||
{
|
||||
let nopelanggan = $('#nopelangganwakil').val();
|
||||
let nowakil = $('#nowakil').val();
|
||||
let nama = $('#namawakil').val();
|
||||
let hubungan = $('#slthubungan').val();
|
||||
let alamat = $('#alamatwakil').val();
|
||||
let telefon = $('#notelwakil').val();
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
let boolnowakil = false;let boolnama = false;let boolalamat = false;let booltelefon = false;let boolnota = false;let boolnokp = false;
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
$("[name='errornowakil']").show();
|
||||
$("[name='errornowakil']").text("*No wakil tidak dijana lagi!");
|
||||
$("[name='nowakil']").addClass('is-invalid');
|
||||
|
||||
boolnowakil = true;
|
||||
}else{
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
boolnowakil = false;
|
||||
}
|
||||
|
||||
if(nama === null || nama === '')
|
||||
{
|
||||
$("[name='errornamawakil']").show();
|
||||
$("[name='errornamawakil']").text("*Isikan nama dalam kotak!");
|
||||
$("[name='namawakil']").addClass('is-invalid');
|
||||
|
||||
boolnama = true;
|
||||
}else{
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnama = false;
|
||||
}
|
||||
|
||||
if(alamat === null || alamat === '')
|
||||
{
|
||||
$("[name='erroralamatwakil']").show();
|
||||
$("[name='erroralamatwakil']").text("*Isikan alamat dalam kotak!");
|
||||
$("[name='alamatwakil']").addClass('is-invalid');
|
||||
|
||||
boolalamat = true;
|
||||
}else{
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
boolalamat = false;
|
||||
}
|
||||
|
||||
if(telefon === null || telefon === '')
|
||||
{
|
||||
$("[name='errornotelwakil']").show();
|
||||
$("[name='errornotelwakil']").text("*Isikan telefon dalam kotak!");
|
||||
$("[name='notelwakil']").addClass('is-invalid');
|
||||
|
||||
booltelefon = true;
|
||||
}else{
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
booltelefon = false;
|
||||
}
|
||||
|
||||
if(nota === null || nota === '')
|
||||
{
|
||||
$("[name='errornotawakil']").show();
|
||||
$("[name='errornotawakil']").text("*Isikan nota dalam kotak!");
|
||||
$("[name='notawakil']").addClass('is-invalid');
|
||||
|
||||
boolnota = true;
|
||||
}else{
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnota = false;
|
||||
}
|
||||
|
||||
if(nokp === null || nokp === '')
|
||||
{
|
||||
$("[name='errornokpwakil']").show();
|
||||
$("[name='errornokpwakil']").text("*Isikan nokp dalam kotak!");
|
||||
$("[name='nokpwakil']").addClass('is-invalid');
|
||||
|
||||
boolnokp = true;
|
||||
}else{
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
boolnokp = false;
|
||||
}
|
||||
|
||||
|
||||
if(boolnowakil == false && boolnama == false && boolalamat == false && booltelefon == false && boolnota == false && boolnokp == false)
|
||||
{
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$('#WakilModal').on('hidden.bs.modal', function (e) {
|
||||
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
$(this).find(".invalid-feedback").hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function daftarfunction(id)
|
||||
{
|
||||
let kodcaw = "{{ Auth::user()->cawangan }}";
|
||||
|
||||
$('#nokpwakil').val(id);
|
||||
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.caricustomer') }}",
|
||||
url: api + '/api/customers/' + id,
|
||||
// data:{ "icno" : id },
|
||||
success:function(data){
|
||||
|
||||
$('#namawakil').val('');
|
||||
$('#alamatwakil').val('');
|
||||
$('#notelwakil').val('');
|
||||
|
||||
var size = Object.keys(data).length;
|
||||
|
||||
if(size > 0)
|
||||
{
|
||||
$('#namawakil').val(data['nama']);
|
||||
$('#alamatwakil').val(data['alamat1']);
|
||||
$('#notelwakil').val(data['telefon']);
|
||||
$('#nopelangganwakil').val(data['nopelanggan']);
|
||||
}
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.first') }}",
|
||||
url: api + '/api/firstwakil/' + kodcaw,
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
|
||||
Swal.close();
|
||||
$('#WakilModal').modal();
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
Swal.close();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Punyai Ralat dalam API wakil...',
|
||||
icon: 'error'
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ubahwakil(e)
|
||||
{
|
||||
$('#wakiltxt').prop( "disabled", false);
|
||||
$(e).html("Cari");
|
||||
$(e).attr( "onclick", "wakilfunction(this)");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function bayarantuntubaki()
|
||||
{
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = 0;
|
||||
let jenis = '';
|
||||
let api = "{{ config('api.url') }}";
|
||||
let nowakil = nw;
|
||||
let jenis = '';
|
||||
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
if($("input[name='radlelong']:checked").val() == 'baki')
|
||||
{
|
||||
jenis = 'T';
|
||||
let mohon = "Tuntut Baki Lelongan";
|
||||
}else{
|
||||
jenis = 'B';
|
||||
let mohon = "Bayar Baki Lelongan";
|
||||
}
|
||||
|
||||
|
||||
let batchno = $('#batch').val();let teller = "{{ Auth::user()->name }}";let bakipjm = $('#pembiayaan').val().replace(/[^0-9.-]+/g,"");let bakiupah = $('#keuntungan').val();
|
||||
@@ -252,6 +587,9 @@
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
@@ -328,8 +666,6 @@
|
||||
cluster: 'ap1',
|
||||
encrypted: true
|
||||
});
|
||||
|
||||
//let teller = "{{ Auth::user()->name }}";
|
||||
|
||||
var channel = pusher.subscribe('notice-ubahhapus');
|
||||
channel.bind('my-ubahhapus', function(data) {
|
||||
|
||||
@@ -67,51 +67,51 @@
|
||||
<tr>
|
||||
<td>RM0.01</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtsen1'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilansen1" class="form-control" id="sen1" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilansen1" class="form-control" id="sen1" data-deno="{{ $denominasi['txtsen1'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalsen1" id="totalsen1" class="form-control" value="0.00" readonly/> </td>
|
||||
<td>RM1</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtring1'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilanring1" class="form-control" id="ringgit1" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilanring1" class="form-control" id="ringgit1" data-deno="{{ $denominasi['txtring1'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalring1" id="totalring1" class="form-control" value="0.00" readonly/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RM0.05</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtsen5'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilansen5" class="form-control" id="sen5" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilansen5" class="form-control" id="sen5" data-deno="{{ $denominasi['txtsen5'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalsen5" id="totalsen5" class="form-control" value="0.00" readonly/> </td>
|
||||
<td>RM5</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtring5'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilanring5" class="form-control" id="ringgit5" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilanring5" class="form-control" id="ringgit5" data-deno="{{ $denominasi['txtring5'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalring5" id="totalring5" class="form-control" value="0.00" readonly/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RM0.10</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtsen10'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilansen10" class="form-control" id="sen10" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilansen10" class="form-control" id="sen10" data-deno="{{ $denominasi['txtsen10'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalsen10" id="totalsen10" class="form-control" value="0.00" readonly/> </td>
|
||||
<td>RM10</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtring10'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilanring10" class="form-control" id="ringgit10" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilanring10" class="form-control" id="ringgit10" data-deno="{{ $denominasi['txtring10'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalring10" id="totalring10" class="form-control" value="0.00" readonly/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RM0.20</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtsen20'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilansen20" class="form-control" id="sen20" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilansen20" class="form-control" id="sen20" data-deno="{{ $denominasi['txtsen20'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalsen20" id="totalsen20" class="form-control" value="0.00" readonly/> </td>
|
||||
<td> RM20</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtring20'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilanring20" class="form-control" id="ringgit20" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilanring20" class="form-control" id="ringgit20" data-deno="{{ $denominasi['txtring20'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalring20" id="totalring20" class="form-control" value="0.00" readonly/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RM0.50</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtsen50'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilansen50" class="form-control" id="sen50" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilansen50" class="form-control" id="sen50" data-deno="{{ $denominasi['txtsen50'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalsen50" id="totalsen50" class="form-control" value="0.00" readonly/> </td>
|
||||
<td>RM50</td>
|
||||
<td style="display:none;" name="denominasi" class="denominasi"><input type="text" class="form-control" value="{{ $denominasi['txtring50'] }}" readonly/></td>
|
||||
<td><input type="text" name="ambilanring50" class="form-control" id="ringgit50" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="ambilanring50" class="form-control" id="ringgit50" data-deno="{{ $denominasi['txtring50'] }}" onkeyup="kiraan(this)"/> </td>
|
||||
<td><input type="text" name="totalring50" id="totalring50" class="form-control" value="0.00" readonly/> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="text" class="form-control" id="nowakil" name="nowakil" readonly/>
|
||||
<span name="errornowakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,6 +29,7 @@
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<input type="text" class="form-control" id="nokpwakil" name="nokpwakil" readonly/>
|
||||
<span name="errornokpwakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +39,7 @@
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" id="namawakil" name="namawakil"/>
|
||||
<span name="errornamawakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -47,6 +50,7 @@
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" id="alamatwakil" name="alamatwakil"/>
|
||||
<span name="erroralamatwakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -56,6 +60,7 @@
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="text" class="form-control" id="notelwakil" name="notelwakil"/>
|
||||
<span name="errornotelwakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,6 +70,7 @@
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" class="form-control" name="notawakil" id="notawakil"/>
|
||||
<span name="errornotawakil" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,6 +94,7 @@
|
||||
<option value="Cucu">Cucu</option>
|
||||
<option value="Abang">Abang</option>
|
||||
<option value="Kakak">Kakak</option>
|
||||
<option value="Anak">Anak</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -103,6 +103,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
<b>TEMPOH</b>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<input type="text" value="{{ $gadai['tempoh'] }}" class="form-control" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -2428,6 +2440,17 @@
|
||||
function wakilfunction(e)
|
||||
{
|
||||
let wakil = $('#wakiltxt').val();
|
||||
|
||||
if(wakil === null || wakil === '')
|
||||
{
|
||||
Swal.fire(
|
||||
'Amaran!',
|
||||
'Sila masukkan nilai di dalam kotak wakil!',
|
||||
'error'
|
||||
)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var patternregex = /\s+|[-,\/]/g;
|
||||
|
||||
@@ -2449,7 +2472,7 @@
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Daftar Dulu Boss!',
|
||||
confirmButtonText: 'Daftar',
|
||||
icon: 'info',
|
||||
title: 'Maklumat anda tiada dalam senarai wakil! Tekan button okay untuk mendaftar!'
|
||||
}).then(function(){
|
||||
@@ -2499,90 +2522,236 @@
|
||||
let nota = $('#notawakil').val();
|
||||
let nokp = $('#nokpwakil').val();
|
||||
|
||||
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
let boolnowakil = false;let boolnama = false;let boolalamat = false;let booltelefon = false;let boolnota = false;let boolnokp = false;
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
if(nowakil === null || nowakil === '')
|
||||
{
|
||||
$("[name='errornowakil']").show();
|
||||
$("[name='errornowakil']").text("*No wakil tidak dijana lagi!");
|
||||
$("[name='nowakil']").addClass('is-invalid');
|
||||
|
||||
});
|
||||
boolnowakil = true;
|
||||
}else{
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
boolnowakil = false;
|
||||
}
|
||||
|
||||
if(nama === null || nama === '')
|
||||
{
|
||||
$("[name='errornamawakil']").show();
|
||||
$("[name='errornamawakil']").text("*Isikan nama dalam kotak!");
|
||||
$("[name='namawakil']").addClass('is-invalid');
|
||||
|
||||
boolnama = true;
|
||||
}else{
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnama = false;
|
||||
}
|
||||
|
||||
if(alamat === null || alamat === '')
|
||||
{
|
||||
$("[name='erroralamatwakil']").show();
|
||||
$("[name='erroralamatwakil']").text("*Isikan alamat dalam kotak!");
|
||||
$("[name='alamatwakil']").addClass('is-invalid');
|
||||
|
||||
boolalamat = true;
|
||||
}else{
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
boolalamat = false;
|
||||
}
|
||||
|
||||
if(telefon === null || telefon === '')
|
||||
{
|
||||
$("[name='errornotelwakil']").show();
|
||||
$("[name='errornotelwakil']").text("*Isikan telefon dalam kotak!");
|
||||
$("[name='notelwakil']").addClass('is-invalid');
|
||||
|
||||
booltelefon = true;
|
||||
}else{
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
booltelefon = false;
|
||||
}
|
||||
|
||||
if(nota === null || nota === '')
|
||||
{
|
||||
$("[name='errornotawakil']").show();
|
||||
$("[name='errornotawakil']").text("*Isikan nota dalam kotak!");
|
||||
$("[name='notawakil']").addClass('is-invalid');
|
||||
|
||||
boolnota = true;
|
||||
}else{
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
boolnota = false;
|
||||
}
|
||||
|
||||
if(nokp === null || nokp === '')
|
||||
{
|
||||
$("[name='errornokpwakil']").show();
|
||||
$("[name='errornokpwakil']").text("*Isikan nokp dalam kotak!");
|
||||
$("[name='nokpwakil']").addClass('is-invalid');
|
||||
|
||||
boolnokp = true;
|
||||
}else{
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
boolnokp = false;
|
||||
}
|
||||
|
||||
|
||||
if(boolnowakil == false && boolnama == false && boolalamat == false && booltelefon == false && boolnota == false && boolnokp == false)
|
||||
{
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url: "{{ route('wakil.create') }}",
|
||||
data:{
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"nopelanggan" : nopelanggan,
|
||||
"nowakil" : nowakil,
|
||||
"nama" : nama,
|
||||
"hubungan" : hubungan,
|
||||
"alamat" : alamat,
|
||||
"telefon" : telefon,
|
||||
"nota" : nota,
|
||||
"icno" : nokp
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data == 1)
|
||||
{
|
||||
$('#WakilModal').hide();
|
||||
$('#WakilModal').modal('hide');
|
||||
nw = nowakil;
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false,
|
||||
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
|
||||
icon: 'success',
|
||||
title: 'Berjaya Mendaftar Wakil Pelanggan!'
|
||||
}).then(function(){
|
||||
$('#wakiltxt').prop( "disabled", true );
|
||||
$('#caribtn').html("Ubah");
|
||||
$('#caribtn').attr("onclick","ubahwakil(this)");
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#WakilModal').on('hidden.bs.modal', function (e) {
|
||||
|
||||
$("[name='errornowakil']").hide();
|
||||
$("[name='nowakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornamawakil']").hide();
|
||||
$("[name='namawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='erroralamatwakil']").hide();
|
||||
$("[name='alamatwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotelwakil']").hide();
|
||||
$("[name='notelwakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornotawakil']").hide();
|
||||
$("[name='notawakil']").removeClass('is-invalid');
|
||||
|
||||
$("[name='errornokpwakil']").hide();
|
||||
$("[name='nokpwakil']").removeClass('is-invalid');
|
||||
|
||||
$(this).find(".invalid-feedback").hide();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function daftarfunction(id)
|
||||
{
|
||||
let kodcaw = "{{ Auth::user()->cawangan }}";
|
||||
|
||||
$('#nokpwakil').val(id);
|
||||
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.caricustomer') }}",
|
||||
data:{ "icno" : id },
|
||||
// url: "{{ route('wakil.caricustomer') }}",
|
||||
url: api + '/api/customers/' + id,
|
||||
// data:{ "icno" : id },
|
||||
success:function(data){
|
||||
|
||||
$('#WakilModal').modal();
|
||||
$('#namawakil').val('');
|
||||
$('#alamatwakil').val(data['']);
|
||||
$('#notelwakil').val(data['']);
|
||||
$('#alamatwakil').val('');
|
||||
$('#notelwakil').val('');
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url: "{{ route('wakil.first') }}",
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
}
|
||||
});
|
||||
|
||||
if(data != 'no-data')
|
||||
var size = Object.keys(data).length;
|
||||
|
||||
if(size > 0)
|
||||
{
|
||||
$('#namawakil').val(data['nama']);
|
||||
$('#alamatwakil').val(data['alamat1']);
|
||||
$('#notelwakil').val(data['telefon']);
|
||||
$('#nopelangganwakil').val(data['nopelanggan']);
|
||||
}
|
||||
|
||||
|
||||
//get first wakil
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
// url: "{{ route('wakil.first') }}",
|
||||
url: api + '/api/firstwakil/' + kodcaw,
|
||||
success:function(getfirstwakil)
|
||||
{
|
||||
let firstwakil = parseInt(getfirstwakil);
|
||||
|
||||
$('#nowakil').val(firstwakil+1);
|
||||
|
||||
Swal.close();
|
||||
$('#WakilModal').modal();
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
Swal.close();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Punyai Ralat dalam API wakil...',
|
||||
icon: 'error'
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
},error: function (request, status, error) {
|
||||
console.log(request.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: function () {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,416 +1,394 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
|
||||
<style>
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
#header {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#header td, #customers th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
width: 100%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:20px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
#header td, #customers th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:12px;
|
||||
}
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
#header tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#header tr:hover {background-color: #ddd;}
|
||||
|
||||
#header th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#loading {
|
||||
position: fixed;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
opacity: 0.7;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#loading-image {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 240px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
width: 100%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:20px;
|
||||
}
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#scan {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#scan td, #scan th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
#scan tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
#scan tr:hover {background-color: #ddd;}
|
||||
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
#scan th {
|
||||
border-collapse: collapse;
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ffffff;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#title {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#title td, #title th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 0px solid #fff;
|
||||
}
|
||||
|
||||
#title tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#title tr:hover {background-color: #ddd;}
|
||||
|
||||
#title th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:80%;
|
||||
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding:4px;
|
||||
font-size:16px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
|
||||
#tarikh_cetak {
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
|
||||
#tarikh_cetak td, #tarikh_cetak th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
|
||||
}
|
||||
|
||||
#tarikh_cetak tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#tarikh_cetak tr:hover {background-color: #ddd;}
|
||||
|
||||
#tarikh_cetak th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
|
||||
#data {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#data td, #data th {
|
||||
|
||||
padding:4px;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
|
||||
#data tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#data tr:hover {background-color: #ddd;}
|
||||
|
||||
#data th {
|
||||
padding-top: 11px;
|
||||
padding-bottom: 11px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
font-size:14px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#tarikh_ib {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:45%;
|
||||
}
|
||||
|
||||
#tarikh_ib td, #tarikh_ib th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
#tarikh_ib tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#tarikh_ib tr:hover {background-color: #ddd;}
|
||||
|
||||
#tarikh_ib th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#GL {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#GL td, #GL th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#GL tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#GL tr:hover {background-color: #ddd;}
|
||||
|
||||
#GL th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#GL_dtl {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#GL_dtl td, #GL_dtl th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#GL_dtl tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#GL_dtl tr:hover {background-color: #ddd;}
|
||||
|
||||
#GL_dtl th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#dtl_ib {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#dtl_ib td, #dtl_ib th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#dtl_ib tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#dtl_ib tr:hover {background-color: #ddd;}
|
||||
|
||||
#dtl_ib th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#total_harta {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#total_harta td, #total_harta th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#total_harta tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#total_harta tr:hover {background-color: #ddd;}
|
||||
|
||||
#total_harta th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ffffff;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
font-style:bold;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#sign {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sign td, #sign th {
|
||||
|
||||
padding: 8px;
|
||||
font-size:11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sign tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#sign tr:hover {background-color: #ddd;}
|
||||
|
||||
#sign th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#title {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#title td, #title th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 0px solid #fff;
|
||||
}
|
||||
|
||||
#title tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#title tr:hover {background-color: #ddd;}
|
||||
|
||||
#title th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#details {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:80%;
|
||||
|
||||
}
|
||||
|
||||
#details td, #details th {
|
||||
|
||||
padding:4px;
|
||||
font-size:16px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#details tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#details tr:hover {background-color: #ddd;}
|
||||
|
||||
#details th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#tarikh_cetak {
|
||||
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
|
||||
#tarikh_cetak td, #tarikh_cetak th {
|
||||
|
||||
padding:4px;
|
||||
font-size:10px;
|
||||
|
||||
}
|
||||
|
||||
#tarikh_cetak tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#tarikh_cetak tr:hover {background-color: #ddd;}
|
||||
|
||||
#tarikh_cetak th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#data {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 80%;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#data td, #data th {
|
||||
|
||||
padding:4px;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
|
||||
#data tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#data tr:hover {background-color: #ddd;}
|
||||
|
||||
#data th {
|
||||
padding-top: 11px;
|
||||
padding-bottom: 11px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
font-size:14px;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#tarikh_ib {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:45%;
|
||||
}
|
||||
|
||||
#tarikh_ib td, #tarikh_ib th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
#tarikh_ib tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#tarikh_ib tr:hover {background-color: #ddd;}
|
||||
|
||||
#tarikh_ib th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#GL {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#GL td, #GL th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#GL tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#GL tr:hover {background-color: #ddd;}
|
||||
|
||||
#GL th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
#GL_dtl {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#GL_dtl td, #GL_dtl th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#GL_dtl tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#GL_dtl tr:hover {background-color: #ddd;}
|
||||
|
||||
#GL_dtl th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#dtl_ib {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#dtl_ib td, #dtl_ib th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#dtl_ib tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#dtl_ib tr:hover {background-color: #ddd;}
|
||||
|
||||
#dtl_ib th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
#total_harta {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#total_harta td, #total_harta th {
|
||||
|
||||
padding:4px;
|
||||
font-size:12px;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#total_harta tr:nth-child(even){background-color: #ffffff;}
|
||||
|
||||
#total_harta tr:hover {background-color: #ddd;}
|
||||
|
||||
#total_harta th {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
color:black;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading">
|
||||
<img id="loading-image" src="{{ asset('img/loader.gif') }}" alt="Loading..." />
|
||||
</div>
|
||||
<table id="header">
|
||||
<tr>
|
||||
<th rowspan="4" style="width:50px"><br><img src="{{ asset('img/ARRAHN1.png') }}" style="width:70px"></img></th>
|
||||
@@ -528,5 +506,13 @@
|
||||
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<br>
|
||||
|
||||
<script>
|
||||
$(window).load(function() {
|
||||
$('#loading').hide();
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -232,42 +232,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini1'][0]['bil']) }}</span><br>
|
||||
<span>{{ $gad1 = ($kawalanstok[0]['gadai1'][0]['bil'] + $kawalanstok[0]['gadaiini1'][0]['bil']) }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj1 = ($kawalanstok[0]['gadai1'][0]['pinj'] + $kawalanstok[0]['gadaiini1'][0]['pinj']); echo number_format($gadpinj1,2) @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $gad2 = ($kawalanstok[0]['gadai2'][0]['bil'] + $kawalanstok[0]['gadaiini2'][0]['bil']); echo number_format($gad2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj2 = ($kawalanstok[0]['gadai2'][0]['pinj'] + $kawalanstok[0]['gadaiini2'][0]['pinj']); echo number_format($gadpinj2,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[0]['gadaiini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $gad3 = ($kawalanstok[0]['gadai3'][0]['bil'] + $kawalanstok[0]['gadaiini3'][0]['bil']); echo number_format($gad3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[0]['gadai3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[0]['gadaiini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $gadpinj3 = ($kawalanstok[0]['gadai3'][0]['pinj'] + $kawalanstok[0]['gadaiini3'][0]['pinj']); echo number_format($gadpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilgadaikeseluruhan = $kawalanstok[0]['gadai1'][0]['bil'] + $kawalanstok[0]['gadai2'][0]['bil'] + $kawalanstok[0]['gadai3'][0]['bil']; echo number_format($totalbilgadaikeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilgadaisehari = $kawalanstok[0]['gadaiini1'][0]['bil'] + $kawalanstok[0]['gadaiini2'][0]['bil'] + $kawalanstok[0]['gadaiini3'][0]['bil']; echo number_format($totalbilgadaisehari); @endphp</span><br>
|
||||
<span>@php $totalbilgadai = $totalbilgadaikeseluruhan + $totalbilgadaisehari; echo number_format($totalbilgadai); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjgadaikeseluruhan = $kawalanstok[0]['gadai1'][0]['pinj'] + $kawalanstok[0]['gadai2'][0]['pinj'] + $kawalanstok[0]['gadai3'][0]['pinj']; echo number_format($totalpinjgadaikeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjgadaisehari = $kawalanstok[0]['gadaiini1'][0]['pinj'] + $kawalanstok[0]['gadaiini2'][0]['pinj'] + $kawalanstok[0]['gadaiini3'][0]['pinj']; echo number_format($totalpinjgadaisehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjgadai = $totalpinjgadaikeseluruhan + $totalpinjgadaisehari; echo number_format($totalpinjgadai,2); @endphp</span>
|
||||
@@ -281,42 +281,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align:right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb1 = ($kawalanstok[1]['tebus1'][0]['bil'] + $kawalanstok[1]['tebusini1'][0]['bil']); echo number_format($teb1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj1 = ($kawalanstok[1]['tebus1'][0]['pinj'] + $kawalanstok[1]['tebusini1'][0]['pinj']); echo number_format($tebpinj1,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb2 = ($kawalanstok[1]['tebus2'][0]['bil'] + $kawalanstok[1]['tebusini2'][0]['bil']); echo number_format($teb2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj2 = ($kawalanstok[1]['tebus2'][0]['pinj'] + $kawalanstok[1]['tebusini2'][0]['pinj']); echo number_format($tebpinj2,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[1]['tebusini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $teb3 = ($kawalanstok[1]['tebus3'][0]['bil'] + $kawalanstok[1]['tebusini3'][0]['bil']); echo number_format($teb3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[1]['tebus3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[1]['tebusini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $tebpinj3 = ($kawalanstok[1]['tebus3'][0]['pinj'] + $kawalanstok[1]['tebusini3'][0]['pinj']); echo number_format($tebpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbiltebuskeseluruhan = $kawalanstok[1]['tebus1'][0]['bil'] + $kawalanstok[1]['tebus2'][0]['bil'] + $kawalanstok[1]['tebus3'][0]['bil']; echo number_format($totalbiltebuskeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbiltebussehari = $kawalanstok[1]['tebusini1'][0]['bil'] + $kawalanstok[1]['tebusini2'][0]['bil'] + $kawalanstok[1]['tebusini3'][0]['bil']; echo number_format($totalbiltebussehari); @endphp</span><br>
|
||||
<span>@php $totalbiltebus = $totalbiltebuskeseluruhan + $totalbiltebussehari; echo number_format($totalbiltebus); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjtebuskeseluruhan = $kawalanstok[1]['tebus1'][0]['pinj'] + $kawalanstok[1]['tebus2'][0]['pinj'] + $kawalanstok[1]['tebus3'][0]['pinj']; echo number_format($totalpinjtebuskeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjtebussehari = $kawalanstok[1]['tebusini1'][0]['pinj'] + $kawalanstok[1]['tebusini2'][0]['pinj'] + $kawalanstok[1]['tebusini3'][0]['pinj']; echo number_format($totalpinjtebussehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjtebus = $totalpinjtebuskeseluruhan + $totalpinjtebussehari; echo number_format($totalpinjtebus,2); @endphp</span>
|
||||
@@ -329,42 +329,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans1']['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[4]['ansini1']['bil']) }}</span><br>
|
||||
<span>@php $ans1 = ($kawalanstok[4]['ans1']['bil'] + $kawalanstok[4]['ansini1']['bil']); echo number_format($ans1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans1']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini1']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj1 = ($kawalanstok[4]['ans1']['pinj'] + $kawalanstok[4]['ansini1']['pinj']); echo number_format($anspinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans2']['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[4]['ansini2']['bil']) }}</span><br>
|
||||
<span>@php $ans2 = ($kawalanstok[4]['ans2']['bil'] + $kawalanstok[4]['ansini2']['bil']); echo number_format($ans2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans2']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini2']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj2 = ($kawalanstok[4]['ans2']['pinj'] + $kawalanstok[4]['ansini2']['pinj']); echo number_format($anspinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(intval($kawalanstok[4]['ans3']['bil'])) }}</span><br>
|
||||
<span>{{ number_format(intval($kawalanstok[4]['ansini3']['bil'])) }}</span><br>
|
||||
<span>@php $ans3 = ($kawalanstok[4]['ans3']['bil'] + $kawalanstok[4]['ansini3']['bil']); echo number_format($ans3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[4]['ans3']['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[4]['ansini3']['pinj']),2) }}</span><br>
|
||||
<span>@php $anspinj3 = ($kawalanstok[4]['ans3']['pinj'] + $kawalanstok[4]['ansini3']['pinj']); echo number_format($anspinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilanskeseluruhan = $kawalanstok[4]['ans1']['bil'] + $kawalanstok[4]['ans2']['bil'] + $kawalanstok[4]['ans3']['bil']; echo number_format($totalbilanskeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilanssehari = $kawalanstok[4]['ansini1']['bil'] + $kawalanstok[4]['ansini2']['bil'] + $kawalanstok[4]['ansini3']['bil']; echo number_format($totalbilanssehari); @endphp</span><br>
|
||||
<span>@php $totalbilans = $totalbilanskeseluruhan + $totalbilanssehari; echo number_format($totalbilans); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjanskeseluruhan = $kawalanstok[4]['ans1']['pinj'] + $kawalanstok[4]['ans2']['pinj'] + $kawalanstok[4]['ans3']['pinj']; echo number_format($totalpinjanskeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjanssehari = $kawalanstok[4]['ansini1']['pinj'] + $kawalanstok[4]['ansini2']['pinj'] + $kawalanstok[4]['ansini3']['pinj']; echo number_format($totalpinjanssehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjans = floatval($totalpinjanskeseluruhan + $totalpinjanssehari); echo number_format($totalpinjans,2); @endphp</span>
|
||||
@@ -377,42 +377,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[2]['lelongini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $lel1 = ($kawalanstok[2]['lelong1'][0]['bil'] + $kawalanstok[2]['lelongini1'][0]['bil']); echo number_format($lel1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong1'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj1 = ($kawalanstok[2]['lelong1'][0]['pinj'] + $kawalanstok[2]['lelongini1'][0]['pinj']); echo number_format($lelpinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[2]['lelongini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $lel2 = ($kawalanstok[2]['lelong2'][0]['bil'] + $kawalanstok[2]['lelongini2'][0]['bil']); echo number_format($lel2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong2'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj2 = ($kawalanstok[2]['lelong2'][0]['pinj'] + $kawalanstok[2]['lelongini2'][0]['pinj']); echo number_format($lelpinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(intval($kawalanstok[2]['lelong3'][0]['bil'])) }}</span><br>
|
||||
<span>{{ number_format(intval($kawalanstok[2]['lelongini3'][0]['bil'])) }}</span><br>
|
||||
<span>@php $lel3 = ($kawalanstok[2]['lelong3'][0]['bil'] + $kawalanstok[2]['lelongini3'][0]['bil']); echo number_format($lel3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[2]['lelong3'][0]['pinj'],2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[2]['lelongini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $lelpinj3 = ($kawalanstok[2]['lelong3'][0]['pinj'] + $kawalanstok[2]['lelongini3'][0]['pinj']); echo number_format($lelpinj3,2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbillelongkeseluruhan = $kawalanstok[2]['lelong1'][0]['bil'] + $kawalanstok[2]['lelong2'][0]['bil'] + $kawalanstok[2]['lelong3'][0]['bil']; echo number_format($totalbillelongkeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbillelongsehari = $kawalanstok[2]['lelongini1'][0]['bil'] + $kawalanstok[2]['lelongini2'][0]['bil'] + $kawalanstok[2]['lelongini3'][0]['bil']; echo number_format($totalbillelongsehari); @endphp</span><br>
|
||||
<span>@php $totalbillelong = $totalbillelongkeseluruhan + $totalbillelongsehari; echo number_format($totalbillelong); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjlelongkeseluruhan = $kawalanstok[2]['lelong1'][0]['pinj'] + $kawalanstok[2]['lelong2'][0]['pinj'] + $kawalanstok[2]['lelong3'][0]['pinj']; echo number_format($totalpinjlelongkeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjlelongsehari = $kawalanstok[2]['lelongini1'][0]['pinj'] + $kawalanstok[2]['lelongini2'][0]['pinj'] + $kawalanstok[2]['lelongini3'][0]['pinj']; echo number_format($totalpinjlelongsehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjlelong = floatval($totalpinjlelongkeseluruhan + $totalpinjlelongsehari); echo number_format($totalpinjlelong,2); @endphp</span>
|
||||
@@ -425,42 +425,42 @@
|
||||
<span>Hari Ini</span><br>
|
||||
<span>Jumlah</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira1'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini1'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk1 = $kawalanstok[3]['hapuskira1'][0]['bil'] + $kawalanstok[3]['hapuskiraini1'][0]['bil']; echo number_format($hpk1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira1'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini1'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj1 = ($kawalanstok[3]['hapuskira1'][0]['pinj'] + $kawalanstok[3]['hapuskiraini1'][0]['pinj']); echo number_format($hpkpinj1); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira2'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini2'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk2 = ($kawalanstok[3]['hapuskira2'][0]['bil'] + $kawalanstok[3]['hapuskiraini2'][0]['bil']); echo number_format($hpk2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira2'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini2'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj2 = ($kawalanstok[3]['hapuskira2'][0]['pinj'] + $kawalanstok[3]['hapuskiraini2'][0]['pinj']); echo number_format($hpkpinj2); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskira3'][0]['bil']) }}</span><br>
|
||||
<span>{{ number_format($kawalanstok[3]['hapuskiraini3'][0]['bil']) }}</span><br>
|
||||
<span>@php $hpk3 = ($kawalanstok[3]['hapuskira3'][0]['bil'] + $kawalanstok[3]['hapuskiraini3'][0]['bil']); echo number_format($hpk3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskira3'][0]['pinj']),2) }}</span><br>
|
||||
<span>{{ number_format(floatval($kawalanstok[3]['hapuskiraini3'][0]['pinj']),2) }}</span><br>
|
||||
<span>@php $hpkpinj3 = $kawalanstok[3]['hapuskira3'][0]['pinj'] + $kawalanstok[3]['hapuskiraini3'][0]['pinj']; echo number_format($hpkpinj3); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalbilhapuskirakeseluruhan = $kawalanstok[3]['hapuskira1'][0]['bil'] + $kawalanstok[3]['hapuskira2'][0]['bil'] + $kawalanstok[3]['hapuskira3'][0]['bil']; echo number_format($totalbilhapuskirakeseluruhan); @endphp</span><br>
|
||||
<span>@php $totalbilhapuskirasehari = $kawalanstok[3]['hapuskiraini1'][0]['bil'] + $kawalanstok[3]['hapuskiraini2'][0]['bil'] + $kawalanstok[3]['hapuskiraini3'][0]['bil']; echo number_format($totalbilhapuskirasehari); @endphp</span><br>
|
||||
<span>@php $totalbilhapuskira = $totalbilhapuskirakeseluruhan + $totalbilhapuskirasehari; echo number_format($totalbilhapuskira); @endphp</span>
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
<span>@php $totalpinjhapuskirakeseluruhan = $kawalanstok[3]['hapuskira1'][0]['pinj'] + $kawalanstok[3]['hapuskira2'][0]['pinj'] + $kawalanstok[3]['hapuskira3'][0]['pinj']; echo number_format($totalpinjhapuskirakeseluruhan,2); @endphp</span><br>
|
||||
<span>@php $totalpinjhapuskirasehari = $kawalanstok[3]['hapuskiraini1'][0]['pinj'] + $kawalanstok[3]['hapuskiraini2'][0]['pinj'] + $kawalanstok[3]['hapuskiraini3'][0]['pinj']; echo number_format($totalpinjhapuskirasehari,2); @endphp</span><br>
|
||||
<span>@php $totalpinjhapuskira = $totalpinjhapuskirakeseluruhan + $totalpinjhapuskirasehari; echo number_format($totalpinjhapuskira,2); @endphp</span>
|
||||
@@ -470,61 +470,61 @@
|
||||
<tfoot>
|
||||
<tr style="font-weight:bold;">
|
||||
<td colspan="2">Baki</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil1 = $gad1 - $teb1 - $lel1 - $ans1 - $hpk1; echo number_format($totalbil1);@endphp
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj1 = $gadpinj1 - $tebpinj1 - $lelpinj1 - $anspinj1 - $hpkpinj1; echo number_format($totalpinj1,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil2 = $gad2 - $teb2 - $lel2 - $ans2 - $hpk2; echo number_format($totalbil2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj2 = $gadpinj2 - $tebpinj2 - $lelpinj2 - $anspinj2 - $hpkpinj2; echo number_format($totalpinj2,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil3 = $gad3 - $teb3 - $lel3 = - $ans3 - $hpk3; echo number_format($totalbil3);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj3 = $gadpinj3 - $tebpinj3 - $lelpinj3 - $anspinj3 - $hpkpinj3; echo number_format($totalpinj3,2);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalbil = $totalbilgadai-$totalbiltebus/*-$totalbilans*/-$totalbillelong-$totalbilhapuskira; echo number_format($totalbil);@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $totalpinj = $totalpinjgadai-$totalpinjtebus-$totalpinjans-$totalpinjlelong-$totalpinjhapuskira; echo number_format($totalpinj,2);@endphp
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
|
||||
@php $percentbil1 = (($totalbil1)/$totalbil)*100; echo number_format($percentbil1,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj1 = (($totalpinj1)/$totalpinj)*100; echo number_format($percentpinj1,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentbil2 = (($totalbil2)/$totalbil)*100; echo number_format($percentbil2,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj2 = (($totalpinj2)/$totalpinj)*100; echo number_format($percentpinj2,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentbil3 = (($totalbil3)/$totalbil)*100; echo number_format($percentbil3,2) . ' %';@endphp
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<td style="text-align: right;">
|
||||
@php $percentpinj3 = (($totalpinj3)/$totalpinj)*100;; echo number_format($percentpinj3,2) . ' %';@endphp
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
@@ -313,7 +313,6 @@
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<table id="title">
|
||||
<td> <b><u>LEJER AM</u></b></td>
|
||||
</table>
|
||||
|
||||
@@ -203,13 +203,14 @@
|
||||
<th>J Tebus</th>
|
||||
<th width="6%;">Nilai Marhun(RM)</th>
|
||||
<th width="6%;">Pembiayaan(RM)</th>
|
||||
{{-- <th width="6%;">Baki Pembiayaan(RM)</th> --}}
|
||||
<th width="6%;">Upah/Keuntungan(RM)</th>
|
||||
<th width="6%;">Bayaran(RM)</th>
|
||||
<th width="6%;">Jumlah(RM)</th>
|
||||
</tr>
|
||||
@php $counter = 1;$totalnm = 0; $totalbayaran = 0; $totalpinjaman = 0; $totalupah = 0;@endphp
|
||||
@foreach($tebus as $index=>$item)
|
||||
@php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; $totalpinjaman += $item['pinjaman']; $totalupah += $item['bakiupah']; $totalnm += $item['nilaimarhun'];@endphp
|
||||
@php $totalbayaran += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; $totalpinjaman += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman']; $totalupah += $item['bakiupah']; $totalnm += $item['nilaimarhun'];@endphp
|
||||
@if($index > 0)
|
||||
@if($item['teller'] != $tebus[$index - 1]['teller'])
|
||||
<tr>
|
||||
@@ -240,13 +241,20 @@
|
||||
<td>
|
||||
{{ number_format($item['nilaimarhun'],2) }}
|
||||
</td>
|
||||
<td>{{ number_format($item['pinjaman'],2) }}</td>
|
||||
<td>@php
|
||||
|
||||
if($item['hargajualan'] !== $item['bakihargajualan'])
|
||||
echo number_format($item['gadaibakipjm'],2);
|
||||
else
|
||||
echo number_format($item['pinjaman'],2);
|
||||
@endphp</td>
|
||||
{{-- <td>{{ number_format($item['gadaibakipjm'],2) }}</td> --}}
|
||||
<td>{{ number_format($item['bakiupah'],2) }}</td>
|
||||
<td>{{ number_format($item['bakipjm'],2) }}</td>
|
||||
<td>@php if($item['jenistebus'] == 'S'){ $total=($item['pinjaman']+$item['bakiupah']);echo number_format($total,2);} else echo number_format($item['bakipjm'],2); @endphp</td>
|
||||
</tr>
|
||||
@php $counter++; @endphp
|
||||
@php $totalnmteller += $item['nilaimarhun']; $totalpinjamanteller += $item['pinjaman'];$totalupahteller += $item['bakiupah'];$totalbayaranteller += $item['bakipjm']; @endphp
|
||||
@php $totalnmteller += $item['nilaimarhun']; $totalpinjamanteller += ($item['hargajualan'] != $item['bakihargajualan']) ? $item['gadaibakipjm'] : $item['pinjaman'];$totalupahteller += $item['bakiupah'];$totalbayaranteller += $item['bakipjm']; @endphp
|
||||
@php $totaljumlahteller += ($item['jenistebus'] === 'S') ? ($item['pinjaman']+$item['bakiupah']) : $item['bakipjm']; @endphp
|
||||
@if($index+1 < sizeof($tebus))
|
||||
@if($item['teller'] != $tebus[$index + 1]['teller'])
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_harian'],2) }}</div>
|
||||
<div class="col-6">2. BULANAN</div>
|
||||
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_bulanan'],2) }}</div>
|
||||
<div class="col-6">3. TERKUMPUL</div>
|
||||
<div class="col-6">3. TERKUMPUL (TAHUNAN)</div>
|
||||
<div class="col-6">{{ 'RM '. number_format($laporan['panjar_tahunan'],2) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
$gadaidetail = Http::get($api_url . '/api/gadai/norujukan/' . $item['norujukan'])->json();
|
||||
$customer_detail = Http::get($api_url . '/api/customers/' . $gadaidetail[0][0]['nokp'])->json();
|
||||
echo $customer_detail[0]['nama'];
|
||||
echo $customer_detail['nama'];
|
||||
@endphp
|
||||
</td>
|
||||
<td style="width:100px">{{$gadaidetail[0][0]['nokp']}}</td>
|
||||
|
||||
@@ -224,14 +224,15 @@
|
||||
<td>{{ $lelong['tarikh'] }}</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<tr style="border-top:1px solid black;">
|
||||
<th>Nama wakil</th>
|
||||
<td></td>
|
||||
<td>@php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr style="border-bottom:1px solid black;">
|
||||
<th>No K/P</th>
|
||||
<td></td>
|
||||
<td>@php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp</td>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+6
-3
@@ -68,7 +68,8 @@ Route::get('/daftar_marhun',['as'=>'daftar_marhun','uses'=>'MarhunController@ind
|
||||
Route::get('/penebusan/{norujukan}',['as'=>'penebusan','uses' => 'PenebusanController@index'])->middleware('auth','teller');
|
||||
Route::get('/lelongan/{norujukan}',['as'=>'lelongan','uses' => 'LelongController@index'])->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai','AliranTunaiController@index')->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai/laporanserahan}',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai/laporanserahan',['as'=>'laporan.serahanteller','uses' => 'AliranTunaiController@LaporanSerahan'])->middleware('auth','teller');
|
||||
Route::get('/aliran_tunai/laporanalirantunai/{teller}',['as'=>'laporan.alirantunai','uses' => 'AliranTunaiController@LaporanAliranTunai'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/Gadaian',['as'=>'alirantunai.gadai','uses' => 'AliranTunaiController@alirantunaiGadai'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/Tebusan',['as'=>'alirantunai.tebus','uses' => 'AliranTunaiController@alirantunaiTebus'])->middleware('auth','teller');
|
||||
Route::put('/aliran_tunai/advansur',['as'=>'alirantunai.advansur','uses' => 'AliranTunaiController@alirantunaiUpahBknTawarruq'])->middleware('auth','teller');
|
||||
@@ -128,6 +129,8 @@ Route::get('/khazanah/customer_info',['as'=>'khazanah.customer_info','uses'=>'Kh
|
||||
Route::get('/khazanah/searchpelanggan',['as'=>'khazanah.searchpelanggan','uses'=>'KhazanahController@search'])->middleware('auth','khazanah');
|
||||
Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
|
||||
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
|
||||
Route::get('/lelongankhazanah/{norujukan}',['as'=>'lelongan.khazanah','uses' => 'KhazanahController@lelongan'])->middleware('auth','khazanah');
|
||||
|
||||
|
||||
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
||||
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
||||
@@ -279,6 +282,6 @@ Route::get('admin/kakitangan/edit',['as'=>'admin.kakitangan.edit','uses'=>'Kakit
|
||||
Route::post('admin/kakitangan/edit/store',['as'=>'admin.kakitangan.edit.store','uses'=>'KakitanganController@editStoreKakitangan'])->middleware('auth','admin');
|
||||
Route::get('admin/kakitangan/resetcredentials',['as'=>'admin.kakitangan.resetcredentials','uses'=>'KakitanganController@resetCredentials'])->middleware('auth','admin');
|
||||
Route::get('admin/pelanggan',['as'=>'admin.pelanggan','uses'=>'KhazanahController@index'])->middleware('auth','admin');
|
||||
Route::get('admin/customer_info',['as'=>'admin.customer_info','uses'=>'KhazanahController@info'])->middleware('auth','admin');
|
||||
Route::get('admin/searchpelanggan',['as'=>'admin.searchpelanggan','uses'=>'KhazanahController@search'])->middleware('auth','admin');
|
||||
Route::get('admin/customer_info',['as'=>'admin.customer_info','uses'=>'KhazanahController@infoAdmin'])->middleware('auth','admin');
|
||||
Route::get('admin/searchpelanggan',['as'=>'admin.searchpelanggan','uses'=>'KhazanahController@searchAdmin'])->middleware('auth','admin');
|
||||
Route::get('admin/poskod',['as'=>'admin.poskod','uses'=>'HomeController@poskod']);
|
||||
Reference in New Issue
Block a user