Przeglądaj źródła

Point de vente : bug sauvagarde sans accès restreint

master
keun 8 lat temu
rodzic
commit
76433d2938
1 zmienionych plików z 11 dodań i 7 usunięć
  1. +11
    -7
      common/models/PointVente.php

+ 11
- 7
common/models/PointVente.php Wyświetl plik

@@ -139,16 +139,20 @@ class PointVente extends \yii\db\ActiveRecord
{
PointVenteUser::deleteAll(['id_point_vente' => $this->id]) ;
foreach($this->users as $key => $val)
if(is_array($this->users) && count($this->users))
{
$user = User::findOne($val) ;
if($user)
foreach($this->users as $key => $val)
{
$point_vente_user = new PointVenteUser ;
$point_vente_user->id_user = $val ;
$point_vente_user->id_point_vente = $this->id ;
$point_vente_user->save() ;
$user = User::findOne($val) ;
if($user)
{
$point_vente_user = new PointVenteUser ;
$point_vente_user->id_user = $val ;
$point_vente_user->id_point_vente = $this->id ;
$point_vente_user->save() ;
}
}
}
}
}

Ładowanie…
Anuluj
Zapisz