Ver código fonte

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

prodstable
keun 7 anos atrás
pai
commit
ab39e9d3fe
1 arquivos alterados com 8 adições e 3 exclusões
  1. +8
    -3
      common/models/CommandeAuto.php

+ 8
- 3
common/models/CommandeAuto.php Ver arquivo

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

Carregando…
Cancelar
Salvar