From: JoySystem_v Date: Mon, 26 Aug 2024 09:07:58 +0000 (+0300) Subject: добавил проверку больше нуля X-Git-Tag: 1.5~20^2~13 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=95aa9a3377ceef1306d27fabc6601a9c2c46b696;p=erp24_rep%2Fyii-erp24%2F.git добавил проверку больше нуля --- diff --git a/erp24/records/EmployeePayment.php b/erp24/records/EmployeePayment.php index 106af439..efdb189a 100755 --- a/erp24/records/EmployeePayment.php +++ b/erp24/records/EmployeePayment.php @@ -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']],