v.2.34
Исправлен пересчет весовых товаров в онлайн реализации
This commit is contained in:
@@ -92,7 +92,6 @@ class GETDashboard extends HRCCommand implements HRCCommandInterface
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($order_items as $order_item) {
|
||||
$profit += $order_item['profit'];
|
||||
}
|
||||
|
||||
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user