update
This commit is contained in:
@@ -14,8 +14,11 @@ use App\Models\UserHasCabang;
|
||||
class FormHelper
|
||||
{
|
||||
public static function getFormsByUserIds($userIds, $month, $year) {
|
||||
$startDate = date("$year-$month-" . env('STARTING_DATE'));
|
||||
$closingDateNextMonth = date("$year-$month-", strtotime("+1 month", strtotime("$year-$month-01"))) . env('CLOSING_DATE');
|
||||
$monthNumber = date('m', strtotime($month . ' 1'));
|
||||
$startDate = "$year-$monthNumber-" . env('STARTING_DATE');
|
||||
|
||||
$nextMonthTimestamp = strtotime("first day of next month", strtotime("$year-$monthNumber-01"));
|
||||
$closingDateNextMonth = date('Y-m-', $nextMonthTimestamp) . env('CLOSING_DATE');
|
||||
|
||||
$users = Admin::with(['region', 'cabang'])
|
||||
->whereIn('id', $userIds)
|
||||
@@ -98,8 +101,11 @@ class FormHelper
|
||||
}
|
||||
|
||||
public static function getAllForms($month, $year) {
|
||||
$startDate = date("$year-$month-" . env('STARTING_DATE'));
|
||||
$closingDateNextMonth = date("$year-$month-", strtotime("+1 month", strtotime("$year-$month-01"))) . env('CLOSING_DATE');
|
||||
$monthNumber = date('m', strtotime($month . ' 1'));
|
||||
$startDate = "$year-$monthNumber-" . env('STARTING_DATE');
|
||||
|
||||
$nextMonthTimestamp = strtotime("first day of next month", strtotime("$year-$monthNumber-01"));
|
||||
$closingDateNextMonth = date('Y-m-', $nextMonthTimestamp) . env('CLOSING_DATE');
|
||||
|
||||
$users = Admin::with(['region', 'cabang'])
|
||||
->get();
|
||||
|
||||
Reference in New Issue
Block a user