Пример #1
0
 public function load(ObjectManager $manager)
 {
     $tab_TVA = array(array("multiplicate" => "1.21", "nom" => "TVA 21%", "valeur" => "0.21"), array("multiplicate" => "1.12", "nom" => "TVA 12%", "valeur" => "0.12"), array("multiplicate" => "1.06", "nom" => "TVA 6%", "valeur" => "0.6"));
     for ($i = 0; $i < sizeof($tab_TVA); $i++) {
         $tva = new Tva();
         $tva->setMultiplicate($tab_TVA[$i]["multiplicate"]);
         $tva->setNom($tab_TVA[$i]["nom"]);
         $tva->setValeur($tab_TVA[$i]["valeur"]);
         $manager->persist($tva);
     }
     $manager->flush();
 }
Пример #2
0
 public function load(ObjectManager $manager)
 {
     $tva1 = new Tva();
     $tva1->setMultiplicate('0.982');
     $tva1->setNom('TVA 1.75%');
     $tva1->setValeur('1.75');
     $manager->persist($tva1);
     $tva2 = new Tva();
     $tva2->setMultiplicate('0.833');
     $tva2->setNom('TVA 20%');
     $tva2->setValeur('20');
     $manager->persist($tva2);
     $manager->flush();
     $this->addReference('tva1', $tva1);
     $this->addReference('tva2', $tva2);
 }
 public function getValeur()
 {
     $this->__load();
     return parent::getValeur();
 }
 /**
  * {@inheritDoc}
  */
 public function __toString()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, '__toString', array());
     return parent::__toString();
 }
 /**
  * {@inheritDoc}
  */
 public function getValeur()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValeur', array());
     return parent::getValeur();
 }