Пример #1
0
 /**
  * Check dispo
  *
  * @param string $date Date
  *
  * @return void
  */
 function checkDispo($date)
 {
     assert($this->_ref_affectations !== null);
     $index = "lit_id";
     // Last Dispo
     $where = array("lit_id" => "= '{$this->lit_id}'", "sortie" => "<= '{$date} 23:59:59'");
     $order = "sortie DESC";
     $this->_ref_last_dispo = new CAffectation();
     $this->_ref_last_dispo->loadObject($where, $order, null, null, $index);
     $this->_ref_last_dispo->checkDaysRelative($date);
     // Next Dispo
     $where = array("lit_id" => "= '{$this->lit_id}'", "entree" => ">= '{$date} 00:00:00'");
     $order = "entree ASC";
     $this->_ref_next_dispo = new CAffectation();
     $this->_ref_next_dispo->loadObject($where, $order, null, null, $index);
     $this->_ref_next_dispo->checkDaysRelative($date);
 }