Force reçu-cotis à rentrer dans les cases + style pdf

This commit is contained in:
Noizette 2020-10-24 22:06:16 +02:00
parent a7b73bf356
commit 5a9c498eee
11 changed files with 691 additions and 62 deletions

View file

@ -322,54 +322,139 @@ elseif ($f->type_facture == 3)
ob_start();
$doc = 'Reçu n°'.$f->numero;
$emission = date('d/m/Y' ,$f->date_emission);
$emission = date('d/m/Y',$f->date_emission);
$pdf->SetTitle($doc.' - '.$emission);
$asso =
// 'Émis par :<br><br>'.
'<b>'.$config->get('nom_asso')."</b><br>".
str_replace("\n", '<br>', $config->get('adresse_asso'))."<br>".
(($t = $plugin->getConfig('rna_asso'))?"RNA : $t<br>":'').
(($t = $plugin->getConfig('siret_asso'))?"SIRET : $t<br>":'').
(($t = $config->get('email_asso'))?"Email : $t<br>":'').
(($t = $config->get('site_asso'))?"Site web : $t<br>":'');
// 'Émis par :<br><br>'.
'<b>'.$config->get('nom_asso')."</b><br>".
str_replace("\n", '<br>', $config->get('adresse_asso'))."<br>".
(($t = $plugin->getConfig('rna_asso'))?"RNA : $t<br>":'').
(($t = $plugin->getConfig('siret_asso'))?"SIRET : $t<br>":'').
(($t = $config->get('email_asso'))?"Email : $t<br>":'').
(($t = $config->get('site_asso'))?"Site web : $t<br>":'');
$receveur =
'Adressé à :<br><br>'.
'<b>'.$c->identite.'</b><br>'.
$c->adresse."<br>".
$c->code_postal.' '.$c->ville."<br>".
(($t = $c->email)?"Email : $t<br>":'').
(($t = $c->telephone)?"Tel : $t<br>":'');
'Adressé à :<br><br>'.
'<b>'.$c->identite.'</b><br>'.
$c->adresse."<br>".
$c->code_postal.' '.$c->ville."<br>".
(($t = $c->email)?"Email : $t<br>":'').
(($t = $c->telephone)?"Tel : $t<br>":'');
$total = number_format($f->total, 2, ',', ' ');
$echeance = date('d/m/Y' ,$f->date_echeance);
$footer = str_replace("\n", '<br>', $plugin->getConfig('footer'));
$lieu = $plugin->getConfig('ville_asso');
$intitule = $f->contenu['intitule'];
$souscription = date('d/m/Y', strtotime($f->contenu['souscription']));
if($f->contenu['expiration'] == '1970-01-01')
{
$expiration = "jour même, s'agissant d'une cotisation ponctuelle.";
}
else {
$expiration = date('d/m/Y', strtotime($f->contenu['expiration']));
}
echo <<<EOF
$doc
<!-- STYLE -->
<style>
.titre {
text-align: center;
font-size: 8pt;
position: absolute;
top: 6mm;
width: 180mm;
}
.h2 {
margin: 25 20 0 20;
}
.h2 span {
font-weight: bold;
font-size: 15pt;
}
hr {
margin: 5 0 20 0;
}
.adressage {
font-size: 11pt;
}
.adressage td {
width: 95mm;
vertical-align: top;
}
.contenu td, .contenu th {
vertical-align: top;
padding: 8 10;
margin : 0;
border-collapse: collapse;
}
.contenu tr th, .contenu tr td {
text-align: right;
width: 16%;
}
.contenu tr td:nth-child(1), .contenu tr th:nth-child(1) {
text-align: left;
width: 84%;
}
.contenu thead tr, .contenu tfoot tr {
background-color: #CCE;
border: 10px solid black;
}
.contenu tbody tr:nth-child(even) {
background-color: #DDF;
}
footer {
position: absolute;
bottom: 0;
margin: 14mm 0;
}
</style>
<!-- CONTENU -->
<br>
<p class="titre">
$doc - Émis le $emission
</p>
<table class="adressage">
<tr>
<td>$asso</td>
<td>$receveur</td>
</tr>
</table>
<br>
<div class="h2">
<span>Reçu de votre cotisation</span> - $doc
</div>
<hr>
<br><br>
$asso
Bonjour,
<br><br>
$receveur
<br><br>
À $lieu, le $echeance,
À $lieu, le $emission,
<br><br>
Nous accusons réception de votre cotisation reçue le $emission et nous vous en remercions.
Nous accusons réception de votre cotisation « $intitule » reçue le $emission et nous vous en remercions.
<br><br>
Nous reconnaissons que vous avez acquitté la somme de $total par $moyen_paiement .
<br>
Votre adhésion sera donc effective à compter du DATE?? jusquau DATE??.
Votre adhésion sera donc effective à compter du $souscription jusquau $expiration.
<br><br><br>
Nous vous prions de recevoir, chère adhérente, cher adhérent, nos meilleures salutations,
<br><br>
Moi JE Chef
<br><br><br>
Nous vous rappelons que la cotisation nest pas soumise à la TVA et quelle ne donne pas lieu à la délivrance dune facture. Elle nouvre pas droit au bénéfice des dispositions des articles 200, 238 bis et 885-0 V bis A du code général des impôts.
-représentant·e de l'asso-
<br><br><br>
<i>Nous vous rappelons que la cotisation nest pas soumise à la TVA et quelle ne donne pas lieu à la délivrance dune facture. Elle nouvre pas droit au bénéfice des dispositions des articles 200, 238 bis et 885-0 V bis A du code général des impôts.</i>
EOF;
$html = ob_get_clean();