Skip to content
Snippets Groups Projects
Commit a5cf0542 authored by gazandi's avatar gazandi
Browse files

debug jumlah tps tambah terus

parent b2b68ca6
No related merge requests found
Pipeline #1741 skipped
......@@ -144,17 +144,19 @@ class ScheduleController extends Controller
}
else if ($this->has_role('edit_schedule'))
{
$sched->is_done = Input::get('is_done');
$sched->save();
$tps = Tps::find($sched->id_tps);
$tps->capacity_now += $sched->amount;
if ($tps->capacity_now >= $tps->capacity_full)
{
$this->notify('TPS '.$tps->nama.' penuh');
$tps->capacity_now = $tps->capacity_full;
$tps->is_full = 1;
}
$tps->save();
if($sched->is_done!=Input::get('is_done')){
$sched->is_done = Input::get('is_done');
$sched->save();
$tps = Tps::find($sched->id_tps);
$tps->capacity_now += $sched->amount;
if ($tps->capacity_now >= $tps->capacity_full)
{
$this->notify('TPS '.$tps->nama.' penuh');
$tps->capacity_now = $tps->capacity_full;
$tps->is_full = 1;
}
$tps->save();
}
return redirect('/schedule');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment