/**
  * @param Form $form
  */
 public function configure(Form $form)
 {
     $form->addText('name', 'Name');
     $form->addManyToOne('account', 'Account')->addRule($form::FILLED);
     $form->addText('identificationFormat', 'ID format')->addRule($form::FILLED);
     $form->addSelect('identificationInterval', 'ID interval', AccountEntity::getIntervals())->addRule($form::FILLED);
     $form->addText('due', 'Invoice due')->addRule($form::FILLED)->addRule($form::INTEGER);
     $form->setCurrentGroup();
     $form->addSaveButton('Save');
 }
Esempio n. 2
0
 /**
  * @param AccountEntity $supplier
  */
 public function setSupplier(AccountEntity $supplier)
 {
     if ($this->supplier !== $supplier) {
         $this->dir->setParent($supplier->getDir());
     }
     $this->supplier = $supplier;
 }