]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
возвратил добавление задним числом - месяцы раннее текущего
authorJoySystem_v <fvv2011@gmail.com>
Tue, 27 Aug 2024 07:13:23 +0000 (10:13 +0300)
committerJoySystem_v <fvv2011@gmail.com>
Tue, 27 Aug 2024 07:13:23 +0000 (10:13 +0300)
erp24/controllers/crud/EmployeePaymentController.php
erp24/records/EmployeePayment.php

index e886b565f91d232af9782bee8fa169f3a0f2cd61..c234b29cce1a8e9e9c7bc64c91bc4f8a94e35dd3 100755 (executable)
@@ -95,7 +95,8 @@ class EmployeePaymentController extends Controller
      */
     public function actionCreate($admin_id = null)
     {
-        $model = new EmployeePayment(['scenario' => 'create']);
+       // $model = new EmployeePayment(['scenario' => 'create']);
+        $model = new EmployeePayment();
 
         // Если передан admin_id, устанавливаем его в модели
         if ($admin_id !== null) {
@@ -126,7 +127,7 @@ class EmployeePaymentController extends Controller
     public function actionUpdate($id)
     {
         $model = $this->findModel($id);
-        $model->scenario = 'update';
+      //  $model->scenario = 'update';
         $admin = Yii::$app->user->identity;
 
         // Проверка на group_id и дату записи
index cee4ede33873ce1d9e7a20b97e280fe9771695dd..23a38f42469a9a1e5fa95a5dab486adeda0b9559 100755 (executable)
@@ -45,7 +45,7 @@ class EmployeePayment extends \yii\db\ActiveRecord
             [['creator_id'], 'exist', 'skipOnError' => true, 'targetClass' => Admin::class, 'targetAttribute' => ['creator_id' => 'id']],
             [['daily_payment'], 'validateDailyPayment'],
             [['date', 'admin_id'], 'validateUniqueDate'],
-            ['date', 'validateDateForCreate', 'on' => 'create'],
+//          ['date', 'validateDateForCreate', 'on' => 'create'],
         ];
     }