add reception redirection change when card with key read

This commit is contained in:
2016-02-24 21:40:21 +01:00
parent ae212eddd4
commit 3b7f42014b
5 changed files with 33 additions and 3 deletions

View File

@@ -130,7 +130,7 @@ class ReceptionForm extends Model
public function getFirstKey(){
$result = null;
if ( isset($this->keys) && is_array($this->keys) && count($this->keys) > 0 ){
$esut = $this->keys[0];
$result = $this->keys[0];
}
return $result;
}
@@ -209,6 +209,21 @@ class ReceptionForm extends Model
return $result;
}
public function isCardWithKey(){
$result = false;
if ( $this->isCardWithCustomer() ){
\Yii::info("isCardWithKey - customer is with card");
$key = $this->getFirstKey();
\Yii::info("isCardWithKey - key: " . print_r($key, true));
if ( isset($key)){
$result = true;
}
}
return $result;
}
/**
* @return true, if no card and customer found
* */