updated api server 11/11/2022
This commit is contained in:
@@ -558,12 +558,27 @@ class LelongController extends Controller
|
||||
|
||||
$lelong = Lelong::on($cawangan['mysql'])
|
||||
->where('norujukan', '=', $request->norujukan)
|
||||
->where('t_lelong', '<=', $current->toDateString())
|
||||
//->where('t_lelong', '<=', $current->toDateString())
|
||||
->first();
|
||||
|
||||
if($lelong)
|
||||
{
|
||||
return response(1);
|
||||
$date_lelong = new Carbon($lelong['t_lelong']);
|
||||
|
||||
if($lelong['t_lelong'] >= $current->toDateString())
|
||||
{
|
||||
$diff = $date_lelong->diffInDays($current);
|
||||
}else{
|
||||
$diff = $date_lelong->diffInDays($current);
|
||||
$diff = -$diff;
|
||||
}
|
||||
|
||||
if($diff <= 0)
|
||||
{
|
||||
return response(1);
|
||||
}else{
|
||||
return response(0);
|
||||
}
|
||||
}else{
|
||||
return response(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user