/** * @see parent::check() */ function check() { // Data checking $msg = null; if (!$this->plageconsult_id) { if (!$this->chir_id) { $msg .= "Praticien non valide<br />"; } } //plage blocked by holiday config if not immediate consultation if (!$this->_immediate_plage) { $holidays = CMbDate::getHolidays(); if (!CAppUI::pref("allow_plage_holiday") && array_key_exists($this->date, $holidays) && !$this->_id) { $msg .= CAppUI::tr("CPlageConsult-errror-plage_blocked_by_holidays", $holidays[$this->date]); } } //chir_id se remplace lui même if ($this->chir_id == $this->pour_compte_id) { $msg .= CAppUI::tr("CPlageConsult-error-pour_compte-equal-chir_id"); } if ($this->chir_id == $this->remplacant_id) { $msg .= CAppUI::tr("CPlageConsult-error-remplacant_id-equal-chir_id"); } return $msg . parent::check(); }
/** * @see parent::check() */ function check() { // Data checking $msg = null; if (!$this->_id && !$this->chir_id && !$this->spec_id) { $msg .= "Vous devez choisir un praticien ou une spécialité<br />"; } return $msg . parent::check(); }