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();
|
||||
|
||||
@@ -173,18 +173,39 @@ class KhazanahController extends Controller
|
||||
$serahan=$getTunai2['kurang'];
|
||||
$totalmasuk = 0;
|
||||
$bakiakhir = 0;
|
||||
$totalkeluar = 0;
|
||||
|
||||
$totalmasuk = $tebus_detail['bakipjm'] + $masuk;
|
||||
if($tebus_detail['jenistebus'] == 'P')
|
||||
{
|
||||
$totalkeluar = $tebus_detail['addpinjaman'] + $keluar;
|
||||
|
||||
// dd($tebus_detail['addpinjaman'],$keluar,$totalkeluar);
|
||||
$bakiakhir = $bakiawal-$totalkeluar+$masuk+$pendahuluan-$serahan;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$totalkeluar,
|
||||
'masuk'=>$masuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
|
||||
}else{
|
||||
|
||||
$totalmasuk = $tebus_detail['bakipjm'] + $masuk;
|
||||
$bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
|
||||
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$totalmasuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
}
|
||||
|
||||
$bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
|
||||
// $bakiakhir = $bakiawal-$keluar+$totalmasuk+$pendahuluan-$serahan;
|
||||
|
||||
//masuk dalam tunai aliran
|
||||
$updateTunai=Http::put( config('api.url').'/api/updateTunaiGT/'.$auth_user['cawangan'], [
|
||||
'kodlaluan' => $tebus_detail['teller'],
|
||||
'keluar'=>$keluar,
|
||||
'masuk'=>$totalmasuk,
|
||||
'bakiakhir'=>$bakiakhir
|
||||
]);
|
||||
|
||||
|
||||
return $this->tebus();
|
||||
}
|
||||
@@ -472,13 +493,7 @@ class KhazanahController extends Controller
|
||||
])->json();
|
||||
|
||||
$updateVault=Http::put( config('api.url').'/api/UpdateVault/'.$auth_user['cawangan'],[
|
||||
|
||||
'masuk'=>$masukV,
|
||||
'keluar'=>$keluarV,
|
||||
'bakiawal'=>$bakiAwalV,
|
||||
'bakiakhir'=>$bakiAkhirV,
|
||||
'bakieod'=>$bakiEOD
|
||||
|
||||
'totpanjar'=>$request->bayaran
|
||||
]);
|
||||
|
||||
return response($panjar);
|
||||
@@ -583,9 +598,13 @@ class KhazanahController extends Controller
|
||||
public function denominasicalculationpendahuluan($request)
|
||||
{
|
||||
|
||||
dd(request()->all());
|
||||
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$denominasilist = Http::get( config('api.url') .'/api/DenominasiController/'. $auth_user['cawangan'])->json();
|
||||
|
||||
dd($denominasilist);
|
||||
|
||||
//bundle initialize
|
||||
$rekodb1 = $denominasilist[0]['bd1']; $rekodb5 = $denominasilist[0]['bd5']; $rekodb10 = $denominasilist[0]['bd10']; $rekodb20 = $denominasilist[0]['bd20'];
|
||||
|
||||
Reference in New Issue
Block a user