From: Alexander Smirnov Date: Wed, 26 Feb 2025 14:57:21 +0000 (+0300) Subject: [ERP-305] bug 2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=2f0a6f6eaafad38815a76886fcf8786ab1f7db13;p=erp24_rep%2Fyii-erp24%2F.git [ERP-305] bug 2 --- diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index 85a148fb..3658d954 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -42,7 +42,7 @@ class CategoryPlanController extends Controller { $model->load(Yii::$app->request->get()); $isEditable = date($model->year . '-' . $model->month . '-d') > date('Y-m-d') && ( - (date('d') < 25) || (date('Y-m-d', strtotime('-1 month', date($model->year . '-' . $model->month . '-d'))) > date('Y-m-d'))); + (date('d') < 25) || (date('Y-m-d', strtotime('-1 month', strtotime(date($model->year . '-' . $model->month . '-d')))) > date('Y-m-d'))); $categoryPlan = CategoryPlan::find()->where(['year' => $model->year, 'month' => $model->month, 'store_id' => $model->store_id])->indexBy('category')->asArray()->all();