fix barcodue uniqe on admin , ticket use status=active , when checking
This commit is contained in:
@@ -48,12 +48,14 @@ class Product extends \common\models\BaseFitnessActiveRecord {
|
||||
[['product_number', 'barcode'], 'string', 'max' => 20],
|
||||
[['name'], 'string', 'max' => 128],
|
||||
[['description'], 'string', 'max' => 255],
|
||||
[['product_number'], 'unique' ],
|
||||
[['barcode'], 'unique' ],
|
||||
// [['product_number'], 'unique' ],
|
||||
// [['barcode'], 'unique' ],
|
||||
// a1 and a2 need to be unique together, only a1 will receive error message
|
||||
// ['a1', 'unique', 'targetAttribute' => ['a1', 'a2']]
|
||||
[['barcode','product_number'], 'filter', 'filter' => function($value){return Helper::fixAsciiChars($value);}],
|
||||
['barcode', 'unique', 'targetAttribute' => ['id_account', 'barcode']],
|
||||
['product_number', 'unique', 'targetAttribute' => ['id_account', 'product_number']],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user