Fix indent ++
This commit is contained in:
parent
d45f81a515
commit
541c5820bc
16 changed files with 415 additions and 417 deletions
|
|
@ -49,8 +49,8 @@ catch(UserException $e)
|
|||
|
||||
$pdf = new \Mpdf\Mpdf([
|
||||
'default_font_size' => 10,
|
||||
'default_font' => 'dejavusans',
|
||||
// 'tempDir' => PLUGINS_ROOT . '/mpdf-tmp/'
|
||||
'default_font' => 'dejavusans',
|
||||
// 'tempDir' => PLUGINS_ROOT . '/mpdf-tmp/'
|
||||
]);
|
||||
$pdf->SetAuthor($config->get('nom_asso'));
|
||||
|
||||
|
|
@ -61,20 +61,20 @@ $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 = $cfg->get('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 = $cfg->get('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->nom.'</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->nom.'</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);
|
||||
|
|
@ -88,58 +88,58 @@ echo <<<EOF
|
|||
|
||||
<style>
|
||||
.titre {
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
position: absolute;
|
||||
top: 6mm;
|
||||
width: 180mm;
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
position: absolute;
|
||||
top: 6mm;
|
||||
width: 180mm;
|
||||
}
|
||||
.h2 {
|
||||
margin: 25 20 0 20;
|
||||
margin: 25 20 0 20;
|
||||
}
|
||||
.h2 span {
|
||||
font-weight: bold;
|
||||
font-size: 15pt;
|
||||
font-weight: bold;
|
||||
font-size: 15pt;
|
||||
}
|
||||
hr {
|
||||
margin: 5 0 20 0;
|
||||
margin: 5 0 20 0;
|
||||
}
|
||||
.adressage {
|
||||
font-size: 11pt;
|
||||
font-size: 11pt;
|
||||
}
|
||||
.adressage td {
|
||||
width: 95mm;
|
||||
vertical-align: top;
|
||||
width: 95mm;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.contenu td, .contenu th {
|
||||
vertical-align: top;
|
||||
padding: 8 10;
|
||||
margin : 0;
|
||||
border-collapse: collapse;
|
||||
vertical-align: top;
|
||||
padding: 8 10;
|
||||
margin : 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.contenu tr th, .contenu tr td {
|
||||
text-align: right;
|
||||
width: 16%;
|
||||
text-align: right;
|
||||
width: 16%;
|
||||
}
|
||||
.contenu tr td:nth-child(1), .contenu tr th:nth-child(1) {
|
||||
text-align: left;
|
||||
width: 84%;
|
||||
text-align: left;
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
.contenu thead tr, .contenu tfoot tr {
|
||||
background-color: #CCE;
|
||||
border: 10px solid black;
|
||||
background-color: #CCE;
|
||||
border: 10px solid black;
|
||||
}
|
||||
.contenu tbody tr:nth-child(even) {
|
||||
background-color: #DDF;
|
||||
background-color: #DDF;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
margin: 14mm 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
margin: 14mm 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -152,8 +152,8 @@ $doc - Émis le $emission
|
|||
|
||||
<table class="adressage">
|
||||
<tr>
|
||||
<td>$asso</td>
|
||||
<td>$receveur</td>
|
||||
<td>$asso</td>
|
||||
<td>$receveur</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
@ -166,14 +166,14 @@ $doc - Émis le $emission
|
|||
|
||||
<table class="contenu">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Désignations
|
||||
</th>
|
||||
<th>
|
||||
Prix
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Désignations
|
||||
</th>
|
||||
<th>
|
||||
Prix
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
EOF;
|
||||
|
|
@ -181,21 +181,21 @@ EOF;
|
|||
$i = 1;
|
||||
foreach($f->contenu as $k=>$v)
|
||||
{
|
||||
echo '<tr><td>';
|
||||
echo str_replace("\n", '<br>', $v['designation']);
|
||||
echo '</td><td>';
|
||||
echo number_format($v['prix'], 2, ',', ' ').'€';
|
||||
echo '</td></tr>';
|
||||
echo '<tr><td>';
|
||||
echo str_replace("\n", '<br>', $v['designation']);
|
||||
echo '</td><td>';
|
||||
echo number_format($v['prix'], 2, ',', ' ').'€';
|
||||
echo '</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo <<<EOF
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td><h3>Total</h3>Net à payer</td>
|
||||
<td><b>$total €</b> (HT)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h3>Total</h3>Net à payer</td>
|
||||
<td><b>$total €</b> (HT)</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ echo <<<EOF
|
|||
Moyen de paiement : $moyen_paiement
|
||||
|
||||
<p>
|
||||
$footer
|
||||
$footer
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
|
|
@ -221,13 +221,13 @@ $pdf->WriteHTML($html);
|
|||
|
||||
if(qg('d') !== null)
|
||||
{
|
||||
$t = \Mpdf\Output\Destination::DOWNLOAD;
|
||||
$t = \Mpdf\Output\Destination::DOWNLOAD;
|
||||
}
|
||||
else
|
||||
{
|
||||
$t = \Mpdf\Output\Destination::INLINE;
|
||||
$t = \Mpdf\Output\Destination::INLINE;
|
||||
}
|
||||
$pdf->Output(
|
||||
($f->type_facture?'Facture':'Devis').' '.$f->numero
|
||||
. ' du '.date('d-m-Y' ,$f->date_emission)
|
||||
.'.pdf', $t);
|
||||
($f->type_facture?'Facture':'Devis').' '.$f->numero
|
||||
. ' du '.date('d-m-Y' ,$f->date_emission)
|
||||
.'.pdf', $t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue