tambah function tanya upah dan status bayaran dlm callcenter
This commit is contained in:
@@ -880,4 +880,47 @@ class CallCenterController extends Controller
|
|||||||
|
|
||||||
return response()->json($arrayhist,200);
|
return response()->json($arrayhist,200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tukaranhargaemas($norujukan)
|
||||||
|
{
|
||||||
|
|
||||||
|
$marhunsaglama = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/'. $norujukan)->json();
|
||||||
|
|
||||||
|
$marhunsaglama = $marhunsaglama[0];
|
||||||
|
$totalnilaimarhun = 0;
|
||||||
|
|
||||||
|
foreach($marhunsaglama as $index=>$marhunloop)
|
||||||
|
{
|
||||||
|
$karatbaru = str_replace('.','-',$marhunloop['karat']);
|
||||||
|
$hargabaru = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/harga_emas/'. $karatbaru)->json();
|
||||||
|
|
||||||
|
$nilaimarhun = (floatval($hargabaru['harga']) * floatval($marhunloop['berat']));
|
||||||
|
|
||||||
|
$totalnilaimarhun += $nilaimarhun;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $totalnilaimarhun;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tanyaupah($norujukan){
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. Session::get('kodcaw'))->json();
|
||||||
|
$customer_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. Session::get('noic'))->json();
|
||||||
|
|
||||||
|
$gadaidetail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $norujukan)->json();
|
||||||
|
$noic = $gadaidetail[0][0]['nokp'];
|
||||||
|
$customerdetail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||||
|
$marhundetail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/'. $norujukan)->json();
|
||||||
|
|
||||||
|
$marhun = $marhundetail[0];
|
||||||
|
$nama = $customerdetail['nama'];
|
||||||
|
|
||||||
|
$gadai = $gadaidetail[0][0];
|
||||||
|
|
||||||
|
$nilaihargasemasa = $this->tukaranhargaemas($norujukan);
|
||||||
|
|
||||||
|
$pertambahpinjaman = 0.80;
|
||||||
|
return view('callcenter.' . $cawangan_info['version'] . '.index',compact('cawangan_info','api_url','gadai','marhun','nama','nilaihargasemasa','pertambahpinjaman'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1251,11 +1251,20 @@
|
|||||||
$.each(data,function(index,bayaran){
|
$.each(data,function(index,bayaran){
|
||||||
|
|
||||||
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
||||||
|
var bayaranteller;
|
||||||
|
|
||||||
|
if(bayaran['teller'] != 'Online')
|
||||||
|
bayaranteller = 'KT';
|
||||||
|
|
||||||
|
if(bayaran['teller'] == 'Online')
|
||||||
|
bayaranteller = 'ON';
|
||||||
|
|
||||||
urlroute = urlroute.replace(':id', bayaran['id']);
|
urlroute = urlroute.replace(':id', bayaran['id']);
|
||||||
historybayarandatatable.row.add([
|
historybayarandatatable.row.add([
|
||||||
counter,
|
counter,
|
||||||
bayaran['created_at'],
|
bayaran['created_at'],
|
||||||
"RM " + bayaran['duit_masuk'],
|
"RM " + bayaran['duit_masuk'],
|
||||||
|
bayaranteller,
|
||||||
bayaran['trans_type'],
|
bayaran['trans_type'],
|
||||||
''
|
''
|
||||||
]).draw();
|
]).draw();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
@extends('layouts.app_operasi')
|
@extends('layouts.app_callcenter')
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#daftar_gadai{
|
#daftar_gadai{
|
||||||
@@ -746,7 +746,7 @@
|
|||||||
},
|
},
|
||||||
success:function(upahsemasa){
|
success:function(upahsemasa){
|
||||||
if(jenistebus == "belum_tebus"){
|
if(jenistebus == "belum_tebus"){
|
||||||
var urlroute = '{{ route("penebusan", ":id") }}';
|
var urlroute = '{{ route("tanyaupah", ":id") }}';
|
||||||
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
urlroute = urlroute.replace(':id', gadai_detail["norujukan"]);
|
||||||
|
|
||||||
if(gadai_detail['lelong_tawarruq'] == 0){
|
if(gadai_detail['lelong_tawarruq'] == 0){
|
||||||
@@ -834,7 +834,7 @@
|
|||||||
let radio_action = "onclick=checkCanChangeGadaianDetail(" + "'" + table_norujukan + "'" + ")";
|
let radio_action = "onclick=checkCanChangeGadaianDetail(" + "'" + table_norujukan + "'" + ")";
|
||||||
tablegadai.row.add([
|
tablegadai.row.add([
|
||||||
'<input type="radio" value='+ gadai_detail["norujukan"] + ' ' + radio_action +' name="belum"/>',
|
'<input type="radio" value='+ gadai_detail["norujukan"] + ' ' + radio_action +' name="belum"/>',
|
||||||
'<a data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
|
'<a href="#" onclick="checkserah(this)" data-pinjaman='+ gadai_detail['pinjaman'] +' data-hargajualan='+ gadai_detail['hargajualan'] +' data-norujukan='+ gadai_detail['norujukan'] +' data-url=' + urlroute +'>' + gadai_detail['norujukan'] + '</a>',
|
||||||
gadai_detail['t_gadai'],
|
gadai_detail['t_gadai'],
|
||||||
tarikh_matang,
|
tarikh_matang,
|
||||||
'RM '+ formatter.format(gadai_detail['bakihargajualan']),
|
'RM '+ formatter.format(gadai_detail['bakihargajualan']),
|
||||||
@@ -1318,11 +1318,20 @@
|
|||||||
$.each(data,function(index,bayaran){
|
$.each(data,function(index,bayaran){
|
||||||
|
|
||||||
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
||||||
|
var bayaranteller;
|
||||||
|
|
||||||
|
if(bayaran['teller'] != 'Online')
|
||||||
|
bayaranteller = 'KT';
|
||||||
|
|
||||||
|
if(bayaran['teller'] == 'Online')
|
||||||
|
bayaranteller = 'ON';
|
||||||
|
|
||||||
urlroute = urlroute.replace(':id', bayaran['id']);
|
urlroute = urlroute.replace(':id', bayaran['id']);
|
||||||
historybayarandatatable.row.add([
|
historybayarandatatable.row.add([
|
||||||
counter,
|
counter,
|
||||||
bayaran['created_at'],
|
bayaran['created_at'],
|
||||||
"RM " + bayaran['duit_masuk'],
|
"RM " + bayaran['duit_masuk'],
|
||||||
|
bayaranteller,
|
||||||
bayaran['trans_type'],
|
bayaran['trans_type'],
|
||||||
''
|
''
|
||||||
]).draw();
|
]).draw();
|
||||||
|
|||||||
@@ -432,6 +432,7 @@ Route::post('/blastkedua/{kodcaw}/{notisid}',['as'=>'arcc.blastkedua','uses'=>'C
|
|||||||
Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininotisperingatankedua','uses'=>'CallCenterController@kemaskininotisperingatankedua'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatankedua/{notisid}',['as'=>'arcc.kemaskininotisperingatankedua','uses'=>'CallCenterController@kemaskininotisperingatankedua'])->middleware('auth','callcenter');
|
||||||
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatanbycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatanbycaw','uses'=>'CallCenterController@kemaskininotisperingatanbycaw'])->middleware('auth','callcenter');
|
||||||
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
|
Route::get('/kemaskininotisperingatankeduabycaw/{kodcaw}/{notisid}',['as'=>'arcc.kemaskininotisperingatankeduabycaw','uses'=>'CallCenterController@kemaskininotisperingatankeduabycaw'])->middleware('auth','callcenter');
|
||||||
|
Route::get('/arcc/tanyaupah/{norujukan}',['as'=>'tanyaupah','uses' => 'CallCenterController@tanyaupah'])->middleware('auth','callcenter');
|
||||||
|
|
||||||
//taraf pc atau ppc
|
//taraf pc atau ppc
|
||||||
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
|
Route::get('/cawangan/notisperingatan',['as'=>'laporan.notisperingatan','uses'=>'KhazanahController@notisperingatan'])->middleware('auth','khazanah');
|
||||||
|
|||||||
Reference in New Issue
Block a user