feat: dirty add of the 'type' key (estimate/bill)

This commit is contained in:
Matthieu Bessat 2022-05-18 11:57:44 +02:00
commit 50f05325ed
2 changed files with 12 additions and 2 deletions

View file

@ -7,7 +7,7 @@ use Twig\Extra\Intl\IntlExtension;
require 'vendor/autoload.php'; require 'vendor/autoload.php';
$data = Yaml::parseFile('./bill.example.yaml'); $data = Yaml::parseFile('./bill.yaml');
$totalDays = 0; $totalDays = 0;
foreach ($data['categories'] as $i => $category) { foreach ($data['categories'] as $i => $category) {

View file

@ -2,14 +2,22 @@
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Facture</title> <title>
{% if (type is not defined) or type == 'bill' %}Facture{% endif %}
{% if type == 'estimate' %}Devis{% endif %}
</title>
<style> <style>
{% include('./styles/main.css') %} {% include('./styles/main.css') %}
</style> </style>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
{% if type == 'estimate' %}
<h2>Devis n°{{ id }}</h2>
{% endif %}
{% if (type is not defined) or type == 'bill' %}
<h2>Facture n°{{ id }}</h2> <h2>Facture n°{{ id }}</h2>
{% endif %}
<div class="header"> <div class="header">
<ul class="header-column provider"> <ul class="header-column provider">
<li>Au nom et pour le compte de :</li> <li>Au nom et pour le compte de :</li>
@ -101,10 +109,12 @@
</table> </table>
</div> </div>
<div class="footer"> <div class="footer">
{% if (type is not defined) or type == 'bill' %}
<div>Coordonnées bancaires :</div> <div>Coordonnées bancaires :</div>
<div class="banking"> <div class="banking">
<div>IBAN : FR76 1142 5009 0004 2337 9133 213</div> <div>BIC/SWIFT : CEPAFRPP</div> <div>IBAN : FR76 1142 5009 0004 2337 9133 213</div> <div>BIC/SWIFT : CEPAFRPP</div>
</div> </div>
{% endif %}
</div> </div>
</div> </div>
</body> </body>