2019-11-02 17:53:27 +01:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Garradin;
|
|
|
|
|
|
|
|
|
|
require_once __DIR__ . '/_inc.php';
|
|
|
|
|
require_once PLUGIN_ROOT . '/lib/MPDF/vendor/autoload.php';
|
|
|
|
|
|
2021-04-11 14:25:59 +02:00
|
|
|
|
$session->requireAccess($session::SECTION_ACCOUNTING, $session::ACCESS_READ);
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
|
|
$membres = new Membres;
|
|
|
|
|
|
|
|
|
|
qv(['id' => 'required|numeric']);
|
|
|
|
|
$id = (int) qg('id');
|
|
|
|
|
|
2020-10-24 08:35:00 +02:00
|
|
|
|
if (!$f = $facture->get($id))
|
2019-11-02 17:53:27 +01:00
|
|
|
|
{
|
|
|
|
|
throw new UserException("Ce document n'existe pas.");
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$moyen_paiement = $facture->getMoyenPaiement($f->moyen_paiement);
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if ($f->receveur_membre)
|
|
|
|
|
{
|
|
|
|
|
$c = $membres->get($f->receveur_id);
|
2020-10-24 09:19:21 +02:00
|
|
|
|
$c->identite = $c->$identite;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
foreach(['ville','code_postal','adresse'] as $v)
|
|
|
|
|
{
|
|
|
|
|
if($c->$v == '')
|
|
|
|
|
{
|
|
|
|
|
$c->$v = '[A RENSEIGNER DANS LA FICHE MEMBRE]';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$c = $client->get($f->receveur_id);
|
2020-10-24 09:19:21 +02:00
|
|
|
|
$c->identite = $c->nom;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(UserException $e)
|
|
|
|
|
{
|
2020-10-24 09:19:21 +02:00
|
|
|
|
$form->addError($e);
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
|
// Création du PDF
|
|
|
|
|
|
|
|
|
|
$pdf = new \Mpdf\Mpdf([
|
|
|
|
|
'default_font_size' => 10,
|
2019-11-03 17:51:31 +01:00
|
|
|
|
'default_font' => 'dejavusans',
|
2019-11-02 17:53:27 +01:00
|
|
|
|
]);
|
|
|
|
|
$pdf->SetAuthor($config->get('nom_asso'));
|
|
|
|
|
|
|
|
|
|
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$emission = $f->date_emission->format('d/m/Y');
|
|
|
|
|
if (isset($f->date_echeance))
|
|
|
|
|
{
|
|
|
|
|
$echeance = $f->date_echeance->format('d/m/Y');
|
|
|
|
|
}
|
2020-10-24 08:35:00 +02:00
|
|
|
|
// Génération factures et devis
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
2020-10-24 08:35:00 +02:00
|
|
|
|
if ($f->type_facture < 2)
|
|
|
|
|
{
|
|
|
|
|
ob_start();
|
|
|
|
|
|
|
|
|
|
$doc = ($f->type_facture?'Facture':'Devis').' n°'.$f->numero;
|
|
|
|
|
$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>":'');
|
|
|
|
|
|
|
|
|
|
$receveur =
|
|
|
|
|
'Adressé à :<br><br>'.
|
2020-10-24 09:19:21 +02:00
|
|
|
|
'<b>'.$c->identite.'</b><br>'.
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$c->adresse."<br>".
|
|
|
|
|
$c->code_postal.' '.$c->ville."<br>".
|
|
|
|
|
(($t = $c->email)?"Email : $t<br>":'').
|
|
|
|
|
(($t = $c->telephone)?"Tel : $t<br>":'');
|
|
|
|
|
|
2021-11-06 21:23:49 +01:00
|
|
|
|
$total = Utils::money_format($f->total, ',', ' ');
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$echeance = ($f->type_facture?'Échéance de paiement':'Échéance du devis')." : ".$echeance;
|
|
|
|
|
$reglee = !$f->reglee?'Cette facture est en attente de règlement.':'Cette facture a été reglée.';
|
|
|
|
|
$footer = str_replace("\n", '<br>', $plugin->getConfig('footer'));
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo <<<EOF
|
|
|
|
|
<!-- STYLE -->
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.titre {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 8pt;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 6mm;
|
|
|
|
|
width: 180mm;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.h2 {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
margin: 25 20 0 20;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.h2 span {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 15pt;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
hr {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
margin: 5 0 20 0;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.adressage {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
font-size: 11pt;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.adressage td {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
width: 95mm;
|
|
|
|
|
vertical-align: top;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-06 21:23:49 +01:00
|
|
|
|
.contenu {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
|
.contenu td, .contenu th {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
vertical-align: top;
|
|
|
|
|
padding: 8 10;
|
|
|
|
|
margin : 0;
|
|
|
|
|
border-collapse: collapse;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.contenu tr th, .contenu tr td {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
text-align: right;
|
|
|
|
|
width: 16%;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.contenu tr td:nth-child(1), .contenu tr th:nth-child(1) {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
text-align: left;
|
|
|
|
|
width: 84%;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.contenu thead tr, .contenu tfoot tr {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
background-color: #CCE;
|
|
|
|
|
border: 10px solid black;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
.contenu tbody tr:nth-child(even) {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
background-color: #DDF;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
footer {
|
2019-11-03 17:51:31 +01:00
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
margin: 14mm 0;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<!-- CONTENU -->
|
|
|
|
|
|
|
|
|
|
<p class="titre">
|
|
|
|
|
$doc - Émis le $emission
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<table class="adressage">
|
|
|
|
|
<tr>
|
2019-11-03 17:51:31 +01:00
|
|
|
|
<td>$asso</td>
|
|
|
|
|
<td>$receveur</td>
|
2019-11-02 17:53:27 +01:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<div class="h2">
|
|
|
|
|
<span>Contenu</span> - $doc
|
|
|
|
|
</div>
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
<table class="contenu">
|
|
|
|
|
<thead>
|
2019-11-03 17:51:31 +01:00
|
|
|
|
<tr>
|
|
|
|
|
<th>
|
|
|
|
|
Désignations
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
Prix
|
|
|
|
|
</th>
|
|
|
|
|
</tr>
|
2019-11-02 17:53:27 +01:00
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
EOF;
|
|
|
|
|
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$i = 1;
|
|
|
|
|
foreach($f->contenu as $k=>$v)
|
|
|
|
|
{
|
|
|
|
|
echo '<tr><td>';
|
|
|
|
|
echo str_replace("\n", '<br>', $v['designation']);
|
|
|
|
|
echo '</td><td>';
|
2021-11-06 21:23:49 +01:00
|
|
|
|
echo Utils::money_format($v['prix'], ',', ' ') .' €';
|
2020-10-24 08:35:00 +02:00
|
|
|
|
echo '</td></tr>';
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
|
|
|
|
echo <<<EOF
|
|
|
|
|
</tbody>
|
|
|
|
|
<tfoot>
|
2019-11-03 17:51:31 +01:00
|
|
|
|
<tr>
|
|
|
|
|
<td><h3>Total</h3>Net à payer</td>
|
2021-11-06 21:23:49 +01:00
|
|
|
|
<td><b>$total €</b><br>(HT)</td>
|
2019-11-03 17:51:31 +01:00
|
|
|
|
</tr>
|
2019-11-02 17:53:27 +01:00
|
|
|
|
</tfoot>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
|
<div class="h2"><span>Détails</span></div>
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
$echeance <br>
|
|
|
|
|
$reglee
|
|
|
|
|
Moyen de paiement : $moyen_paiement
|
|
|
|
|
|
|
|
|
|
<p>
|
2019-11-03 17:51:31 +01:00
|
|
|
|
$footer
|
2019-11-02 17:53:27 +01:00
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
EOF;
|
|
|
|
|
|
|
|
|
|
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$html = ob_get_clean();
|
|
|
|
|
$pdf->WriteHTML($html);
|
|
|
|
|
|
|
|
|
|
} // End if facture+devis
|
2021-11-06 21:23:49 +01:00
|
|
|
|
elseif ($f->type_facture == CERFA)
|
2020-10-24 08:35:00 +02:00
|
|
|
|
{
|
2020-10-24 09:19:21 +02:00
|
|
|
|
// nom prénom ? pas de champs prénoms / champs identité pour membres
|
2020-10-24 08:35:00 +02:00
|
|
|
|
// date d'émission = date du don
|
|
|
|
|
// date d'échéance = date d'édition du reçu
|
|
|
|
|
|
|
|
|
|
$pdf->AddPage();
|
|
|
|
|
$pdf->setSourceFile(PLUGIN_ROOT . '/data/11580-03.pdf');
|
|
|
|
|
$pdf->useTemplate(
|
|
|
|
|
$pdf->importPage(1)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$pdf->SetTextColor(0);
|
|
|
|
|
$pdf->WriteText(180, 18, $f->numero);
|
|
|
|
|
$pdf->WriteText(20, 43, $config->get('nom_asso'));
|
2020-10-25 00:29:11 +02:00
|
|
|
|
$pdf->WriteText(25, 54, $plugin->getConfig('numero_rue_asso'));
|
|
|
|
|
$pdf->WriteText(43, 54, $plugin->getConfig('rue_asso'));
|
|
|
|
|
$pdf->WriteText(39, 59, $plugin->getConfig('cp_asso'));
|
|
|
|
|
$pdf->WriteText(74, 59, $plugin->getConfig('ville_asso'));
|
|
|
|
|
$pdf->WriteText(20, 70, $plugin->getConfig('objet_0'));
|
|
|
|
|
$pdf->WriteText(20, 74, $plugin->getConfig('objet_1'));
|
|
|
|
|
$pdf->WriteText(20, 78, $plugin->getConfig('objet_2'));
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$pdf->WriteText(19.9, 136, "X");
|
|
|
|
|
|
|
|
|
|
$pdf->AddPage();
|
|
|
|
|
$pdf->useTemplate(
|
|
|
|
|
$pdf->importPage(2)
|
|
|
|
|
);
|
|
|
|
|
|
2020-10-24 09:19:21 +02:00
|
|
|
|
$pdf->WriteText(80, 26, $c->identite); // Nom + prénoms centrés ?
|
2020-10-24 08:35:00 +02:00
|
|
|
|
// $pdf->WriteText(22, 26, $c->nom); // Nom
|
|
|
|
|
// $pdf->WriteText(110, 26, $c->nom); // Prénoms
|
|
|
|
|
$pdf->WriteText(22, 39, $c->adresse);
|
|
|
|
|
$pdf->WriteText(41, 45, $c->code_postal);
|
|
|
|
|
$pdf->WriteText(81, 45, $c->ville);
|
|
|
|
|
$pdf->WriteText(90, 70, utf8_decode("***".$f->total."***"));
|
|
|
|
|
// numfmt a l'air de patauger avec des valeurs < 1
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$pdf->WriteText(62, 80, numfmt_create('fr_FR', \NumberFormatter::SPELLOUT)->format($f->total) . ' euros');
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$pdf->WriteText(73, 89.5, utf8_decode($f->date_emission->format('d')));
|
|
|
|
|
$pdf->WriteText(84, 89.5, utf8_decode($f->date_emission->format('m')));
|
|
|
|
|
$pdf->WriteText(100, 89.5, utf8_decode($f->date_emission->format('Y')));
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
|
|
|
|
if($plugin->getConfig('droit_art200')){
|
|
|
|
|
$pdf->WriteText(57.5, 103.5, "X");
|
|
|
|
|
}
|
|
|
|
|
if($plugin->getConfig('droit_art238bis')){
|
|
|
|
|
$pdf->WriteText(107.6, 103.5, "X");
|
|
|
|
|
}
|
|
|
|
|
if($plugin->getConfig('droit_art885-0VbisA')){
|
|
|
|
|
$pdf->WriteText(157.7, 103.5, "X");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Forme du don
|
|
|
|
|
$pdf->WriteText(119.9, 121.2, "X");
|
|
|
|
|
// Nature du don
|
|
|
|
|
$pdf->WriteText(20, 143.6, "X");
|
|
|
|
|
|
|
|
|
|
switch ($f->moyen_paiement){
|
|
|
|
|
case 'ES':
|
|
|
|
|
$pdf->WriteText(19.9, 165.9, "X");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'CH':
|
|
|
|
|
$pdf->WriteText(62.6, 165.9, "X");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
$pdf->WriteText(119.9, 165.9, "X");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Date d'édition du document
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$pdf->WriteText(144.4, 246.2, utf8_decode($f->date_echeance->format('d')));
|
|
|
|
|
$pdf->WriteText(152.2, 246.2, utf8_decode($f->date_echeance->format('m')));
|
|
|
|
|
$pdf->WriteText(160, 246.2, utf8_decode($f->date_echeance->format('Y')));
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
|
|
|
|
// Signature
|
2021-04-11 14:25:59 +02:00
|
|
|
|
/*
|
2020-10-24 08:35:00 +02:00
|
|
|
|
$img = new Fichiers($plugin->getConfig('signaturetxt'));
|
|
|
|
|
$cache_id = 'fichiers.' . $img->id_contenu;
|
|
|
|
|
if (!Static_Cache::exists($cache_id))
|
|
|
|
|
{
|
|
|
|
|
$blob = DB::getInstance()->openBlob('fichiers_contenu', 'contenu', (int)$img->id_contenu);
|
|
|
|
|
Static_Cache::storeFromPointer($cache_id, $blob);
|
|
|
|
|
fclose($blob);
|
|
|
|
|
}
|
|
|
|
|
$uri = Static_Cache::getPath($cache_id);
|
|
|
|
|
$pdf->Image($uri, 150, 245, 32, 0, 'PNG' ); // Emplacement de la signature avec restriction de largeur pour tenir dans sur la case.
|
2021-04-11 14:25:59 +02:00
|
|
|
|
*/
|
2020-10-24 08:35:00 +02:00
|
|
|
|
} // End if cerfa
|
2020-10-24 10:08:44 +02:00
|
|
|
|
elseif ($f->type_facture == 3)
|
2020-10-24 08:35:00 +02:00
|
|
|
|
{
|
2020-10-24 10:08:44 +02:00
|
|
|
|
// Reçu de cotisation crade et en rien liés aux cotisations pour le moment
|
|
|
|
|
ob_start();
|
|
|
|
|
|
|
|
|
|
$doc = 'Reçu n°'.$f->numero;
|
|
|
|
|
$pdf->SetTitle($doc.' - '.$emission);
|
2020-10-24 22:06:16 +02:00
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
|
$asso =
|
2020-10-24 22:06:16 +02:00
|
|
|
|
// 'É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>":'');
|
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
|
$receveur =
|
2020-10-24 22:06:16 +02:00
|
|
|
|
'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>":'');
|
|
|
|
|
|
2020-12-29 18:07:26 +01:00
|
|
|
|
$total = $f->total / 100;
|
|
|
|
|
$total = number_format($total, 2, ',', ' ');
|
2020-10-24 10:08:44 +02:00
|
|
|
|
|
|
|
|
|
$lieu = $plugin->getConfig('ville_asso');
|
2020-10-24 22:06:16 +02:00
|
|
|
|
$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']));
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
|
|
|
|
|
|
echo <<<EOF
|
2020-10-24 22:06:16 +02:00
|
|
|
|
<!-- 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>
|
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br><br>
|
2020-10-24 22:06:16 +02:00
|
|
|
|
Bonjour,
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br><br>
|
2020-10-24 22:06:16 +02:00
|
|
|
|
À $lieu, le $emission,
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br><br>
|
|
|
|
|
|
2020-10-24 22:06:16 +02:00
|
|
|
|
Nous accusons réception de votre cotisation « $intitule » reçue le $emission et nous vous en remercions.
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br><br>
|
2020-12-29 18:07:26 +01:00
|
|
|
|
Nous reconnaissons que vous avez acquitté la somme de {$total} €.
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br>
|
2020-10-24 22:06:16 +02:00
|
|
|
|
Votre adhésion sera donc effective à compter du $souscription jusqu’au $expiration.
|
2020-10-24 10:08:44 +02:00
|
|
|
|
<br><br><br>
|
|
|
|
|
|
|
|
|
|
Nous vous prions de recevoir, chère adhérente, cher adhérent, nos meilleures salutations,
|
|
|
|
|
<br><br><br>
|
2020-10-24 22:06:16 +02:00
|
|
|
|
-représentant·e de l'asso-
|
|
|
|
|
<br><br><br>
|
|
|
|
|
<i>Nous vous rappelons que la cotisation n’est pas soumise à la TVA et qu’elle ne donne pas lieu à la délivrance d’une facture. Elle n’ouvre 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>
|
2020-10-24 10:08:44 +02:00
|
|
|
|
EOF;
|
|
|
|
|
|
|
|
|
|
$html = ob_get_clean();
|
|
|
|
|
$pdf->WriteHTML($html);
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
|
|
|
|
} // End if reçu cotis
|
2019-11-02 17:53:27 +01:00
|
|
|
|
|
2020-10-24 10:08:44 +02:00
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
|
if(qg('d') !== null)
|
|
|
|
|
{
|
2019-11-03 17:51:31 +01:00
|
|
|
|
$t = \Mpdf\Output\Destination::DOWNLOAD;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2019-11-03 17:51:31 +01:00
|
|
|
|
$t = \Mpdf\Output\Destination::INLINE;
|
2019-11-02 17:53:27 +01:00
|
|
|
|
}
|
2020-10-24 08:35:00 +02:00
|
|
|
|
|
2019-11-02 17:53:27 +01:00
|
|
|
|
$pdf->Output(
|
2019-11-03 17:51:31 +01:00
|
|
|
|
($f->type_facture?'Facture':'Devis').' '.$f->numero
|
2020-12-29 18:07:26 +01:00
|
|
|
|
. ' du '.$emission
|
2019-11-03 17:51:31 +01:00
|
|
|
|
.'.pdf', $t);
|