Skip to content

Commit

Permalink
afup#1416 afup
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Jan 11, 2024
1 parent d44c6ba commit 865ec5c
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 109 deletions.
3 changes: 0 additions & 3 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,6 @@ parameters:
niveau: 'ROLE_ADMIN'
icon: "tag"
elements:
configuration:
nom: 'Configuration du site'
niveau: 'ROLE_ADMIN'
membre_administrateur:
nom: 'Administrateurs du site'
niveau: 'ROLE_ADMIN'
Expand Down
8 changes: 0 additions & 8 deletions configs/application/config-test.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<?php
$configuration['web']['path']='/';

$configuration['afup']['raison_sociale']='AFUP';
$configuration['afup']['adresse']='32, Boulevard de Strasbourg
CS 30108';
$configuration['afup']['code_postal']='75468';
$configuration['afup']['ville']='Paris Cedex 10';
$configuration['afup']['email']='bureau@afup.org';
$configuration['afup']['siret']='500 869 011 00014';
$configuration['afup']['numero_tva']='NUMERO_A_AJOUTER';
$configuration['rib']['etablissement']='10278';
$configuration['rib']['guichet']='06076';
$configuration['rib']['compte']='00020707701';
Expand Down
8 changes: 0 additions & 8 deletions configs/application/config.php.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<?php
$configuration['web']['path']='http://.dev/';

$configuration['afup']['raison_sociale']='AFUP';
$configuration['afup']['adresse']='32, Boulevard de Strasbourg
CS 30108';
$configuration['afup']['code_postal']='75468';
$configuration['afup']['ville']='Paris Cedex 10';
$configuration['afup']['email']='bureau@afup.org';
$configuration['afup']['siret']='500 869 011 00014';
$configuration['afup']['numero_tva']='NUMERO_A_AJOUTER';
$configuration['rib']['etablissement']='10278';
$configuration['rib']['guichet']='06076';
$configuration['rib']['compte']='00020707701';
Expand Down
8 changes: 0 additions & 8 deletions configs/application/config.php.dist-docker
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<?php
$configuration['web']['path']='/';

$configuration['afup']['raison_sociale']='AFUP';
$configuration['afup']['adresse']='32, Boulevard de Strasbourg
CS 30108';
$configuration['afup']['code_postal']='75468';
$configuration['afup']['ville']='Paris Cedex 10';
$configuration['afup']['email']='bureau@afup.org';
$configuration['afup']['siret']='500 869 011 00014';
$configuration['afup']['numero_tva']='NUMERO_A_AJOUTER';
$configuration['rib']['etablissement']='10278';
$configuration['rib']['guichet']='06076';
$configuration['rib']['compte']='00020707701';
Expand Down
43 changes: 0 additions & 43 deletions htdocs/pages/administration/configuration.php

This file was deleted.

