public function setPrix($prix)
 {
     $this->__load();
     return parent::setPrix($prix);
 }
Beispiel #2
0
 public function calculToleAction($id)
 {
     $Request = $this->getRequest();
     if ($Request->getMethod() == 'POST') {
         $tole = $Request->get('tole');
         $diametreinter = $Request->get('diametreinter');
         $epaisseur = $Request->get('epaisseur');
         $dnext = $Request->get('dnext');
         $pouce = $Request->get('pouce');
         $dnisole = $Request->get('dnisole');
         $circ = $Request->get('circ');
         $recouv = $Request->get('recouv');
         $nbcouche = $Request->get('nbcouche');
         $unite = $Request->get('unite');
         $qtenet = $Request->get('qtenet');
         $dechet = $Request->get('dechet');
         $qtebrute = $Request->get('qtebrute');
         $tempsprefa = $Request->get('tempsprefa');
         $tempsmonta = $Request->get('tempsmonta');
         $prefamonta = $Request->get('prefamonta');
         $prixUnitaireTole = $Request->get('prixUnitaireTole');
         $prixUnitaireIsolantMm = $Request->get('prixUnitaireIsolantMm');
         $prixUnitaireIsolantML = $Request->get('prixUnitaireIsolantML');
         $quantite = $Request->get('quantite');
         $prix = $Request->get('prix');
         $prixMO = $Request->get('prixMO');
         $accessoire = $Request->get('accessoire');
         $echaff = $Request->get('echaffaudage');
         $designation = $Request->get('designation');
         $modele = new Tole();
         $modele->setType($tole);
         $modele->setDiametreinter($diametreinter);
         $modele->setDnext($dnext);
         $modele->setEpaisseur($epaisseur);
         $modele->setDnisole($dnisole);
         $modele->setCirc($circ);
         $modele->setRecouv($recouv);
         $modele->setPouce($pouce);
         $modele->setNbCouche($nbcouche);
         $modele->setUnite($unite);
         $modele->setEchaffaudage($echaff);
         $modele->setAccessoires($accessoire);
         $modele->setPrixMO($prixMO);
         $modele->setQuantite($quantite);
         $modele->setDechet($dechet);
         $modele->setQtebrute($qtebrute);
         $modele->setTempsprefa($tempsprefa);
         $modele->setTempsMonta($tempsmonta);
         $modele->setTempsPrefaMonta($prefamonta);
         $modele->setPrixUnitaireTole($prixUnitaireTole);
         $modele->setPrixUnitaireIsolantMm($prixUnitaireIsolantMm);
         $modele->setPrixUnitaireIsolantML($prixUnitaireIsolantML);
         $modele->setQtenet($qtenet);
         $modele->setPrix($prix);
         $modele->setEtat("En attente");
         $modele->setDesignation($designation);
         $em = $this->container->get('doctrine')->getEntityManager();
         $projet = $em->getRepository('AdminBundle:Projet')->find($id);
         $modele->setIdprojet($projet);
         $em->persist($modele);
         $em->flush();
         return $this->redirect($this->generateUrl("tech_listerTole", array('id' => $id)));
     }
     return $this->render('AdminBundle:Technique:calculTole.html.twig', array('id' => $id));
 }