add reception key changes, add money movent storno, status display
This commit is contained in:
@@ -51,7 +51,24 @@ class ReceptionForm extends Model
|
||||
|
||||
$this->number = str_replace("ö", "0", $this->number);
|
||||
|
||||
$this->card = Card::find()->andWhere(['or', ['and',[ 'in','number' , [$this->number]],"trim(coalesce(number, '')) <>'' " ], ['and', ['in','rfid_key' ,[ $this->number] ],"trim(coalesce(rfid_key, '')) <>'' "]])->one();
|
||||
$query = Card::find();
|
||||
$query->leftJoin("card_key_assignment", 'card.id_card = card_key_assignment.id_card');
|
||||
$query->leftJoin("key", 'key.id_key = card_key_assignment.id_key');
|
||||
|
||||
$query->andWhere(['or',
|
||||
['and',[ 'in','card.number' , [$this->number]],"trim(coalesce(card.number, '')) <>'' " ],
|
||||
['and', ['in','card.rfid_key' ,[ $this->number] ],"trim(coalesce(card.rfid_key, '')) <>'' "],
|
||||
['and',[ 'in','key.number' , [$this->number]],"trim(coalesce(key.number, '')) <>'' " ],
|
||||
['and', ['in','key.rfid_key' ,[ $this->number] ],"trim(coalesce(key.rfid_key, '')) <>'' "]
|
||||
|
||||
]);
|
||||
|
||||
$this->card = $query->one();
|
||||
|
||||
if ( $this->card == null ){
|
||||
|
||||
}
|
||||
|
||||
if ( $this->card != null ){
|
||||
$this->customer = $this->card->customer;
|
||||
$this->readValidTickets();
|
||||
|
||||
Reference in New Issue
Block a user