6 changes: 3 additions & 3 deletions sources/Afup/Association/Cotisations.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,9 @@ public function envoyerFacture($id_cotisation, Mailer $mailer, UserRepository $u
$corps .= "<p>Veuillez trouver ci-joint la facture correspondant à votre adhésion à l'AFUP.</p>";
$corps .= "<p>Nous restons à votre disposition pour toute demande complémentaire.</p>";
$corps .= "<p>Le bureau</p>";
$corps .= $configuration->obtenir('afup|raison_sociale') . "<br />";
$corps .= $configuration->obtenir('afup|adresse') . "<br />";
$corps .= $configuration->obtenir('afup|code_postal') . " " . $configuration->obtenir('afup|ville') . "<br />";
$corps .= AFUP_RAISON_SOCIALE . "<br />";
$corps .= AFUP_ADRESSE . "<br />";
$corps .= AFUP_CODE_POSTAL . " " . AFUP_VILLE . "<br />";

$cheminFacture = AFUP_CHEMIN_RACINE . 'cache/fact' . $id_cotisation . '.pdf';
$numeroFacture = $this->genererFacture($id_cotisation, $cheminFacture);
Expand Down
8 changes: 8 additions & 0 deletions sources/Afup/Bootstrap/commonStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
define('AFUP_COTISATION_PERSONNE_MORALE', 150);
define('AFUP_PERSONNE_MORALE_SEUIL', 3);

define('AFUP_RAISON_SOCIALE', 'AFUP');
define('AFUP_ADRESSE', "32, Boulevard de Strasbourg\nCS 30108");
define('AFUP_CODE_POSTAL', '75468');
define('AFUP_VILLE', 'Paris Cedex 10');
define('AFUP_EMAIL', 'bureau@afup.org');
define('AFUP_SIRET', '500 869 011 00014');
define('AFUP_NUMERO_TVA', 'NUMERO_A_AJOUTER');

$AFUP_Tarifs_Forum = array(
AFUP_FORUM_INVITATION => 0,
AFUP_FORUM_ORGANISATION => 0,
Expand Down
6 changes: 3 additions & 3 deletions sources/Afup/Comptabilite/Facture.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,9 @@ function envoyerFacture($reference)
$corps .= "Veuillez trouver ci-joint la facture correspondant à la participation au forum organisé par l'AFUP.\n";
$corps .= "Nous restons à votre disposition pour toute demande complémentaire.\n\n";
$corps .= "Le bureau\n\n";
$corps .= $configuration->obtenir('afup|raison_sociale') . "\n";
$corps .= $configuration->obtenir('afup|adresse') . "\n";
$corps .= $configuration->obtenir('afup|code_postal') . " " . $configuration->obtenir('afup|ville') . "\n";
$corps .= AFUP_RAISON_SOCIALE . "\n";
$corps .= AFUP_ADRESSE . "\n";
$corps .= AFUP_CODE_POSTAL . " " . AFUP_VILLE . "\n";

$chemin_facture = AFUP_CHEMIN_RACINE . 'cache' . DIRECTORY_SEPARATOR . 'fact' . $reference . '.pdf';
$this->genererFacture($reference, $chemin_facture);
Expand Down
6 changes: 3 additions & 3 deletions sources/Afup/Forum/Facturation.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,9 @@ function envoyerFacture($reference, $copyTresorier = true, $facturer = true)
);
$mailer = Mail::createMailer();
$mailer->renderTemplate($message,'mail_templates/facture-forum.html.twig', [
'raison_sociale' => $configuration->obtenir('afup|raison_sociale'),
'adresse' => $configuration->obtenir('afup|adresse'),
'ville' => $configuration->obtenir('afup|code_postal').' '.$configuration->obtenir('afup|ville'),
'raison_sociale' => AFUP_RAISON_SOCIALE,
'adresse' => AFUP_ADRESSE,
'ville' => AFUP_CODE_POSTAL.' '.AFUP_VILLE,
]);
$message->addAttachment(new Attachment(
$cheminFacture,
Expand Down
22 changes: 11 additions & 11 deletions sources/Afup/Utils/PDF_Facture.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,28 @@ public function header()
$this->SetFont('Arial', 'B', 20);
$this->Cell(130, 5, 'AFUP');
$this->SetFont('Arial', '', 12);
$this->Cell(60, 5, $this->configuration->obtenir('afup|raison_sociale'));
$this->Cell(60, 5, AFUP_RAISON_SOCIALE);
$this->Ln();
$this->SetFont('Arial', '', 10);
$this->Cell(130, 5, utf8_decode('Association Française des Utilisateurs de PHP'));
$yFinAdresse = $this->GetY();


$this->SetFont('Arial', '', 12);
$this->MultiCell(60, 5, utf8_decode($this->configuration->obtenir('afup|adresse')));
$this->MultiCell(60, 5, utf8_decode(AFUP_ADRESSE));
$this->Ln();
$this->SetFont('Arial', '', 10);
$this->Cell(130, 5, 'https://afup.org');
$this->Ln();
$this->Ln();
$this->Cell(130, 5, 'SIRET : ' . $this->configuration->obtenir('afup|siret'));
$this->Cell(130, 5, 'SIRET : ' . AFUP_SIRET);
$this->SetFont('Arial', '', 12);
$this->SetY($yFinAdresse);
$this->Ln();
$this->Cell(60, 5, $this->configuration->obtenir('afup|code_postal') . ' ' . utf8_decode($this->configuration->obtenir('afup|ville')));
$this->Cell(60, 5, AFUP_CODE_POSTAL . ' ' . utf8_decode(AFUP_VILLE));
$this->Ln();
$this->Cell(130, 5);
$this->Cell(60, 5, 'Email : ' . $this->configuration->obtenir('afup|email'));
$this->Cell(60, 5, 'Email : ' . AFUP_EMAIL);

$this->Ln();
$this->Ln();
Expand Down Expand Up @@ -125,10 +125,10 @@ function Footer()
{
$address = sprintf(
'%s - %u %s - %s - %s',
$this->configuration->obtenir('afup|adresse'),
$this->configuration->obtenir('afup|code_postal'),
$this->configuration->obtenir('afup|ville'),
$this->configuration->obtenir('afup|email'),
AFUP_ADRESSE,
AFUP_CODE_POSTAL,
AFUP_VILLE,
AFUP_EMAIL,
'https://afup.org'
);

Expand All @@ -143,7 +143,7 @@ function Footer()
$this->SetFont('Arial', 'B', 6);
$this->Cell(170, 3, utf8_decode('') . ' SIRET', 0, 0, 'C');
$this->SetFont('Arial', null, 6);
$this->Cell(-140, 3, $this->configuration->obtenir('afup|siret'), 0, 0, 'C');
$this->Cell(-140, 3, AFUP_SIRET, 0, 0, 'C');
$this->Ln();

$this->SetFont('Arial', 'B', 6);
Expand Down Expand Up @@ -184,7 +184,7 @@ function Footer()
$this->SetFont('Arial', 'B', 6);
$this->Cell(145, 3, utf8_decode('Numéro de TVA intracommunautaire'), 0, 0, 'C');
$this->SetFont('Arial', null, 6);
$this->Cell(-60, 3, $this->configuration->obtenir('afup|numero_tva'), 0, 0, 'C');
$this->Cell(-60, 3, AFUP_NUMERO_TVA, 0, 0, 'C');
}

$this->Ln();
Expand Down
19 changes: 0 additions & 19 deletions tests/behat/features/Admin/Divers/Configuration.feature

This file was deleted.

0 comments on commit 865ec5c

Please sign in to comment.