Ajout génération cerfa dans facture_pdf

This commit is contained in:
Noizette 2020-10-24 08:35:00 +02:00
parent ba5096bfb2
commit e5ff2e8cd7
5 changed files with 161 additions and 201 deletions

View file

@ -42,9 +42,9 @@
<legend>Objet</legend>
<dl>
<dt><label>L'objet (but) de l'association doit tenir sur 3 lignes, chaque ligne pouvant accueillir un maximum de 100 caractères.</label><b title="(Champ obligatoire)">obligatoire pour reçus fiscaux</b></dt>
<dd><input type="text" maxlength=100 name="objet_0" value="{form_field data=$plugin.config name=objet_0}" /></dd>
<dd><input type="text" maxlength=100 name="objet_1" value="{form_field data=$plugin.config name=objet_1}" /></dd>
<dd><input type="text" maxlength=100 name="objet_2" value="{form_field data=$plugin.config name=objet_2}" /></dd>
<dd><input type="text" maxlength=95 name="objet_0" value="{form_field data=$plugin.config name=objet_0}" /></dd>
<dd><input type="text" maxlength=95 name="objet_1" value="{form_field data=$plugin.config name=objet_1}" /></dd>
<dd><input type="text" maxlength=95 name="objet_2" value="{form_field data=$plugin.config name=objet_2}" /></dd>
</dl>
</fieldset>

View file

@ -12,10 +12,6 @@
<button type="button" class="btn btn-primary">Télécharger ce document</button></a>
<div>
{if $type < 2}
<embed src="facture_pdf.php?id={$id}" type="application/pdf" width="100%" height="800px;" style="max-width: 900px;">
{else}
<embed src="generation.php?id={$id}" type="application/pdf" width="100%" height="800px;" style="max-width: 900px;">
{/if}
</div>
{include file="admin/_foot.tpl"}

View file

@ -21,7 +21,21 @@
<tbody>
{foreach from=$factures item=facture}
<tr>
<td>{if $facture.type_facture == 1}Facture{else}Devis{/if}</td>
<td><?php switch($facture->type_facture) {
case 0:
echo 'Devis';
break;
case 1:
echo 'Facture';
break;
case 2:
echo 'Reçu fiscal';
break;
case 3:
echo 'Reçu cotisation';
break;
}
?></td>
<td><a href="{plugin_url file="facture.php"}?id={$facture.id}">{$facture.numero}</a></td>
{if $facture.receveur_membre}
<td><a href="{$admin_url}membres/fiche.php?id={$facture.receveur.id}">{$facture.receveur.nom}</a></td>
@ -32,8 +46,8 @@
<td>{$facture.receveur.ville}</td>
<td>{$facture.date_emission|date_fr:'d/m/Y'}</td>
<td>{$facture.date_echeance|date_fr:'d/m/Y'}</td>
<td>{$facture.reglee}</td>
<td>{$facture.archivee}</td>
<td><?= $facture->reglee?'Réglée':'Non' ?></td>
<td><?= $facture->archivee?'Archivée':'Non' ?></td>
<td>{$facture.moyen_paiement}</td>
<td>
{foreach from=$facture.contenu item=contenu}