This commit is contained in:
2026-06-14 21:42:21 +03:30
parent b84b2df01a
commit 0c4cbd7c12
9 changed files with 80 additions and 23 deletions
+2 -16
View File
@@ -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();
}