add backend transfer list changes

This commit is contained in:
2015-10-13 09:27:56 +02:00
parent fda450b801
commit b04cbda645
20 changed files with 677 additions and 222 deletions

View File

@@ -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);
}
}