From bfb5e43e4f3584fcf6aa2cae32afa71854c94cf8 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween Date: Fri, 1 Jun 2012 15:30:39 -0400 Subject: [PATCH] =?utf8?q?[#3216]=20Ne=20pas=20afficher=20la=20r=C3=A9mun=C3?= =?utf8?q?=A9ration=20en=20cours=20pour=20les=20dossiers=20inactifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/rh/models.py | 6 ++++++ project/rh/templates/rh/include/dossier.html | 2 ++ 2 files changed, 8 insertions(+) diff --git a/project/rh/models.py b/project/rh/models.py index 9befcb5..65cbd18 100644 --- a/project/rh/models.py +++ b/project/rh/models.py @@ -967,6 +967,12 @@ class Dossier_(AUFMetadata, DevisableMixin): total += r.montant_euros() return total + def actif(self): + today = date.today() + return (self.date_debut is None or self.date_debut <= today) \ + and (self.date_fin is None or self.date_fin >= today) \ + and not (self.date_fin is None and self.date_debut is None) + class Dossier(Dossier_): __doc__ = Dossier_.__doc__ diff --git a/project/rh/templates/rh/include/dossier.html b/project/rh/templates/rh/include/dossier.html index 67d3e6e..de978f5 100644 --- a/project/rh/templates/rh/include/dossier.html +++ b/project/rh/templates/rh/include/dossier.html @@ -19,12 +19,14 @@ {% endif %} +{% if dossier.actif %}

Rémunération en cours

{% include "dae/embauche-remun-consulter.html" %}
+{% endif %} {% include "rh/include/pieces.html" %} -- 1.7.10.4