|
|
|
|
|
|
|
|
public $code; |
|
|
public $code; |
|
|
public $type; |
|
|
public $type; |
|
|
public $free_price ; |
|
|
public $free_price ; |
|
|
|
|
|
public $id_tax_rate_default ; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @inheritdoc |
|
|
* @inheritdoc |
|
|
|
|
|
|
|
|
['email', 'required', 'message' => 'Champs obligatoire'], |
|
|
['email', 'required', 'message' => 'Champs obligatoire'], |
|
|
['email', 'email'], |
|
|
['email', 'email'], |
|
|
['email', 'unique', 'targetClass' => '\common\models\User', 'message' => 'Cet email est déjà utilisé'], |
|
|
['email', 'unique', 'targetClass' => '\common\models\User', 'message' => 'Cet email est déjà utilisé'], |
|
|
[['name', 'lastname', 'phone'], 'required', 'message' => 'Champs obligatoire'], |
|
|
|
|
|
|
|
|
[['name', 'lastname', 'phone','id_tax_rate_default'], 'required', 'message' => 'Champs obligatoire'], |
|
|
[['name', 'lastname', 'phone', 'option_user_producer'], 'string', 'min' => 2, 'max' => 255], |
|
|
[['name', 'lastname', 'phone', 'option_user_producer'], 'string', 'min' => 2, 'max' => 255], |
|
|
['password', 'required', 'message' => 'Champs obligatoire'], |
|
|
['password', 'required', 'message' => 'Champs obligatoire'], |
|
|
['password', 'string', 'min' => 6, 'tooShort' => 'Votre mot de passe doit contenir au moins 6 caractères'], |
|
|
['password', 'string', 'min' => 6, 'tooShort' => 'Votre mot de passe doit contenir au moins 6 caractères'], |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}], |
|
|
}], |
|
|
['free_price', 'number'], |
|
|
['free_price', 'number'], |
|
|
|
|
|
['id_tax_rate_default', 'exist', |
|
|
|
|
|
'targetClass' => TaxRate::className(), |
|
|
|
|
|
'targetAttribute' => ['id_tax_rate_default' => 'id']] |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'city' => 'Commune', |
|
|
'city' => 'Commune', |
|
|
'id_producer' => 'Producteur', |
|
|
'id_producer' => 'Producteur', |
|
|
'type' => 'Type de producteur', |
|
|
'type' => 'Type de producteur', |
|
|
'free_price' => 'Prix libre' |
|
|
|
|
|
|
|
|
'free_price' => 'Prix libre', |
|
|
|
|
|
'id_tax_rate_default' => 'TVA par défaut', |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$producer->order_deadline = 20; |
|
|
$producer->order_deadline = 20; |
|
|
$producer->order_delay = 1; |
|
|
$producer->order_delay = 1; |
|
|
$producer->free_price = (float) abs($this->free_price); |
|
|
$producer->free_price = (float) abs($this->free_price); |
|
|
|
|
|
$producer->id_tax_rate_default = $this->id_tax_rate_default ; |
|
|
|
|
|
|
|
|
$cptSlug = 0 ; |
|
|
$cptSlug = 0 ; |
|
|
do { |
|
|
do { |