fix update card
This commit is contained in:
@@ -90,7 +90,18 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
where
|
||||
c.status = 20
|
||||
and c.inactivated_at is not null
|
||||
and ((t.start <= c.inactivated_at and t.end >= c.inactivated_at) or (t.start >= c.inactivated_at)) ;";
|
||||
and ((t.start <= c.inactivated_at and t.end >= c.inactivated_at) ) ";
|
||||
|
||||
public static $SQL_UPDATE_TICKETS_END_DATE_ON_CARD_ACTIVATION_SINGLE_CARD = "UPDATE ticket t
|
||||
inner join card c on t.id_card = c.id_card
|
||||
SET end = date_add( end, INTERVAL datediff(current_date, c.inactivated_at) DAY )
|
||||
where
|
||||
c.status = 20
|
||||
and c.inactivated_at is not null
|
||||
and ((t.start <= c.inactivated_at and t.end >= c.inactivated_at) ) and c.id_card = :id_card ";
|
||||
|
||||
|
||||
|
||||
|
||||
public static function SQL_UPDATE_DOOR_ALLOWED_FLAG(){
|
||||
return "
|
||||
|
||||
Reference in New Issue
Block a user