Исправлен пересчет весовых товаров в онлайн реализации
This commit is contained in:
miroman-afk
2023-08-15 10:54:39 +03:00
parent 468cb21e40
commit a7c1679d12
6 changed files with 76 additions and 34 deletions

View File

@@ -2416,13 +2416,22 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
if ($reportType == 'presales') {
$code = Filesystem::GetCode($input['token']);
$cache = Cache::get($code, 'shift', $input);
if (isset($input['shift_id'])) {
$plugin = 'shift';
}
if (isset($input['start_date']) && isset($input['end_date'])) {
$plugin = 'report';
}
$cache = Cache::get($code, $plugin, $input);
if ($cache) {
return $cache;
}
if (isset($input['shift_id'])) {
if (isset($input['shift_id'])) {
$collection = new Collection();
}
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'));
@@ -2436,6 +2445,14 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
}
}
$return = array(
'status' => 'success',
'data' => $collection
);
if (!$cache) {
$cache = Cache::store(strval($code), $plugin, $input, $return);
}
return $cache;
}
} else {
return [