Esempio n. 1
0
 /**
  * Get paymentCondition
  *
  * @return string 
  */
 public function getPaymentCondition()
 {
     if (!$this->paymentCondition && $this->getId()) {
         return $this->customer->getPaymentCondition();
     }
     return $this->paymentCondition;
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $customer = new Customer();
     $customer->setRfc('ABC1010102a9');
     $customer->setBusinessName('Patito SA de CV');
     $customer->setCompanyName('Industrias Patito Incorporated');
     $customer->setDiscount(0.05);
     $customer->setFiscalAddress($this->getReference('direccion1'));
     $customer->setPaymentAddress($this->getReference('direccion2'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer1', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Super Colchones SA de CV');
     $customer->setCompanyName('Super Colchones');
     $customer->setDiscount(0.07000000000000001);
     $customer->setFiscalAddress($this->getReference('direccion3'));
     $customer->setPaymentAddress($this->getReference('direccion4'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer2', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias Gonzalez');
     $customer->setCompanyName('Super Colchones');
     $customer->setDiscount(0.05);
     $customer->setFiscalAddress($this->getReference('direccion5'));
     $customer->setPaymentAddress($this->getReference('direccion6'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer3', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias Perez');
     $customer->setCompanyName('Los Perez');
     $customer->setDiscount(0.1);
     $customer->setFiscalAddress($this->getReference('direccion7'));
     $customer->setPaymentAddress($this->getReference('direccion8'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer4', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias Gomez');
     $customer->setCompanyName('Gomez Company');
     $customer->setDiscount(0);
     $customer->setFiscalAddress($this->getReference('direccion9'));
     $customer->setPaymentAddress($this->getReference('direccion10'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer5', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias texitles Gutierrez');
     $customer->setCompanyName('Los Gutierrez');
     $customer->setDiscount(0.04);
     $customer->setFiscalAddress($this->getReference('direccion11'));
     $customer->setPaymentAddress($this->getReference('direccion12'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer6', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias Bimbo');
     $customer->setCompanyName('Bimbo');
     $customer->setDiscount(0.04);
     $customer->setFiscalAddress($this->getReference('direccion13'));
     $customer->setPaymentAddress($this->getReference('direccion14'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer7', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Duques Asociados');
     $customer->setCompanyName('Los Duques');
     $customer->setDiscount(0.04);
     $customer->setFiscalAddress($this->getReference('direccion15'));
     $customer->setPaymentAddress($this->getReference('direccion16'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer8', $customer);
     $customer = new Customer();
     $customer->setRfc('MAH128345GH2');
     $customer->setBusinessName('Industrias Almeida');
     $customer->setCompanyName('Patito Jr');
     $customer->setDiscount(0.04);
     $customer->setFiscalAddress($this->getReference('direccion17'));
     $customer->setPaymentAddress($this->getReference('direccion18'));
     $manager->persist($customer);
     $manager->flush();
     $this->addReference('customer9', $customer);
 }