Browse Source

[backend] Produits : jours de distribution préselectionnés

dev
Guillaume 3 years ago
parent
commit
6304683912
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      backend/controllers/ProductController.php

+ 8
- 1
backend/controllers/ProductController.php View File

public function actionCreate() public function actionCreate()
{ {
$model = new Product(); $model = new Product();

$model->active = 1; $model->active = 1;
$model->id_producer = GlobalParam::getCurrentProducerId(); $model->id_producer = GlobalParam::getCurrentProducerId();



$model->monday = 1 ;
$model->tuesday = 1 ;
$model->wednesday = 1 ;
$model->thursday = 1 ;
$model->friday = 1 ;
$model->saturday = 1 ;
$model->sunday = 1 ;


if ($model->load(Yii::$app->request->post()) && $model->save()) { if ($model->load(Yii::$app->request->post()) && $model->save()) {

Loading…
Cancel
Save