Merged in cherry-pick-batu-permata (pull request #140)
Feature batu permata
This commit is contained in:
@@ -25,6 +25,18 @@ class LelongController extends Controller
|
||||
$customerdetail = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/customers/'. $noic)->json();
|
||||
$nama = $customerdetail['nama'];
|
||||
|
||||
$marhuns = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/'. $norujukan)->json();
|
||||
|
||||
$batuPermataExist = false;
|
||||
|
||||
foreach($marhuns[0] as $marhun)
|
||||
{
|
||||
if($marhun['tag_permata'] == 1)
|
||||
{
|
||||
$batuPermataExist = true;
|
||||
}
|
||||
}
|
||||
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/lelong/cawangan/'. $auth_user['cawangan'] . '/' . $norujukan)->json();
|
||||
|
||||
if(sizeof($lelong) > 0)
|
||||
@@ -34,7 +46,7 @@ class LelongController extends Controller
|
||||
|
||||
$gadai = $gadaidetail[0];
|
||||
|
||||
return view('lelongan.index',compact('cawangan_info','api_url','gadai','nama','lelong'));
|
||||
return view('lelongan.index',compact('cawangan_info','api_url','gadai','nama','lelong', 'marhuns', 'batuPermataExist'));
|
||||
}
|
||||
|
||||
public function lelong(){
|
||||
@@ -65,7 +77,19 @@ class LelongController extends Controller
|
||||
if(sizeof($wakil) != 0)
|
||||
$wakil = $wakil[0];
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong','wakil'));
|
||||
$marhuns = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/marhun/'. $norujukan)->json();
|
||||
|
||||
$batuPermataExist = false;
|
||||
|
||||
foreach($marhuns[0] as $marhun)
|
||||
{
|
||||
if($marhun['tag_permata'] == 1)
|
||||
{
|
||||
$batuPermataExist = true;
|
||||
}
|
||||
}
|
||||
|
||||
return view('print.resit_tuntutbaki', compact('cawangan_detail','api_url','lelong','wakil', 'marhuns', 'batuPermataExist'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user