change fix skit skit la
This commit is contained in:
@@ -354,6 +354,7 @@ class GadaianController extends Controller
|
||||
public function resitbelumansurans($id)
|
||||
{
|
||||
|
||||
$auth_user = Auth::user();
|
||||
// $totaltransaction = 0;
|
||||
|
||||
// if(sizeof($transaction) != 0)
|
||||
@@ -369,7 +370,18 @@ class GadaianController extends Controller
|
||||
if(sizeof($customers_info) != 0)
|
||||
$customers_info = $customers_info[0];
|
||||
|
||||
return view('print.resitansuransebelum',compact('gadai','customers_info'));
|
||||
$penebusan = Http::get(config('api.url') . '/api/listpenebusanhistory/' . $auth_user['cawangan'],[ "norujukan" => $id])->json();
|
||||
|
||||
if(sizeof($penebusan) != 0)
|
||||
$penebusan = $penebusan[0];
|
||||
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
|
||||
// dd($wakil);
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resitansuransebelum',compact('gadai','customers_info','wakil','penebusan'));
|
||||
}
|
||||
|
||||
public function resittebus($id)
|
||||
@@ -451,6 +463,45 @@ class GadaianController extends Controller
|
||||
return view('print.resittebussebelum',compact('gadai','customers_info','penebusan','wakil'));
|
||||
}
|
||||
|
||||
public function resittambahpinjam($id)
|
||||
{
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$gadai = Http::get(config('api.url') . '/api/gadai/norujukan/'. $id)->json();
|
||||
|
||||
|
||||
if(sizeof($gadai) != 0)
|
||||
$gadai = $gadai[0][0];
|
||||
|
||||
$customers_info = Http::get(config('api.url') . '/api/customers/'. $gadai['nokp'])->json();
|
||||
|
||||
if(sizeof($customers_info) != 0)
|
||||
$customers_info = $customers_info[0];
|
||||
|
||||
|
||||
$penebusan = Http::get(config('api.url') . '/api/listpenebusanhistory/' . $auth_user['cawangan'] ,[ "norujukan" => $id])->json();
|
||||
|
||||
if(sizeof($penebusan) != 0)
|
||||
$penebusan = $penebusan[0];
|
||||
|
||||
// dd($penebusan['nowakil']);
|
||||
|
||||
if($penebusan['nowakil'] != 0)
|
||||
{
|
||||
$wakil = Http::get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $penebusan['nowakil'])->json();
|
||||
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$wakil = [];
|
||||
}
|
||||
|
||||
return view('print.resittambahpinjam',compact('gadai','customers_info','penebusan','wakil'));
|
||||
}
|
||||
|
||||
public function history(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
|
||||
Reference in New Issue
Block a user