]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Поменял правило валидации origin/fix_fomichev_erp_133_change_crud_employee-payment
authorvladfo <fvv2011@gmail.com>
Tue, 17 Sep 2024 05:57:14 +0000 (08:57 +0300)
committervladfo <fvv2011@gmail.com>
Tue, 17 Sep 2024 05:57:14 +0000 (08:57 +0300)
erp24/records/EmployeePayment.php

index 23a38f42469a9a1e5fa95a5dab486adeda0b9559..b519b3cc7c7bc9c5158a0b7df4a544eb9157169c 100755 (executable)
@@ -39,13 +39,13 @@ class EmployeePayment extends \yii\db\ActiveRecord
             [['admin_id', 'monthly_salary', 'daily_payment'], 'required'],
             [['admin_id', 'admin_group_id', 'creator_id'], 'integer'],
             [['date'], 'date', 'format' => 'php:Y-m-d'],
-            [['monthly_salary', 'daily_payment'], 'number', 'min' => 0.01, 'tooSmall'=>'Значение {attribute} должно быть больше нуля.'],
+            [['monthly_salary', 'daily_payment'], 'compare', 'compareValue' => 0, 'operator' => '>', 'type' => 'number', 'message' => 'Значение {attribute} должно быть больше нуля.'],
             [['admin_group_id'], 'exist', 'skipOnError' => true, 'targetClass' => AdminGroup::class, 'targetAttribute' => ['admin_group_id' => 'id']],
             [['admin_id'], 'exist', 'skipOnError' => true, 'targetClass' => Admin::class, 'targetAttribute' => ['admin_id' => 'id']],
             [['creator_id'], 'exist', 'skipOnError' => true, 'targetClass' => Admin::class, 'targetAttribute' => ['creator_id' => 'id']],
             [['daily_payment'], 'validateDailyPayment'],
             [['date', 'admin_id'], 'validateUniqueDate'],
-//          ['date', 'validateDateForCreate', 'on' => 'create'],
+
         ];
     }