Browse Source

Ajout de l'option credit_functioning dans les paramètres du producteur

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
4ff0fd0fa6
2 changed files with 9 additions and 1 deletions
  1. +6
    -0
      backend/views/producer/update.php
  2. +3
    -1
      common/models/Producer.php

+ 6
- 0
backend/views/producer/update.php View File

@@ -178,6 +178,12 @@ $this->addBreadcrumb($this->getTitle()) ;
'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
])
->hint("Une relance est envoyé au client dès que ce seuil est dépassé.") ; ?>
<?= $form->field($model, 'credit_functioning')
->dropDownList([
Producer::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle',
Producer::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
], []) ; ?>

<?= $form->field($model, 'online_payment')
->dropDownList([

+ 3
- 1
common/models/Producer.php View File

@@ -59,6 +59,7 @@ use yii\helpers\Html;
* @property string mentions
* @property string gcs
* @property boolean option_allow_user_gift
* @property string credit_functioning
*/
class Producer extends ActiveRecordCommon
{
@@ -94,7 +95,7 @@ class Producer extends ActiveRecordCommon
}],
[['description','mentions','gcs','order_infos','slug','secret_key_payplug'], 'string'],
[['negative_balance', 'credit', 'active','online_payment','user_manage_subscription', 'option_allow_user_gift'], 'boolean'],
[['name', 'siret', 'logo', 'photo', 'postcode', 'city', 'code','type'], 'string', 'max' => 255],
[['name', 'siret', 'logo', 'photo', 'postcode', 'city', 'code','type','credit_functioning'], 'string', 'max' => 255],
[['free_price', 'credit_limit_reminder'], 'double'],
['free_price', 'compare', 'compareValue' => 0, 'operator' => '>=', 'type' => 'number', 'message' => 'Prix libre doit être supérieur ou égal à 0'],
];
@@ -131,6 +132,7 @@ class Producer extends ActiveRecordCommon
'mentions' => 'Mentions légales',
'gcs' => 'Conditions générales de vente',
'option_allow_user_gift' => 'Autoriser les utilisateurs à effectuer un don à la plateforme lors de leur commande',
'credit_functioning' => 'Utilisation du Crédit par l\'utilisateur'
];
}


Loading…
Cancel
Save