Browse Source

[Backend] Modif pour que ce soit le boulanger qui soit à l'origine de l'action de paiement des commandes récurrentes

prodstable
keun 7 years ago
parent
commit
ab39e9d3fe
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      common/models/CommandeAuto.php

+ 8
- 3
common/models/CommandeAuto.php View File

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

Loading…
Cancel
Save