add default account to frontend
This commit is contained in:
@@ -53,6 +53,41 @@ class ReceptionForm extends Model
|
||||
$this->tickets = Ticket::readActive($this->card);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true , if card found without customer
|
||||
* */
|
||||
public function isFreeCard(){
|
||||
$result = isset($this->card) && !isset($this->customer);
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* @return true , if card found with customer
|
||||
* */
|
||||
public function isCardWithCustomer(){
|
||||
$result = isset($this->card) && isset($this->customer);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true , if card and customer found with at least one valid tickets
|
||||
* */
|
||||
public function isCustomerWithTicket(){
|
||||
$result = false;
|
||||
if ( isset($this->card) && isset($this->customer) ){
|
||||
if ( isset($this->tickets) && count($this->tickets) > 0 ){
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true, if no card and customer found
|
||||
* */
|
||||
public function isInvalidNumber(){
|
||||
$result = !isset($this->card) && !isset($this->customer);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user