Merge branch 'master' of https://gitlab.com/online-sistem1/api_arrahn into adminapi
This commit is contained in:
@@ -1670,6 +1670,18 @@ class AdminPageController extends Controller
|
||||
return response()->json($detailslelong, 200);
|
||||
}
|
||||
|
||||
public function UpdateNotisLelong2($kodcaw,Request $request){
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$detailslelong = Pelelong::on($cawangan['mysql'])->
|
||||
update(array(
|
||||
'para3'=>$request->content
|
||||
));
|
||||
|
||||
return response()->json($detailslelong, 200);
|
||||
}
|
||||
|
||||
public function paginate($items, $perPage = 5, $page = null, $options = [])
|
||||
{
|
||||
$page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
|
||||
|
||||
@@ -321,7 +321,12 @@ class GadaiController extends Controller
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
$bilang_bln = $gadai_data['tempoh'] - $gadai_data['tempohbayar'];
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
$bilang_bln = $tempoh - $gadai_data['tempohbayar'];
|
||||
|
||||
$upahsemasa_raw = $bilang_bln * (($gadai_data['kadarupah']/100 )* $gadai_data['pinjaman']);
|
||||
|
||||
@@ -343,7 +348,12 @@ class GadaiController extends Controller
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
$bilang_bln = $gadai_data['tempoh'] - $gadai_data['tempohbayar'];
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
$bilang_bln = $tempoh - $gadai_data['tempohbayar'];
|
||||
|
||||
$upahrebet_raw = $bilang_bln * (($gadai_data['kadarupah']/100 )* $gadai_data['bakipjm']);
|
||||
|
||||
@@ -3252,7 +3262,6 @@ class GadaiController extends Controller
|
||||
}else{
|
||||
$cawangan = Cawangan::on('mysql7')->where('zone',$request->zone)->get();
|
||||
}
|
||||
$current = Carbon::now();
|
||||
|
||||
foreach($cawangan as $cawangan_mysql){
|
||||
$all_gadai = Gadai::on($cawangan_mysql['mysql'])->whereNotIn('sttebus',['L','T'])->get();
|
||||
@@ -3263,39 +3272,39 @@ class GadaiController extends Controller
|
||||
$tarikh_update = Carbon::parse($gadai['t_update'].' 00:00:00' );
|
||||
}
|
||||
$tarikh_gadai = Carbon::parse($gadai['t_gadai']. ' 00:00:00');
|
||||
$current = Carbon::now();
|
||||
|
||||
$diff_carbon = $tarikh_gadai->diffInDays($current);
|
||||
$tahun_gadai = $tarikh_gadai->year;
|
||||
$bulan_gadai = $tarikh_gadai->month;
|
||||
$hari_gadai = $tarikh_gadai->day;
|
||||
|
||||
$year = floor($diff_carbon/356);
|
||||
$day_year_minus = $year * 356;
|
||||
$diff_carbon = $diff_carbon - $day_year_minus;
|
||||
$tahun_semasa = $current->year;
|
||||
$bulan_semasa = $current->month;
|
||||
$hari_semasa = $current->day;
|
||||
|
||||
$month = floor($diff_carbon/30);
|
||||
$day_month_minus = $month * 30;
|
||||
$diff_carbon = $diff_carbon - $day_month_minus;
|
||||
if($hari_semasa >= $hari_gadai){
|
||||
$beza_hari = $hari_semasa - $hari_gadai + 1;
|
||||
}else if($hari_semasa < $hari_gadai){
|
||||
$bulan_semasa = $bulan_semasa - 1;
|
||||
$beza_hari = ($hari_semasa + 30) - $hari_gadai + 1;
|
||||
}
|
||||
|
||||
$extensivemonth_gadai = 0;
|
||||
if($diff_carbon >= 1 && $diff_carbon <= 15){
|
||||
$extensivemonth_gadai = 0.5;
|
||||
}
|
||||
else if($diff_carbon >= 16){
|
||||
$extensivemonth_gadai = 1;
|
||||
}
|
||||
$tempoh_gadai = ($year*12) + $month + $extensivemonth_gadai;
|
||||
|
||||
if($gadai['t_gadai'] == $current->toDateString()){
|
||||
$tempoh_gadai = 0.5;
|
||||
}
|
||||
if($tempoh_gadai >= 6.0){
|
||||
if($gadai['t_matang'] >= $current->toDateString()){
|
||||
$tempoh_gadai = 6.0;
|
||||
}
|
||||
}else if($tempoh_gadai >= 12){
|
||||
if($gadai['t_matang1'] >= $current->toDateString()){
|
||||
$tempoh_gadai = 12.0;
|
||||
}
|
||||
if($beza_hari >= 1 && $beza_hari <= 15){
|
||||
$extensivemonth_gadai = 0.5;
|
||||
}else if($beza_hari >= 16){
|
||||
$extensivemonth_gadai = 1;
|
||||
}else{
|
||||
$extensivemonth_gadai = 0;
|
||||
}
|
||||
|
||||
$beza_tahun = $tahun_semasa - $tahun_gadai;
|
||||
|
||||
$beza_bulan = ($bulan_semasa + ($beza_tahun * 12)) - $bulan_gadai;
|
||||
|
||||
$tempoh_gadai = $beza_bulan + $extensivemonth_gadai;
|
||||
|
||||
$upah_semasa = $this->kiraupahTawarruqStokAudit($tempoh_gadai,$gadai['tempohbayar'],$gadai['kadarupah'],$gadai['bakipjm']);
|
||||
|
||||
Gadai::on($cawangan_mysql['mysql'])->where('norujukan','=',$gadai['norujukan'])->update(array(
|
||||
|
||||
@@ -663,7 +663,7 @@ class LelongController extends Controller
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->selectRaw('count(*) as total, batchno,t_lelong')
|
||||
->where('t_lelong','>=',$current->toDateString())
|
||||
->where('fasa', 1)
|
||||
->where('fasa', 2)
|
||||
->whereNull('t_jual')
|
||||
->orderBy('t_lelong','desc')
|
||||
->groupBy('batchno')
|
||||
@@ -691,6 +691,7 @@ class LelongController extends Controller
|
||||
->where('batchno','=',$request->batchno)
|
||||
->where('fasa',0)
|
||||
->orderBy('gadai.t_gadai','asc')
|
||||
->orderBy('gadai.sirig','asc')
|
||||
->where('gadai.taglel','=', 1);
|
||||
}else{
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
@@ -700,6 +701,7 @@ class LelongController extends Controller
|
||||
->where('batchno','=',$request->batchno)
|
||||
->where('fasa',1)
|
||||
->orderBy('gadai.t_gadai','asc')
|
||||
->orderBy('gadai.sirig','asc')
|
||||
->where('gadai.taglel','=', 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,12 @@ class TebusController extends Controller
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
$bilang_bln = $gadai_data['tempoh'] - $gadai_data['tempohbayar'];
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
$bilang_bln = $tempoh - $gadai_data['tempohbayar'];
|
||||
|
||||
$upahsemasa_raw = $bilang_bln * (($gadai_data['kadarupah']/100 )* $gadai_data['pinjaman']);
|
||||
|
||||
@@ -106,7 +111,13 @@ class TebusController extends Controller
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
$bilang_bln = $gadai_data['tempoh'] - $gadai_data['tempohbayar'];
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
|
||||
$bilang_bln = $tempoh - $gadai_data['tempohbayar'];
|
||||
|
||||
$upahrebet_raw = $bilang_bln * (($gadai_data['kadarupah']/100 )* $gadai_data['bakipjm']);
|
||||
|
||||
@@ -131,6 +142,12 @@ class TebusController extends Controller
|
||||
->where('norujukan','=',$norujukan)
|
||||
->first();
|
||||
|
||||
if($gadai_data['tempoh'] >= 12.0){
|
||||
$tempoh = 12;
|
||||
}else{
|
||||
$tempoh = $gadai_data['tempoh'];
|
||||
}
|
||||
|
||||
$bilang_bln = $gadai_data['tempoh'] - $gadai_data['tempohbayar'];
|
||||
|
||||
$upahrebet_raw = $bilang_bln * (($gadai_data['kadarupah']/100 )* $gadai_data['bakipjm']);
|
||||
@@ -658,7 +675,7 @@ class TebusController extends Controller
|
||||
->orderBy('tebus.sirit')
|
||||
->get();
|
||||
|
||||
$tebus = [];
|
||||
$tebus = [];
|
||||
if($tebus_data){
|
||||
foreach($tebus_data as $index=>$tebusData){
|
||||
$customer_info = Customer::on('mysql7')->where('kplama','=',$tebusData['nokp'])->orWhere('kpbaru','=',$tebusData['nokp'])->first();
|
||||
|
||||
@@ -677,6 +677,7 @@ $router->group(['prefix'=>'admin'], function () use ($router){
|
||||
$router->post('DeleteBlacklist',['uses'=>'AdminPageController@DeleteBlackList']);
|
||||
$router->post('AddSenaraiHitam',['uses'=>'AdminPageController@AddSenaraiHitam']);
|
||||
$router->put('notislelong/update/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong']);
|
||||
$router->put('notislelong/update2/{kodcaw}',['uses'=>'AdminPageController@UpdateNotisLelong2']);
|
||||
|
||||
$router->get('ListOperasi/Paginate',['uses'=>'AdminPageController@listoperasi']);
|
||||
$router->get('ListOperasiKelulusan/Paginate',['uses'=>'AdminPageController@listoperasikelulusan']);
|
||||
|
||||
Reference in New Issue
Block a user