fix update card

This commit is contained in:
2020-04-27 08:01:41 +02:00
parent 409532b664
commit 55afb5de62
2 changed files with 24 additions and 7 deletions

View File

@@ -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 "