Browse Source

Ajout de l'option credit_functioning dans la gestion des points de vente

dev
Guillaume Bourgeois 5 years ago
parent
commit
6b25c3b6df
3 changed files with 14 additions and 1 deletions
  1. +7
    -0
      backend/views/point-sale/_form.php
  2. +2
    -1
      common/models/PointSale.php
  3. +5
    -0
      common/models/Producer.php

+ 7
- 0
backend/views/point-sale/_form.php View File

.$addHintCredit); .$addHintCredit);
?> ?>
<?= $form->field($model, 'credit_functioning')
->dropDownList([
'' => 'Paramètres globaux ('.Producer::$creditFunctioningArray[Producer::getConfig('credit_functioning')].')',
Producer::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle',
Producer::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
], []) ; ?>


<div id="delivery-days"> <div id="delivery-days">
<h2>Jours de livraison</h2> <h2>Jours de livraison</h2>

+ 2
- 1
common/models/PointSale.php View File

[['name', 'code'], 'string', 'max' => 255], [['name', 'code'], 'string', 'max' => 255],
[['address', 'locality', 'infos_monday', 'infos_tuesday', [['address', 'locality', 'infos_monday', 'infos_tuesday',
'infos_wednesday', 'infos_thursday', 'infos_friday', 'infos_wednesday', 'infos_thursday', 'infos_friday',
'infos_saturday', 'infos_sunday'], 'string'],
'infos_saturday', 'infos_sunday','credit_functioning'], 'string'],
[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday', [['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday', 'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saturday', 'delivery_sunday'], 'boolean'], 'delivery_saturday', 'delivery_sunday'], 'boolean'],
'delivery_saturday' => 'Samedi', 'delivery_saturday' => 'Samedi',
'delivery_sunday' => 'Dimanche', 'delivery_sunday' => 'Dimanche',
'code' => 'Code', 'code' => 'Code',
'credit_functioning' => 'Utilisation du Crédit par l\'utilisateur'
]; ];
} }



+ 5
- 0
common/models/Producer.php View File

const CREDIT_FUNCTIONING_MANDATORY = 'mandatory' ; const CREDIT_FUNCTIONING_MANDATORY = 'mandatory' ;
const CREDIT_FUNCTIONING_OPTIONAL = 'optional' ; const CREDIT_FUNCTIONING_OPTIONAL = 'optional' ;
public static $creditFunctioningArray = [
self::CREDIT_FUNCTIONING_MANDATORY => 'Obligatoire',
self::CREDIT_FUNCTIONING_OPTIONAL => 'Optionnelle',
];
var $secret_key_payplug ; var $secret_key_payplug ;
/** /**

Loading…
Cancel
Save