Ejemplo n.º 1
0
 /**
  * @param \Sonata\AdminBundle\Validator\ErrorElement $errorElement
  * @param mixed $object
  */
 public function validate(ErrorElement $errorElement, $object)
 {
     /* @var $object \Application\Sonata\ClientOperationsBundle\Entity\DEBIntro */
     parent::validate($errorElement, $object);
     $error = new DEBErrorElements($errorElement, $object, $this->import_file_year, $this->import_file_month);
     $error->setAdmin($this)->setValidateImport($this->getValidateImport())->validateRegime(array(11, 19))->validateDEB()->setMois()->setDatePieceByFilename();
 }
Ejemplo n.º 2
0
 /**
  * @param ErrorElement $errorElement
  * @param mixed $object
  */
 public function validate(ErrorElement $errorElement, $object)
 {
     /* @var $object \Application\Sonata\ClientOperationsBundle\Entity\DEBExped */
     parent::validate($errorElement, $object);
     $error = new DEBErrorElements($errorElement, $object, $this->import_file_year, $this->import_file_month);
     $error->setAdmin($this)->setValidateImport($this->getValidateImport())->validateRegime(array(21, 29, 25, 26, 31))->validateNiveauDEBRegime()->validateNoTVATiers()->validateDEB()->setMois()->setDatePieceByFilename()->validateNomenclature();
 }