8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Users can pay their own cotisation with their solde.

This commit is contained in:
Yoann Pétri 2018-01-11 19:25:41 +01:00
parent a742bb860f
commit 60696dbba1
4 changed files with 10 additions and 1 deletions

View file

@ -51,6 +51,7 @@ class EditOptionalUserForm(ModelForm):
self.fields['max_solde'].label = 'Solde maximum'
self.fields['min_online_payment'].label = 'Montant de rechargement minimum en ligne'
self.fields['self_adhesion'].label = 'Auto inscription'
self.fields['max_recharge'].label = 'Rechargement max'
class EditOptionalMachineForm(ModelForm):

View file

@ -52,6 +52,10 @@ class OptionalUser(models.Model):
max_digits=5,
decimal_places=2,
default=10
max_recharge = models.DecimalField(
max_digits=5,
decimal_places=2,
default=100
)
gpg_fingerprint = models.BooleanField(default=True)
all_can_create = models.BooleanField(

View file

@ -56,6 +56,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ useroptions.all_can_create }}</td>
<th>Auto inscription</th>
<td>{{ useroptions.self_adhesion }}</td>
{% if useroptions.user_solde %}
<th>Rechargement max</th>
<td>{{ useroptions.max_recharge }}</td>
{% endif %}
</tr>
{% if useroptions.user_solde %}
<tr>

View file

@ -196,7 +196,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<p>Aucune machine</p>
{% endif %}
<h2>Cotisations</h2>
<h4>{% can_create Facture %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation</a> {% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Modifier le solde</a>{% endif%}{% acl_else %}{% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}</h4>
<h4>{% can_create Facture %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation</a> {% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Modifier le solde</a>{% endif%}{% acl_else %}{% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation par solde</a>{% endif }{% acl_end %}</h4>
{% if facture_list %}
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
{% else %}