v.2.3
front fix
This commit is contained in:
@@ -22,11 +22,11 @@ class TopDishesNewYear extends HRCCommand implements HRCCommandInterface {
|
||||
if (!file_exists($dirname . $filename)) {
|
||||
$info = ExchangeItems::where('menu_code', '>', 0)
|
||||
->where('real_price', '>', 1)
|
||||
->where('created_at', '>=', '2021-10-01 00:00:00')
|
||||
->where('created_at', '>=', '2021-01-01 00:00:00')
|
||||
->where('created_at', '<', '2021-12-31 23:59:59')
|
||||
->get()
|
||||
->unique('menu_code');
|
||||
$count = ExchangeItems::where('menu_code', '>', 0)->where('created_at', '>=', '2021-10-01 00:00:00')->where('created_at', '<', '2021-12-31 23:59:59')->count();
|
||||
$count = ExchangeItems::where('menu_code', '>', 0)->where('created_at', '>=', '2021-01-01 00:00:00')->where('created_at', '<', '2021-12-31 23:59:59')->count();
|
||||
if ($count > 0) {
|
||||
foreach ($info as $key => $value) {
|
||||
$out[] = $value;
|
||||
@@ -38,12 +38,12 @@ class TopDishesNewYear extends HRCCommand implements HRCCommandInterface {
|
||||
->first();
|
||||
$onlineDishInfo = ExchangeItems::where('menu_code', '=', $item['menu_code'])
|
||||
->where('dishes_code', '=', $item['dishes_code'])
|
||||
->where('created_at', '>=', '2021-10-01 00:00:00')
|
||||
->where('created_at', '>=', '2021-01-01 00:00:00')
|
||||
->where('created_at', '<', '2021-12-31 23:59:59')
|
||||
->first();
|
||||
$dishName = $dishInfo['name'];
|
||||
$dishCount = ExchangeItems::where('menu_code', '=', $item['menu_code'])
|
||||
->where('created_at', '>=', '2021-10-01 00:00:00')
|
||||
->where('created_at', '>=', '2021-01-01 00:00:00')
|
||||
->where('created_at', '<', '2021-12-31 23:59:59')
|
||||
->sum('count');
|
||||
$dishSum = $onlineDishInfo['real_price'] * $dishCount;
|
||||
|
||||
Reference in New Issue
Block a user