fix skit2
This commit is contained in:
@@ -430,6 +430,10 @@ class GadaianController extends Controller
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
dd($cawangan_info);
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
|
||||
|
||||
$totaltransaction = 0;
|
||||
@@ -462,7 +466,7 @@ class GadaianController extends Controller
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resittebus',compact('transaction','gadai','customers_info','penebusan','wakil','totaltransaction'));
|
||||
return view('print.resittebus',compact('transaction','gadai','cawangan_info','customers_info','penebusan','wakil','totaltransaction'));
|
||||
}
|
||||
|
||||
public function resitbelumtebus($id)
|
||||
|
||||
@@ -9,6 +9,7 @@ use App\Events\OperasiNotice;
|
||||
use App\Events\PendahuluanSerahan;
|
||||
use App\Events\NotifikasiKelulusan;
|
||||
use App\Events\NotifikasiUbahHapus;
|
||||
use App\Events\NotifikasiAGH;
|
||||
|
||||
use App\User;
|
||||
use App\Cawangan;
|
||||
@@ -1712,10 +1713,10 @@ class KhazanahController extends Controller
|
||||
$debit_panjar= $get_Panjar_AM[0]['debit'];
|
||||
$recno_panjar= $get_Panjar_AM[0]['recno'];
|
||||
$kredit_panjar= $get_Panjar_AM[0]['kredit'];
|
||||
$debit_panjar=$debit_panjar+$request->bayaran;
|
||||
$harini_panjar=$debit_panjar-$kredit_panjar;
|
||||
$kelmarin_panjar=$jumlah_panjar-$harini_panjar;
|
||||
$update_PanjarAM=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
$debit_panjar=$debit_panjar+$request->bayaran;
|
||||
$harini_panjar=$debit_panjar-$kredit_panjar;
|
||||
$kelmarin_panjar=$jumlah_panjar-$harini_panjar;
|
||||
$update_PanjarAM=Http::put(config('api.url').'/api/kemasKiniGlejer/'.$auth_user['cawangan'],[
|
||||
'recno'=>$recno_panjar,
|
||||
'debit'=>$debit_panjar,
|
||||
'kredit'=>$kredit_panjar,
|
||||
@@ -1762,6 +1763,19 @@ class KhazanahController extends Controller
|
||||
|
||||
if($upVault == 200 && empty($panjar) == false && $upDeno == 200)
|
||||
{
|
||||
if($request->jenismodal === 'perubatan')
|
||||
{
|
||||
$listUser=User::where('name','=',$request->tuntutan)->get();
|
||||
|
||||
$totalsebenar = floatval($listUser[0]->perubatan) - floatval($request->bayaran);
|
||||
|
||||
$overrideuser = User::where('cawangan','=',$auth_user['cawangan'])
|
||||
->where('name','=',$request->tuntutan)
|
||||
->update(array(
|
||||
'perubatan' => $totalsebenar
|
||||
));
|
||||
}
|
||||
|
||||
return redirect('/panjar')->with('messageinformation','Panjar Berjaya Disimpan.');
|
||||
}else{
|
||||
return redirect('/panjar')->with('messageinformation','Panjar Mengalami Masalah Untuk Disimpan.');
|
||||
@@ -2963,7 +2977,7 @@ class KhazanahController extends Controller
|
||||
$split_date = explode('-',$request->datetimepicker1);
|
||||
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
$marhun = Http::get(config('api.url'). '/api/gadai/laporan/ringkasan/'. $auth_user['cawangan'] .'/'. $tebus_date)->json();
|
||||
$marhun = Http::get(config('api.url'). '/api/gadai/laporan/ringkasan/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
|
||||
$marhun = $marhun[0];
|
||||
|
||||
$keseluruhanupahsimpan = $marhun['lelongupahsimpan'] + $marhun['tebus'][0]['upahsimpan'] + $marhun['advansur'][0]['upahsimpan'];
|
||||
@@ -3811,33 +3825,58 @@ class KhazanahController extends Controller
|
||||
|
||||
$kodnegeridandaerah = $request->negeriagh .'|' . $request->daerahagh;
|
||||
|
||||
$daftarpolis = Http::post(config('api.url').'/api/polis/create/',[
|
||||
$polis = Http::get(config('api.url').'/api/polis/get/',['norujukan' => $request->norujukanhidden,'kodcaw' => $auth_user['cawangan']])->json();
|
||||
|
||||
'kodcaw' =>$auth_user['cawangan'],
|
||||
'norujukan' => $request->norujukanhidden,
|
||||
'komen1' => $request->alasan,
|
||||
'komen2' => $kodnegeridandaerah,
|
||||
'tebus' => 0,
|
||||
'teller' => $auth_user['name'],
|
||||
'caj' => 0.00
|
||||
$daftar = 0;
|
||||
if(sizeof($polis) > 0)
|
||||
{
|
||||
event(new NotifikasiAGH($auth_user['cawangan'],'Tak boleh generate dah kerana sudah digenerate dah.','error',$auth_user['name']));
|
||||
$daftar = 400;
|
||||
}else{
|
||||
$daftarpolis = Http::post(config('api.url').'/api/polis/create/',[
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$daftar = $daftarpolis->getStatusCode();
|
||||
'kodcaw' =>$auth_user['cawangan'],
|
||||
'norujukan' => $request->norujukanhidden,
|
||||
'komen1' => $request->alasan,
|
||||
'komen2' => $kodnegeridandaerah,
|
||||
'tebus' => 0,
|
||||
'teller' => $auth_user['name'],
|
||||
'caj' => 0.00
|
||||
|
||||
]);
|
||||
|
||||
$daftar = $daftarpolis->getStatusCode();
|
||||
}
|
||||
|
||||
if($daftar == 200)
|
||||
{
|
||||
$polis = Http::get(config('api.url').'/api/polis/get/',['norujukan' => $request->norujukanhidden,'kodcaw' => $auth_user['cawangan']])->json();
|
||||
|
||||
event(new NotifikasiAGH($auth_user['cawangan'],'Surat Akuan Gadaian Hilang berjaya dijana.','success',$auth_user['name']));
|
||||
// return redirect()->route('khazanah.customer_info')->with('aghinformation','Surat Akuan Gadaian Hilang berjaya dijana.|success');
|
||||
return view('print.suratgadaianhilang', compact('polis','gadai','customers','cawangan_detail','api_url'));
|
||||
|
||||
}else{
|
||||
return redirect()->route('khazanah.customer_info')->with('aghinformation','Mengalami Masalah dalam menjana.|error');
|
||||
|
||||
event(new NotifikasiAGH($auth_user['cawangan'],'Mengalami masalah dalam menjana.','error',$auth_user['name']));
|
||||
// return redirect()->route('khazanah.customer_info')->with('aghinformation','Mengalami masalah dalam menjana.|error');
|
||||
}
|
||||
|
||||
return response($daftarpolis);
|
||||
}
|
||||
|
||||
public function cetakSuratAkuanGadaianHilang(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$cawangan = Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
|
||||
|
||||
|
||||
return view('print.suratgadaianhilang', compact('polis','gadai','customers','cawangan_detail','api_url'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user