Merge branch 'release/v0.1.16'
This commit is contained in:
commit
762ba0b833
@ -1,3 +1,5 @@
|
|||||||
|
-0.1.16
|
||||||
|
- improve employee card validity calculation
|
||||||
-0.1.15
|
-0.1.15
|
||||||
- fix null pointer when displaying warning in reception , when no ticket
|
- fix null pointer when displaying warning in reception , when no ticket
|
||||||
-0.1.14
|
-0.1.14
|
||||||
|
|||||||
@ -5,7 +5,7 @@ return [
|
|||||||
'supportEmail' => 'rocho02@gmail.com',
|
'supportEmail' => 'rocho02@gmail.com',
|
||||||
'infoEmail' => 'info@rocho-net.hu',
|
'infoEmail' => 'info@rocho-net.hu',
|
||||||
'user.passwordResetTokenExpire' => 3600,
|
'user.passwordResetTokenExpire' => 3600,
|
||||||
'version' => 'v0.1.15',
|
'version' => 'v0.1.16',
|
||||||
'company' => 'movar',//gyor
|
'company' => 'movar',//gyor
|
||||||
'company_name' => "Freimann Kft.",
|
'company_name' => "Freimann Kft.",
|
||||||
'product_visiblity' => 'account',// on reception which products to display. account or global
|
'product_visiblity' => 'account',// on reception which products to display. account or global
|
||||||
|
|||||||
@ -56,13 +56,16 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
|||||||
order by id_card desc
|
order by id_card desc
|
||||||
) as t
|
) as t
|
||||||
on t.id_card = c1.id_card
|
on t.id_card = c1.id_card
|
||||||
SET c1.validity = case when t.id_card is null then ( c1.validity | 1 << 0 ) else ( c1.validity & ~(1 << 0) ) end
|
-- first bit is 0 , when there is a valid ticket or the card is 'employee' => 0000 0000
|
||||||
, c1.flag = case when t.id_card is null then ( c1.flag | 1 << 0 ) else ( c1.flag & ~(1 << 0) ) end
|
-- first bit is 1, when card is not employee and there is no valid card => 0000 0001
|
||||||
, c1.id_ticket_current = case when t.id_ticket is null then null else t.id_ticket end
|
SET c1.validity = case when c1.type = 50 then ( c1.validity & ~(1 << 0) ) when t.id_card is null then ( c1.validity | 1 << 0 ) else ( c1.validity & ~(1 << 0) ) end
|
||||||
WHERE c1.type <> 50";
|
-- first bit is 0 when there is a ticket or 'employee' card 0000 0000
|
||||||
|
-- first bit is 1 when there is no ticket and card type is not 'employee'
|
||||||
|
, c1.flag = case when c1.type = 50 then ( c1.flag & ~(1 << 0) ) when t.id_card is null then ( c1.flag | 1 << 0 ) else ( c1.flag & ~(1 << 0) ) end
|
||||||
|
, c1.id_ticket_current = case when t.id_ticket is null then null else t.id_ticket end";
|
||||||
|
|
||||||
public static $SQL_UPDATE_CARD = "UPDATE card as c1
|
public static $SQL_UPDATE_CARD = "UPDATE card as c1
|
||||||
left JOIN ( select ticket.id_card as id_card , max(ticket.id_ticket) as id_ticket
|
left JOIN ( select ticket.id_card as id_card , max(ticket.id_ticket) as id_ticket
|
||||||
from ticket
|
from ticket
|
||||||
where ticket.start <= CURDATE()
|
where ticket.start <= CURDATE()
|
||||||
and ticket.end >= curdate()
|
and ticket.end >= curdate()
|
||||||
@ -73,10 +76,10 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
|||||||
order by id_card desc
|
order by id_card desc
|
||||||
) as t
|
) as t
|
||||||
on t.id_card = c1.id_card
|
on t.id_card = c1.id_card
|
||||||
SET c1.validity = case when t.id_card is null then ( c1.validity | 1 << 0 ) else ( c1.validity & ~(1 << 0) ) end
|
SET c1.validity = case when c1.type = 50 then ( c1.validity & ~(1 << 0) ) when t.id_card is null then ( c1.validity | 1 << 0 ) else ( c1.validity & ~(1 << 0) ) end
|
||||||
,c1.flag = case when t.id_card is null then ( c1.flag | 1 << 0 ) else ( c1.flag & ~(1 << 0) ) end
|
,c1.flag = case when c1.type = 50 then ( c1.flag & ~(1 << 0) ) when t.id_card is null then ( c1.flag | 1 << 0 ) else ( c1.flag & ~(1 << 0) ) end
|
||||||
, c1.id_ticket_current = case when t.id_ticket is null then null else t.id_ticket end
|
, c1.id_ticket_current = case when t.id_ticket is null then null else t.id_ticket end
|
||||||
WHERE c1.type <> 50 and c1.id_card = :id";
|
WHERE c1.id_card = :id";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user