Exemplo n.º 1
0
 /**
  * @name insert($pCompte)
  * @param CompteVO
  * @return CompteVO
  * @desc Ajoute un compte
  */
 private function insert($pCompte)
 {
     $lId = CompteManager::insert($pCompte);
     // Le label est l'id du compte par défaut
     $pCompte->setId($lId);
     $pCompte->setLabel('C' . $lId);
     $this->update($pCompte);
     // Initialisation du compte
     $lOperation = new OperationDetailVO();
     $lOperation->setIdCompte($lId);
     $lOperation->setMontant(0);
     $lOperation->setLibelle("Création du compte");
     $lOperation->setDate(StringUtils::dateAujourdhuiDb());
     $lOperation->setTypePaiement(-1);
     $lOperationService = new OperationService();
     $lOperationService->set($lOperation);
     return $pCompte;
 }
 /**
  * @name remplirOperationDetailEntete($pId, $pIdCompte, $pMontant, $pLibelle, $pDate, $pTypePaiement, $pType, $pDateMaj, $pIdLogin, $pTppId, $pTppType, $pTppChampComplementaire, $pTppVisible)
  * @param int(11)
  * @param int(11)
  * @param decimal(10,2)
  * @param varchar(100)
  * @param datetime
  * @param int(11)
  * @param int(11)
  * @param datetime
  * @param int(11)
  * @param int(11)
  * @param varchar(100)
  * @param tinyint(4)
  * @param tinyint(1)
  * @return OperationVO
  * @desc Retourne une OperationDetailVO remplie
  */
 private static function remplirOperationDetailEntete($pId, $pIdCompte, $pMontant, $pLibelle, $pDate, $pTypePaiement, $pType, $pDateMaj, $pIdLogin, $pTppId, $pTppType, $pTppChampComplementaire, $pTppVisible)
 {
     $lOperation = new OperationDetailVO();
     $lOperation->setId($pId);
     $lOperation->setIdCompte($pIdCompte);
     $lOperation->setMontant($pMontant);
     $lOperation->setLibelle($pLibelle);
     $lOperation->setDate($pDate);
     $lOperation->setTypePaiement($pTypePaiement);
     $lOperation->setType($pType);
     $lOperation->setDateMaj($pDateMaj);
     $lOperation->setIdLogin($pIdLogin);
     $lOperation->setTppId($pTppId);
     $lOperation->setTppType($pTppType);
     $lOperation->setTppChampComplementaire($pTppChampComplementaire);
     $lOperation->setTppVisible($pTppVisible);
     return $lOperation;
 }