Commit af287cb2 by Julien Jorry

Fix Cotisation bug on emlc paiement

parent 12479010
...@@ -49,7 +49,7 @@ class Cotisation extends Flux ...@@ -49,7 +49,7 @@ class Cotisation extends Flux
public function getAllOperations($em) public function getAllOperations($em)
{ {
if (MoyenEnum::MOYEN_MLC == $this->getMoyen()) { if (MoyenEnum::MOYEN_EMLC == $this->getMoyen()) {
return [ return [
OperationFactory::getOperation($this, $this->getExpediteur(), CurrencyEnum::CURRENCY_EMLC, -$this->getMontant()), OperationFactory::getOperation($this, $this->getExpediteur(), CurrencyEnum::CURRENCY_EMLC, -$this->getMontant()),
OperationFactory::getOperation($this, $this->getDestinataire(), CurrencyEnum::CURRENCY_EMLC, $this->getMontant()), OperationFactory::getOperation($this, $this->getDestinataire(), CurrencyEnum::CURRENCY_EMLC, $this->getMontant()),
...@@ -65,7 +65,7 @@ class Cotisation extends Flux ...@@ -65,7 +65,7 @@ class Cotisation extends Flux
public function operate($em) public function operate($em)
{ {
if (MoyenEnum::MOYEN_MLC == $this->getMoyen()) { if (MoyenEnum::MOYEN_EMLC == $this->getMoyen()) {
$compteExp = $this->getExpediteur()->getEcompte() - $this->getMontant(); $compteExp = $this->getExpediteur()->getEcompte() - $this->getMontant();
if ($compteExp < 0) { if ($compteExp < 0) {
throw new \Exception('[FLUX] Opération impossible ! Montant supérieur au solde de monnaie éléctronique !'); throw new \Exception('[FLUX] Opération impossible ! Montant supérieur au solde de monnaie éléctronique !');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment