diff --git a/Brie/brie/controllers/scheduler.py b/Brie/brie/controllers/scheduler.py index a3d7207..4cc2db2 100644 --- a/Brie/brie/controllers/scheduler.py +++ b/Brie/brie/controllers/scheduler.py @@ -33,12 +33,6 @@ def disconnect_members_from_residence(admin_user, residence_dn): if machines_tuples != []: if not CotisationComputes.is_cotisation_paid(member.dn, admin_user, residence_dn): - #verification de grace pour septembre : si le membre avait cotise en Aout, on lui accorde un delai de paiement pour Septembre, et on ne le deconnecte pas - if date_actuelle.month == 9 and CotisationComputes.is_cotisation_was_paid_last_year(member.dn, admin_user, residence_dn): - #le membre etait a jour en aout, on lui autorise un delai de paiement en septembre - pas de deconnexion - continue - #end if - dhcps = Machine.get_dhcps(admin_user, member.dn) machine_membre_tag = "machine_membre" # FIXME move to config diff --git a/Brie/brie/controllers/treasury.py b/Brie/brie/controllers/treasury.py index 0333e3d..56a47d5 100644 --- a/Brie/brie/controllers/treasury.py +++ b/Brie/brie/controllers/treasury.py @@ -28,11 +28,13 @@ class TreasuryController(AuthenticatedBaseController): """ Affiche les résultats """ @expose("brie.templates.treasury.index") - def index(self): + def index(self, year = None): residence_dn = self.user.residence_dn residence = Residences.get_name_by_dn(self.user, self.user.residence_dn) - year = CotisationComputes.current_year() + if year is None: + year = CotisationComputes.current_year() + #end if all_payments = Cotisation.get_all_payment_by_year(self.user, residence_dn, year) all_payments_cashed = Cotisation.get_all_cashed_payments_by_year(self.user, residence_dn, year) total_earned = 0 @@ -85,7 +87,8 @@ class TreasuryController(AuthenticatedBaseController): "admin_totals" : admin_totals, "admin_payments_received" : admin_payments_received_ordered, "total_earned" : total_earned, - "total_earned_cashed" : total_earned_cashed + "total_earned_cashed" : total_earned_cashed, + "year" : int(year) } #end def diff --git a/Brie/brie/lib/aurore_helper.py b/Brie/brie/lib/aurore_helper.py index 43808bf..ca9367a 100644 --- a/Brie/brie/lib/aurore_helper.py +++ b/Brie/brie/lib/aurore_helper.py @@ -178,7 +178,8 @@ class CotisationComputes: current_year = CotisationComputes.current_year() cotisations = Cotisation.cotisations_of_member(user_session, member_dn, current_year) #end if - return Room.get_by_member_dn(user_session, residence_dn, member_dn) == None or cotisations == [] + #en septembre, on ne met pas de membre en old afin que les anciens ne soient pas deconnectes + return Room.get_by_member_dn(user_session, residence_dn, member_dn) == None or datetime.datetime.now().month != 9 or cotisations == [] #end def @staticmethod diff --git a/Brie/brie/templates/treasury/index.html b/Brie/brie/templates/treasury/index.html index 19117f8..e4ec80a 100644 --- a/Brie/brie/templates/treasury/index.html +++ b/Brie/brie/templates/treasury/index.html @@ -9,6 +9,7 @@