Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AppBundle\Controller\Admin\Accounting\Invoice;

use Afup\Site\Utils\Vat;
use AppBundle\Accounting\Form\InvoicingPeriodType;
use AppBundle\Accounting\InvoicingPaymentStatus;
use AppBundle\Accounting\Model\Invoicing;
Expand Down Expand Up @@ -52,6 +53,7 @@ public function __invoke(Request $request): Response
'direction' => $direction,
'sort' => $sort,
'totalHt' => $totalHt,
'isSubjectedToVat' => Vat::isSubjectedToVat($period->getEndDate()),
]));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AppBundle\Controller\Admin\Accounting\Quotation;

use Afup\Site\Utils\Vat;
use AppBundle\Accounting\Form\InvoicingPeriodType;
use AppBundle\Accounting\Model\Repository\InvoicingRepository;
use AppBundle\Accounting\Model\Repository\InvoicingPeriodRepository;
Expand Down Expand Up @@ -38,6 +39,7 @@ public function __invoke(Request $request): Response
'formPeriod' => $formPeriod->createView(),
'direction' => $direction,
'sort' => $sort,
'isSubjectedToVat' => Vat::isSubjectedToVat($period->getEndDate()),
]));
}
}
12 changes: 6 additions & 6 deletions templates/admin/accounting/invoice/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<table class="ui table striped compact celled afup-tab-filterable">
<thead>
<tr>
<th>Année</th>
<th data-tf-filter-type="input">
<a href="{{ url('admin_accounting_invoices_list', {'periodId': periodId, 'sort': 'date', 'direction' : ((direction == 'asc' and sort == 'date') ? 'desc': 'asc')}) }}">
Date
Expand All @@ -29,17 +28,18 @@
</a>
</th>
<th>Ville</th>
<th class="right aligned">Numero facture</th>
<th class="right aligned">Numéro facture</th>
<th>Référence client</th>
<th data-tf-filter-type="select" class="center aligned">Etat paiement</th>
<th class="right aligned">Prix</th>
<th data-tf-filter-type="select" class="center aligned">État paiement</th>
<th class="right aligned">
Montant{% if isSubjectedToVat %} HT{% endif %}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for line in lines %}
<tr class="{% if loop.index is odd %}odd{% else %}even{% endif %}">
<td nowrap="nowrap">{{ line.quotationDate|date('Y') }}</td>
<td nowrap="nowrap">{{ line.quotationDate|format_date('short') }}</td>
<td>{{ line.company }}</td>
<td>{{ line.city }}</td>
Expand Down Expand Up @@ -91,7 +91,7 @@
</table>

<div class="ui message">
Total facturé en HT sur cette période : {{ totalHt|number_format(2, ',', ' ') }} €
Total facturé {% if isSubjectedToVat %}en HT{% endif %} sur cette période : {{ totalHt|number_format(2, ',', ' ') }} €
</div>
{% else %}
<div class="ui placeholder segment">
Expand Down
8 changes: 5 additions & 3 deletions templates/admin/accounting/quotation/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
</th>
<th data-tf-filter-type="input">Ville</th>
<th data-tf-filter-type="input">Ref client</th>
<th data-tf-filter-type="input">Numero devis</th>
<th data-tf-filter-type="input"class="right aligned">Prix</th>
<th data-tf-filter-type="input">Numéro devis</th>
<th data-tf-filter-type="input" class="right aligned">
Montant{% if isSubjectedToVat %} HT{% endif %}
</th>
<th data-tf-filter-type="select" class="center aligned">Facturé ?</th>
<th>&nbsp;</th>
</tr>
Expand All @@ -42,7 +44,7 @@
<tr class="{% if loop.index is odd %}odd{% else %}even{% endif %}">
<td nowrap="nowrap">{{ line.quotationDate|format_date('short') }}</td>
<td>{{ line.company }}</td>
<td width="250">{{ line.city }}</td>
<td>{{ line.city }}</td>
<td>{{ line.refClt1 }}</td>
<td>{{ line.quotationNumber }}</td>
<td class="right aligned">{{ line.price|number_format(2, ',', ' ') }}</td>
Expand Down
Loading