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
3 changes: 2 additions & 1 deletion templates/admin/accounting/search.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@
<td>{{ invoice.transaction }}</td>
<td>{{ invoice.forum_titre }}</td>
<td class="right aligned">
<a href="/pages/administration/index.php?page=forum_facturation&amp;action=telecharger_facture&amp;ref={{ invoice.reference }}"
<a href="{{ url('admin_event_factures_download_facture', {'ref': invoice.reference}) }}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tu penses que tu peux ajouter (ou compléter) un test fonctionnel pour valider le lien de téléchargement ?

class="compact ui icon button"
id="telecharger_{{ invoice.reference }}"
>
<i class="file pdf icon"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/event/ticket/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</p>
{% if invoice is defined %}
<p>
<a href="/pages/administration/index.php?page=forum_facturation&id_forum={{ event.id }}&filtre={{ invoice.reference }}">Rechercher la facture</a>
<a href="{{ url('admin_accounting_search', {'search': {'query': invoice.reference}}) }}">Rechercher la facture</a>
</p>
{% endif %}
{{ form_row(form.invoice.reference) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ Feature: Administration - Trésorerie - Recherche comptable
And the "h2.ui.header" element should contain "Cotisations de personnes physiques"
And I should see "13/07/2018 >"
And I should see "25.00 Paul Personne <paul.personne@mycorp.fr> @paul"

@reloadDbWithTestData
Scenario: Télécharger une facture Forum depuis la recherche comptable
Given I am logged in as admin and on the Administration
When I follow "Recherche comptable"
Then the ".content h2" element should contain "Recherche comptable"
When I fill in "search[query]" with "Helios Aerospace"
And I press "Rechercher"
Then the "h2.ui.header" element should contain "Factures Forum"
And the ".content table" element should contain "REF-TEST-001"
And the ".content table" element should contain "Helios Aerospace"
When I follow "telecharger_REF-TEST-001"
Then the response header "Content-disposition" should match '#attachment; filename="Facture - Helios Aerospace - (.*).pdf"#'
Loading