@@ -226,16 +226,21 @@ class CommandeAuto extends \yii\db\ActiveRecord | |||
$commande->init() ; | |||
$user_action = User::findBy([ | |||
$user_action = User::find()->where([ | |||
'id_etablissement' => $production->id_etablissement, | |||
'status' => 11 | |||
]) ; | |||
])->one() ; | |||
if($user_action) | |||
$id_user_action = $user_action->id; | |||
else | |||
$id_user_action = NULL ; | |||
$commande->creditHistorique( | |||
CreditHistorique::TYPE_PAIEMENT, | |||
$commande->getMontant(), | |||
$production->id_etablissement, | |||
$user_action->id | |||
$id_user_action | |||
) ; | |||
} | |||