Withdraw to deduct
* refactors all files and variable names * WIP: Models and attributes
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
{% load i18n l10n fontawesome_5 humanize %}
|
||||
<div id="eco-account-withdraws" class="card">
|
||||
<div id="eco-account-deductions" class="card">
|
||||
<div class="card-header rlp-r">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>
|
||||
<span class="badge badge-light">{{intervention.withdraws.count}}</span>
|
||||
{% trans 'Eco Account Withdraws' %}
|
||||
{% trans 'Eco Account Deductions' %}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:acc-new-withdraw' intervention.id %}" title="{% trans 'Add new withdraw' %}">
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:acc-new-deduction' intervention.id %}" title="{% trans 'Add new deduction' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'tree' %}
|
||||
</button>
|
||||
@@ -39,21 +39,21 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for withdraw in intervention.withdraws.all %}
|
||||
<tr {% if withdraw.account.deleted %}class="align-middle alert-danger" title="{% trans 'Eco-account deleted! Withdraw invalid!' %}" {% elif not withdraw.account.recorded %}class="align-middle alert-danger" title="{% trans 'Eco-account not recorded! Withdraw invalid!' %}" {% endif %}>
|
||||
{% for deduction in intervention.withdraws.all %}
|
||||
<tr {% if deduction.account.deleted %}class="align-middle alert-danger" title="{% trans 'Eco-account deleted! Deduction invalid!' %}" {% elif not deduction.account.recorded %}class="align-middle alert-danger" title="{% trans 'Eco-account not recorded! Deduction invalid!' %}" {% endif %}>
|
||||
<td class="align-middle">
|
||||
<a href="{% url 'compensation:acc-open' withdraw.account.id %}">
|
||||
{% if withdraw.account.deleted or not withdraw.account.recorded %}
|
||||
<a href="{% url 'compensation:acc-open' deduction.account.id %}">
|
||||
{% if deduction.account.deleted or not deduction.account.recorded %}
|
||||
{% fa5_icon 'exclamation-triangle' %}
|
||||
{% endif %}
|
||||
{{ withdraw.account.identifier }}
|
||||
{{ deduction.account.identifier }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="align-middle">{{ withdraw.surface|floatformat:2|intcomma }} m²</td>
|
||||
<td class="align-middle">{{ withdraw.created.timestamp|default_if_none:""|naturalday}}</td>
|
||||
<td class="align-middle">{{ deduction.surface|floatformat:2|intcomma }} m²</td>
|
||||
<td class="align-middle">{{ deduction.created.timestamp|default_if_none:""|naturalday}}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
<button data-form-url="{% url 'compensation:withdraw-remove' withdraw.account.id withdraw.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove Withdraw' %}">
|
||||
<button data-form-url="{% url 'compensation:deduction-remove' deduction.account.id deduction.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove Deduction' %}">
|
||||
{% fa5_icon 'trash' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -133,7 +133,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
{% include 'intervention/detail/includes/withdraws.html' %}
|
||||
{% include 'intervention/detail/includes/deductions.html' %}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
{% include 'intervention/detail/includes/revocation.html' %}
|
||||
|
||||
Reference in New Issue
Block a user