Small fix
This commit is contained in:
miroman-afk
2023-08-10 11:01:48 +03:00
parent c4dc6e02a0
commit ed61e9627d
11 changed files with 468 additions and 13 deletions

View File

@@ -2099,7 +2099,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
}
}
if ($reportType == "report_construct") {
if ($reportType == 'report_construct') {
$code = Filesystem::GetCode($input['token']);
$cache = Cache::get($code, 'shift', $input);
if ($cache) {
@@ -2413,6 +2413,30 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
return $cache;
}
}
if ($reportType == 'presales') {
$code = Filesystem::GetCode($input['token']);
$cache = Cache::get($code, 'shift', $input);
if ($cache) {
return $cache;
}
if (isset($input['shift_id'])) {
}
if (isset($input['start_date']) && isset($input['end_date'])) {
$end_date = date('Y-m-d H:i:s', strtotime($input['end_date'] . ' 23:59:59'));
$start_date = date('Y-m-d H:i:s', strtotime($input['start_date'] . ' 00:00:01'));
$shifts = ExchangeShifts::select('id', 'opened', 'closed')
->where('opened', '>', $start_date)
->where('closed', '<', $end_date)
->get();
$collection = new Collection();
foreach ($shifts as $shift) {
}
}
}
} else {
return [
'status' => 'success',