/** * @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(); }
/** * @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(); }