$planDate = $date->format('Y-m-01');
$month = (int)$date->format('m');
$year = (int)$date->format('Y');
-
+ Autoplannogramma::deleteAll(['month' => $month , 'year' => $year]);
$service = new AutoPlannogrammaService();
$stores = CityStore::find()->where(['visible' => CityStore::IS_VISIBLE])->all();
$categories = Products1cNomenclature::find()->select('category')->distinct()->andWhere(['not in', 'category', ['', 'букет', 'сборка', 'сервис']])->column();
LogService::apiErrorLog(json_encode(["error_id" => 8, "error" => $scriptLauncherLog->getErrors()], JSON_UNESCAPED_UNICODE));
}
-
+ Autoplannogramma::deleteAll(['store_id' => (int)$task['storeId'], 'month' => (int)$task['month'], 'year' => (int)$task['year']]);
$service = new AutoPlannogrammaService();
$year = (int)$task['year'];
$month = (int)$task['month'];