From ff14091476a35de16a9ea3208501040cfae93a06 Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 14 Dec 2022 12:55:46 +0100 Subject: MODEL + reorganisation --- src/Latex.php | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/Latex.php (limited to 'src/Latex.php') diff --git a/src/Latex.php b/src/Latex.php new file mode 100644 index 0000000..c3d56af --- /dev/null +++ b/src/Latex.php @@ -0,0 +1,84 @@ +fileName = $quoi . '-' . $codePresta . '.tex'; + } +} + +class DevisLatex extends PrestaLatex +{} + +class FactureLatex extends PrestaLatex +{} + +class LocationLatex extends PrestaLatex +{} + +class EnveloppeRectoLatex extends PrestaLatex +{} +class EnveloppeVersoLatex extends PrestaLatex +{} + + +abstract class ComptaLatex extends Latex +{ + public function __construct(string $quoi, string $annee, int $numeroMois = 0) + { + nameTheFile($quoi, $annee, $numeroMois); + } + + // forme = Recettes-2022-06-Juin.tex ou Recettes-2022.tex + // type de 'annee'? + protected function nameTheFile(string $quoi, string $annee, int $numeroMois = 0) + { + $this->fileName = $quoi . '-' . $annee; + $mois = ['', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre']; + if($numeroMois > 0 && $numeroMois <= 12) + { + $this->fileName .= '-' . $numeroMois . '-' . $mois[$numeroMois]; + } + $this->fileName .= '.tex'; + } +} + +class LivreRecettesLatex extends ComptaLatex +{} + +class RegistreAchatsLatex extends ComptaLatex +{} + +class BilanLatex extends ComptaLatex +{} -- cgit v1.2.3