Browse Source

Merge branch 'dev'

master
keun 6 years ago
parent
commit
ea3c99408e
2 changed files with 4 additions and 3 deletions
  1. +3
    -1
      backend/controllers/CommandeController.php
  2. +1
    -2
      backend/controllers/PointVenteController.php

+ 3
- 1
backend/controllers/CommandeController.php View File

$key = $ppv->id_production . '-' . $ppv->id_point_vente; $key = $ppv->id_production . '-' . $ppv->id_point_vente;
if ($ppv->livraison == 1) if ($ppv->livraison == 1)
$production_point_vente->productions_point_vente[] = $key; $production_point_vente->productions_point_vente[] = $key;
$arr_productions_point_vente[$key] = Html::encode($ppv->pointVente->nom);
if(isset($ppv->pointVente) && strlen($ppv->pointVente->nom)) {
$arr_productions_point_vente[$key] = Html::encode($ppv->pointVente->nom);
}
} }


$datas = [ $datas = [

+ 1
- 2
backend/controllers/PointVenteController.php View File

$users = User::findBy() $users = User::findBy()
->orderBy('nom ASC') ->orderBy('nom ASC')
->all(); ->all();

return [ return [
'users' => $users 'users' => $users
]; ];
public function actionDelete($id) { public function actionDelete($id) {
$this->findModel($id)->delete(); $this->findModel($id)->delete();
PointVenteUser::deleteAll(['id_point_vente' => $id]); PointVenteUser::deleteAll(['id_point_vente' => $id]);
ProductionPointVente::deleteAll(['id_point_vente' => $id]) ;
return $this->redirect(['index']); return $this->redirect(['index']);
} }



Loading…
Cancel
Save