Explorar el Código

fix vouchers vanishing on expiry date

Pi hace 3 semanas
padre
commit
aa39503119
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      util-sqlpage/code/recent.sql

+ 1 - 1
util-sqlpage/code/recent.sql

@@ -34,7 +34,7 @@ FROM code c
 LEFT JOIN code_detail cd
 ON c.hash = cd.hash
 WHERE (
-    cd.expiry IS NULL OR COALESCE($expired, 'false') = 'true' OR date(cd.expiry) > date(datetime(CURRENT_TIMESTAMP, 'localtime'))
+    cd.expiry IS NULL OR COALESCE($expired, 'false') = 'true' OR date(cd.expiry) >= date(datetime(CURRENT_TIMESTAMP, 'localtime'))
 ) AND (
     cd.used IS NULL OR COALESCE($used||'', 'false') = 'true' OR COALESCE(cd.used||'','') = 'false'
 ) AND (