|
|
|
|
|
|
|
|
|
|
|
|
|
|
$commande->init() ; |
|
|
$commande->init() ; |
|
|
|
|
|
|
|
|
$user_action = User::findBy([ |
|
|
|
|
|
|
|
|
$user_action = User::find()->where([ |
|
|
'id_etablissement' => $production->id_etablissement, |
|
|
'id_etablissement' => $production->id_etablissement, |
|
|
'status' => 11 |
|
|
'status' => 11 |
|
|
]) ; |
|
|
|
|
|
|
|
|
])->one() ; |
|
|
|
|
|
|
|
|
|
|
|
if($user_action) |
|
|
|
|
|
$id_user_action = $user_action->id; |
|
|
|
|
|
else |
|
|
|
|
|
$id_user_action = NULL ; |
|
|
|
|
|
|
|
|
$commande->creditHistorique( |
|
|
$commande->creditHistorique( |
|
|
CreditHistorique::TYPE_PAIEMENT, |
|
|
CreditHistorique::TYPE_PAIEMENT, |
|
|
$commande->getMontant(), |
|
|
$commande->getMontant(), |
|
|
$production->id_etablissement, |
|
|
$production->id_etablissement, |
|
|
$user_action->id |
|
|
|
|
|
|
|
|
$id_user_action |
|
|
) ; |
|
|
) ; |
|
|
} |
|
|
} |
|
|
|
|
|
|