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
43 changes: 36 additions & 7 deletions db/seeds/Inscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,23 @@ public function run(): void
'member_type' => MemberType::MemberPhysical->value,
'etat' => Ticket::STATUS_CANCELLED,
],
[
'date' => time(),
'reference' => 'REF-TEST-008',
'type_inscription' => Ticket::TYPE_ORGANIZATION,
'montant' => $GLOBALS['AFUP_Tarifs_Forum'][Ticket::TYPE_ORGANIZATION],
'civilite' => 'Mme',
'nom' => 'Super',
'prenom' => 'Bénévole',
'email' => '[email protected]',
'telephone' => '0601020305',
'citer_societe' => '0',
'newsletter_afup' => '1',
'newsletter_nexen' => '0',
'id_forum' => Event::ID_FORUM,
'member_type' => MemberType::MemberPhysical->value,
'etat' => Ticket::STATUS_GUEST,
],
];

$table = $this->table('afup_inscription_forum');
Expand Down Expand Up @@ -161,7 +178,7 @@ public function run(): void
'autorisation' => 'otzbfksgve',
'transaction' => 'taedsken',
'etat' => Ticket::STATUS_PAID,
'facturation' => 0,
'facturation' => Ticket::INVOICE_TODO,
'id_forum' => Event::ID_FORUM,
'date_facture' => time(),
],
Expand All @@ -180,7 +197,7 @@ public function run(): void
'autorisation' => 'otzbfksgvz',
'transaction' => 'taedskem',
'etat' => Ticket::STATUS_PAID,
'facturation' => 1,
'facturation' => Ticket::INVOICE_SENT,
'id_forum' => Event::ID_FORUM,
'date_facture' => (new \DateTime("2023-06-25"))->getTimestamp(),
],
Expand All @@ -199,7 +216,7 @@ public function run(): void
'autorisation' => 'ozzbfksgvz',
'transaction' => 'yaedskem',
'etat' => Ticket::STATUS_PAID,
'facturation' => 1,
'facturation' => Ticket::INVOICE_SENT,
'id_forum' => Event::ID_FORUM,
'date_facture' => (new \DateTime("2024-01-02"))->getTimestamp(),
],
Expand All @@ -218,7 +235,7 @@ public function run(): void
'autorisation' => 'ozzbfksgvz',
'transaction' => 'yaedskem',
'etat' => Ticket::STATUS_PAID,
'facturation' => 1,
'facturation' => Ticket::INVOICE_SENT,
'id_forum' => Event::ID_FORUM,
'date_facture' => (new \DateTime("2024-01-02"))->getTimestamp(),
],
Expand All @@ -237,7 +254,7 @@ public function run(): void
'autorisation' => 'ozzbfksgvz',
'transaction' => 'yaedskem',
'etat' => Ticket::STATUS_PAID,
'facturation' => 1,
'facturation' => Ticket::INVOICE_SENT,
'id_forum' => Event::ID_FORUM,
'date_facture' => (new \DateTime("2024-01-02"))->getTimestamp(),
],
Expand All @@ -256,7 +273,7 @@ public function run(): void
'autorisation' => 'ozzbfksgvz',
'transaction' => 'yaedskem',
'etat' => Ticket::STATUS_PAID,
'facturation' => 1,
'facturation' => Ticket::INVOICE_SENT,
'id_forum' => Event::ID_FORUM,
'date_facture' => (new \DateTime("2024-01-02"))->getTimestamp(),
],
Expand All @@ -275,7 +292,19 @@ public function run(): void
'autorisation' => 'otzbfksgve',
'transaction' => 'taedsken',
'etat' => Ticket::STATUS_CANCELLED,
'facturation' => 0,
'facturation' => Ticket::INVOICE_TODO,
'id_forum' => Event::ID_FORUM,
'date_facture' => time(),
],
[
'reference' => 'REF-TEST-008',
'montant' => $GLOBALS['AFUP_Tarifs_Forum'][Ticket::TYPE_ORGANIZATION],
'date_reglement' => time(),
'type_reglement' => Ticket::PAYMENT_NONE,
'societe' => 'AFUP',
'adresse' => '',
'etat' => Ticket::STATUS_CANCELLED,
'facturation' => Ticket::INVOICE_TODO,
'id_forum' => Event::ID_FORUM,
'date_facture' => time(),
],
Expand Down
11 changes: 11 additions & 0 deletions db/seeds/Tarif.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ public function run(): void
'day' => 'one,two',
'cfp_submitter_only' => 1,
],
[
'id' => 9,
'technical_name' => 'AFUP_FORUM_ORGANISATION',
'pretty_name' => 'Organisation',
'public' => false,
'members_only' => false,
'default_price' => 0,
'active' => true,
'day' => 'one,two',
'cfp_submitter_only' => false,
],
[
'id' => 108,
'technical_name' => 'AFUP_FORUM_SPECIAL_PRICE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function getByEvent(Event $event): CollectionInterface
*/
public function getByEventWithAll(Event $event, ?string $search, ?string $sortKey, ?string $sortDirection): array
{
$sql = 'SELECT ticket.*, aff.*, aft.*,
$sql = 'SELECT ticket.*, aff.*, aft.*, afto.*,
CASE WHEN ticket.id_member IS NOT NULL
THEN (SELECT MAX(ac.date_fin) AS last_subscription
FROM afup_cotisations ac
Expand All @@ -203,6 +203,7 @@ public function getByEventWithAll(Event $event, ?string $search, ?string $sortKe
LEFT JOIN afup_facturation_forum aff ON ticket.reference = aff.reference
LEFT JOIN afup_forum_tarif_event afte ON afte.id_tarif = ticket.type_inscription AND afte.id_event = ticket.id_forum
LEFT JOIN afup_forum_tarif aft ON aft.id = afte.id_tarif
LEFT JOIN afup_forum_tarif afto ON afto.id = ticket.type_inscription
WHERE %s
ORDER BY %s';

Expand Down Expand Up @@ -234,7 +235,7 @@ public function getByEventWithAll(Event $event, ?string $search, ?string $sortKe
foreach ($result as $row) {
$aggregates[] = new TicketAggregate(
$row['ticket'],
$row['aft'],
$row['aft'] ?? $row['afto'],
$row['aff'],
$row[0]->last_subscription ? new \DateTimeImmutable('@' . $row[0]->last_subscription) : null,
);
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/event/ticket/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<span class="ui label">n/a</span>
{% endif %}
</td>
<td>
<td nowrap="nowrap">
<a href="/pages/administration/index.php?page=forum_inscriptions&amp;action=modifier&amp;id={{ a.ticket.id }}"
data-position="left center"
data-tooltip="Modifier la fiche de {{ a.ticket.label }}"
Expand Down
5 changes: 3 additions & 2 deletions tests/behat/features/Admin/Events/Inscriptions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Feature: Administration - Évènements - Inscriptions
And I should see "2 Jours 250 € 3 3 3 750 € 494"
And I should see "2 Jours AFUP 15 € 3 3 3 45 € 494"
And I should see "Inscrits Confirmés En attente de règlement"
And I should see "Jour 1 6 6 0"
And I should see "Jour 2 6 6 0"
And I should see "Jour 1 7 7 0"
And I should see "Jour 2 7 7 0"

@reloadDbWithTestData
Scenario: Accès à la liste des inscriptions
Expand All @@ -21,6 +21,7 @@ Feature: Administration - Évènements - Inscriptions
And I should see "Personne Paul 2 Jours AFUP Réglé CB OK"
And I should see "Maurice Jean 2 Jours AFUP Réglé CB Expiré le 08/07/2019 URL Paiement"
And I should see "Annulé Lepaiement 2 Jours Annulé CB n/a"
And I should see "Super Bénévole AFUP Organisation Invité n/a"
And I should see "Kirk James Tiberius 2 Jours Réglé VIR n/a"
And I should see "Sans Cotisation 2 Jours AFUP Réglé CB Non trouvée"

Expand Down
Loading