/** * Valida antes del borrado * Devuelve TRUE o FALSE * Si hay errores carga el array $this->_errores * @return boolean */ public function validaBorrado() { parent::validaBorrado(); if ($this->UnidadesPtesFacturar == 0) { $this->_errores[] = "No se puede borrar la línea. Está facturada"; } return count($this->_errores) == 0; }
/** * Valida antes del borrado * Devuelve TRUE o FALSE * Si hay errores carga el array $this->_errores * @return boolean */ public function validaBorrado() { parent::validaBorrado(); if ($this->IDEstado != 0) { $this->_errores[] = "No se puede borrar la línea. Está confirmada o recepcionada"; } return count($this->_errores) == 0; }