ソースを参照

Point de vente : bug sauvagarde sans accès restreint

prodstable
keun 8年前
コミット
76433d2938
1個のファイルの変更11行の追加7行の削除
  1. +11
    -7
      common/models/PointVente.php

+ 11
- 7
common/models/PointVente.php ファイルの表示

@@ -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() ;
}
}
}
}
}

読み込み中…
キャンセル
保存