Skip to content

Commit

Permalink
Ajout d'un mode de compatibilité (correction janvier 2018)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsongis committed Feb 16, 2019
1 parent 4f53b18 commit ac09210
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def getOptionsParameter(self):
options |= COMPATIBILITY_MODE_ADAPTATIONS_2016
if "compatibility-decompte-semaines-2017" in value:
options |= COMPATIBILITY_MODE_DECOMPTE_SEMAINES_2017
if "compatibility-adaptations-2018" in value:
options |= COMPATIBILITY_MODE_ADAPTATIONS_2018
if "regularisation-uniquement-semaines-fermeture" in value:
options |= REGULARISATION_UNIQUEMENT_SEMAINES_FERMETURE
if "prelevements-automatiques" in value:
Expand Down
1 change: 1 addition & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@
TARIFS_SPECIAUX_LABELS = 1 << 20
PREINSCRIPTIONS_ONLY = 1 << 21
REGULARISATION_UNIQUEMENT_SEMAINES_FERMETURE = 1 << 22
COMPATIBILITY_MODE_ADAPTATIONS_2018 = 1 << 23

# Atributs de plages horaires spéciales
PLAGE_FERMETURE = 0
Expand Down
3 changes: 2 additions & 1 deletion cotisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def __init__(self, inscrit, date, options=0):
self.fin = self.inscription.fin_periode_adaptation
else:
self.debut = self.inscription.fin_periode_adaptation + datetime.timedelta(1)
self.debut_inscription = self.debut
if not (config.options & COMPATIBILITY_MODE_ADAPTATIONS_2018):
self.debut_inscription = self.debut

if options & TRACES:
print("\nCotisation de %s au %s ..." % (GetPrenomNom(inscrit), date))
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# You should have received a copy of the GNU General Public License
# along with Gertrude; if not, see <http://www.gnu.org/licenses/>.

VERSION = '1.22.17'
VERSION = '1.22.18'

0 comments on commit ac09210

Please sign in to comment.