]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
добавил проверку больше нуля
authorJoySystem_v <fvv2011@gmail.com>
Mon, 26 Aug 2024 09:07:58 +0000 (12:07 +0300)
committerJoySystem_v <fvv2011@gmail.com>
Mon, 26 Aug 2024 09:07:58 +0000 (12:07 +0300)
erp24/records/EmployeePayment.php

index 106af43968fb8334ef2f8f3ca551d35ee9415992..efdb189a79e4a191446d6d501514b7e3c6410333 100755 (executable)
@@ -39,7 +39,7 @@ 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'],
+            [['monthly_salary', 'daily_payment'], 'number', 'min' => 0.01, 'tooSmall'=>'Значение {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']],