fix barcodue uniqe on admin , ticket use status=active , when checking
This commit is contained in:
@@ -165,10 +165,11 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
$query = Ticket::find();
|
||||
$today = date('Y-m-d');
|
||||
|
||||
$query->andWhere(['id_card' => $card->id_card]);
|
||||
$query->andWhere( 'start <= :today' ,[ 'today' => $today] );
|
||||
$query->andWhere( 'end >= :today' ,[ 'today' => $today] );
|
||||
$query->orderBy([ "created_at" =>SORT_DESC] );
|
||||
$query->andWhere(['ticket.id_card' => $card->id_card]);
|
||||
$query->andWhere( 'ticket.start <= :today' ,[ 'today' => $today] );
|
||||
$query->andWhere( 'ticket.end >= :today' ,[ 'today' => $today] );
|
||||
$query->andWhere( 'ticket.status = :status' ,[ 'status' => Ticket::STATUS_ACTIVE] );
|
||||
$query->orderBy([ "ticket.created_at" =>SORT_DESC] );
|
||||
$result = $query->all();
|
||||
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user