Changeset 2339


Ignore:
Timestamp:
02/07/20 07:27:15 (4 years ago)
Author:
nanardon
Message:

Fix currentEmployment computation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r2328 r2339  
    14961496                    my $sth = $self->base->db->prepare_cached( 
    14971497                        q{ 
    1498                         select name from employment where (lastday > ?::timestamp or lastday IS NULL) and "user" = ? 
     1498                        select name from employment where (lastday >= ?::timestamp - '1 days'::interval or lastday IS NULL) and "user" = ? 
    14991499                        order by firstday asc 
    15001500                        limit 1 
     
    15231523                        q{ 
    15241524                        select name from employment where 
    1525                         (lastday is not null and lastday <= ?::timestamp - '1 days'::interval) and "user" = ? 
     1525                        (lastday is not null and lastday < ?::timestamp - '1 days'::interval) and "user" = ? 
    15261526                        order by firstday desc 
    15271527                        limit 1 
Note: See TracChangeset for help on using the changeset viewer.