add reception redirection change when card with key read
This commit is contained in:
@@ -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
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user