Changeset 2141


Ignore:
Timestamp:
06/13/18 16:01:03 (6 years ago)
Author:
nanardon
Message:

Revert "Compute departure always for next status"

This reverts commit b13c97ccaea94820e17f725f6179ed8a3f7b0910.

File:
1 edited

Legend:

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

    r2139 r2141  
    256256                    my ($attr) = @_; 
    257257                    my $self = $attr->object; 
    258                     $self->_computeEndEmployment($self->base->config('employment_delay') || 0, 1); 
     258                    $self->_computeEndEmployment($self->base->config('employment_delay') || 0, 1, 1); 
    259259                }, 
    260260                label => l('Start of employment'), 
     
    18031803 
    18041804sub _computeEndEmployment { 
    1805     my ($self, $delay, $workday) = @_; 
     1805    my ($self, $delay, $any, $workday) = @_; 
    18061806 
    18071807    $delay ||= 0; 
     
    18461846            } 
    18471847            $end = $tend 
     1848        } elsif ((!$res->{current}) && (!$any)) { 
     1849            last; 
    18481850        } 
    18491851        $end = DateTime->from_epoch(epoch => str2time($res->{lastday})); 
     
    18521854    } 
    18531855    $list_empl->finish; 
     1856 
     1857    $end ||= $pend if($any); 
    18541858 
    18551859    if ($end) { 
Note: See TracChangeset for help on using the changeset viewer.