refactor create, handle ticket #125
|
|
@ -614,7 +614,7 @@ class TicketController extends Controller
|
||||||
})
|
})
|
||||||
->where('n_user_id', $user->id)
|
->where('n_user_id', $user->id)
|
||||||
->where('n_year', $year)
|
->where('n_year', $year)
|
||||||
->where('n_month', "<=", $month)
|
// ->where('n_month', "<=", $month)
|
||||||
->where('n_reason', 'ONLEAVE')
|
->where('n_reason', 'ONLEAVE')
|
||||||
->sum('categories.c_value');
|
->sum('categories.c_value');
|
||||||
}
|
}
|
||||||
|
|
@ -634,11 +634,11 @@ class TicketController extends Controller
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Nếu là duyệt ticket thì sẽ cộng thêm số ngày phép còn lại của tháng hiện tại
|
// Nếu là duyệt ticket thì sẽ cộng thêm số ngày phép còn lại của tháng hiện tại
|
||||||
if ($isAccept) {
|
// if ($isAccept) {
|
||||||
if ($month >= $totalAllocated) {
|
if ($month >= $totalAllocated) {
|
||||||
$totalAllocated += $month - $totalAllocated;
|
$totalAllocated += $month - $totalAllocated;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
// bên hàm duyệt ticket sẽ check lại để + 1 ngày trước job để đảm bảo đủ ngày phép
|
// bên hàm duyệt ticket sẽ check lại để + 1 ngày trước job để đảm bảo đủ ngày phép
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue