/** * @name ajoutAbonnement($pParam) * @desc Ajoute un abonnement */ public function ajoutAbonnement($pParam) { $lVr = ListeAbonneValid::validAjout($pParam); if ($lVr->getValid()) { $lAbonnementService = new AbonnementService(); // Si il y a une suspension en cours on ajoute l'abonnement en suspension //$lProduits = $lAbonnementService->getProduitsAbonne($pParam['idCompte']); $lCompteAbonnement = new CompteAbonnementVO(); //$lCompteAbonnement->setId($pId); $lCompteAbonnement->setIdCompte($pParam['idCompte']); $lCompteAbonnement->setIdProduitAbonnement($pParam['idProduitAbonnement']); $lCompteAbonnement->setIdLotAbonnement($pParam['idLotAbonnement']); $lCompteAbonnement->setQuantite($pParam['quantite']); $lCompteAbonnement->setDateDebutSuspension(StringUtils::FORMAT_DATE_TIME_NULLE); $lCompteAbonnement->setDateFinSuspension(StringUtils::FORMAT_DATE_TIME_NULLE); $lCompteAbonnement->setEtat(0); $lAbonnementService->setAbonnement($lCompteAbonnement); } return $lVr; }