mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-05 09:26:27 +00:00
Users can pay their own cotisation with their solde.
This commit is contained in:
parent
7ae8908cab
commit
a405983cfa
4 changed files with 10 additions and 1 deletions
|
@ -51,6 +51,7 @@ class EditOptionalUserForm(ModelForm):
|
||||||
self.fields['max_solde'].label = 'Solde maximum'
|
self.fields['max_solde'].label = 'Solde maximum'
|
||||||
self.fields['min_online_payment'].label = 'Montant de rechargement minimum en ligne'
|
self.fields['min_online_payment'].label = 'Montant de rechargement minimum en ligne'
|
||||||
self.fields['self_adhesion'].label = 'Auto inscription'
|
self.fields['self_adhesion'].label = 'Auto inscription'
|
||||||
|
self.fields['max_recharge'].label = 'Rechargement max'
|
||||||
|
|
||||||
|
|
||||||
class EditOptionalMachineForm(ModelForm):
|
class EditOptionalMachineForm(ModelForm):
|
||||||
|
|
|
@ -52,6 +52,10 @@ class OptionalUser(models.Model):
|
||||||
max_digits=5,
|
max_digits=5,
|
||||||
decimal_places=2,
|
decimal_places=2,
|
||||||
default=10
|
default=10
|
||||||
|
max_recharge = models.DecimalField(
|
||||||
|
max_digits=5,
|
||||||
|
decimal_places=2,
|
||||||
|
default=100
|
||||||
)
|
)
|
||||||
gpg_fingerprint = models.BooleanField(default=True)
|
gpg_fingerprint = models.BooleanField(default=True)
|
||||||
all_can_create = models.BooleanField(
|
all_can_create = models.BooleanField(
|
||||||
|
|
|
@ -56,6 +56,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<td>{{ useroptions.all_can_create }}</td>
|
<td>{{ useroptions.all_can_create }}</td>
|
||||||
<th>Auto inscription</th>
|
<th>Auto inscription</th>
|
||||||
<td>{{ useroptions.self_adhesion }}</td>
|
<td>{{ useroptions.self_adhesion }}</td>
|
||||||
|
{% if useroptions.user_solde %}
|
||||||
|
<th>Rechargement max</th>
|
||||||
|
<td>{{ useroptions.max_recharge }}</td>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% if useroptions.user_solde %}
|
{% if useroptions.user_solde %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -196,7 +196,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<p>Aucune machine</p>
|
<p>Aucune machine</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2>Cotisations</h2>
|
<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 %}
|
{% if facture_list %}
|
||||||
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
|
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue