add backend transfer list changes
This commit is contained in:
@@ -6,6 +6,7 @@ use Yii;
|
||||
use yii\base\Model;
|
||||
use common\models\Card;
|
||||
use common\models\Customer;
|
||||
use common\models\Ticket;
|
||||
|
||||
/**
|
||||
* ContactForm is the model behind the contact form.
|
||||
@@ -15,6 +16,7 @@ class ReceptionForm extends Model
|
||||
public $number;
|
||||
public $card;
|
||||
public $customer;
|
||||
public $tickets;
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,10 +41,18 @@ class ReceptionForm extends Model
|
||||
}
|
||||
|
||||
public function readCard(){
|
||||
|
||||
$this->card = Card::findOne(['number' => $this->number]);
|
||||
if ( $this->card != null ){
|
||||
$this->customer = $this->card->customer;
|
||||
$this->readValidTickets();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function readValidTickets(){
|
||||
$this->tickets = Ticket::readActive($this->card);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user