Commit 35f561a5 by Julien Jorry

Fix error in Flux for don <= 0

parent 3f916835
...@@ -580,7 +580,7 @@ abstract class Flux implements FluxInterface ...@@ -580,7 +580,7 @@ abstract class Flux implements FluxInterface
if (empty($flux->getExpediteur())) { if (empty($flux->getExpediteur())) {
throw new \Exception("Opération impossible ! Pas d'expéditeur !"); throw new \Exception("Opération impossible ! Pas d'expéditeur !");
} }
if ($flux->getMontant() <= 0 && self::TYPE_COTISATION !== $flux->getParenttype()) { if ($flux->getMontant() <= 0 && !(self::TYPE_COTISATION == $flux->getParenttype() || self::TYPE_DON == $flux->getParenttype())) {
throw new \Exception('Opération impossible ! Montant inférieur ou égal à zéro !'); throw new \Exception('Opération impossible ! Montant inférieur ou égal à zéro !');
} }
if ($flux->getExpediteur() == $flux->getDestinataire()) { if ($flux->getExpediteur() == $flux->getDestinataire()) {
......
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