fix bug
This commit is contained in:
@@ -206,22 +206,8 @@ class ReportController extends Controller
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
if ($toBool($config->Config('close_price'))) {
|
||||
$startDay = $config->Config('startDay') ?: '00:00';
|
||||
[$startHour, $startMinute] = explode(':', $startDay);
|
||||
|
||||
$endDay = $config->Config('endDay') ?: '23:59';
|
||||
[$endHour, $endMinute] = explode(':', $endDay);
|
||||
|
||||
$current = Carbon::now();
|
||||
$start = Carbon::today()->setTime((int) $startHour, (int) $startMinute);
|
||||
$end = Carbon::today()->setTime((int) $endHour, (int) $endMinute);
|
||||
|
||||
if (!$current->between($start, $end)) {
|
||||
// عمومی: در Cnt بماند
|
||||
Cnt::where('key', 'app_closed')->update(['value' => 'true']);
|
||||
|
||||
// مربوط به منتزر: settings
|
||||
$config->UpdateConfig('montzar_closed', 'true');
|
||||
if ($config->isOutsideTradingHours()) {
|
||||
$config->syncAppClosedFlag();
|
||||
|
||||
return $zeroResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user