diff options
| author | polo <contact@ordipolo.fr> | 2023-09-02 11:03:16 +0200 |
|---|---|---|
| committer | polo <contact@ordipolo.fr> | 2023-09-02 11:03:16 +0200 |
| commit | 45262760a7d575a9d612cc2056e66bf105e43df8 (patch) | |
| tree | 4d22f2e19f67f4a6dcdd2a4236fa6f6a0dd7f22a /src/sections/3_modify_data.php | |
| parent | 45f1b99a1060ee43deb6055faef1f8b16b5d80a2 (diff) | |
| download | AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.tar.gz AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.tar.bz2 AppliGestionPHP-45262760a7d575a9d612cc2056e66bf105e43df8.zip | |
section 3 ok (manque les prestas non-vendues)
Diffstat (limited to 'src/sections/3_modify_data.php')
| -rw-r--r-- | src/sections/3_modify_data.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/sections/3_modify_data.php b/src/sections/3_modify_data.php index 71b977a..1f48870 100644 --- a/src/sections/3_modify_data.php +++ b/src/sections/3_modify_data.php | |||
| @@ -153,7 +153,8 @@ function modifyData($Client): array | |||
| 153 | echo "choix: modifier" . $choix_niv3 . "\n"; | 153 | echo "choix: modifier" . $choix_niv3 . "\n"; |
| 154 | $ModificationPrestaForm = new ZenityEntry($choix_niv3); | 154 | $ModificationPrestaForm = new ZenityEntry($choix_niv3); |
| 155 | $input = exec($ModificationPrestaForm->get()); | 155 | $input = exec($ModificationPrestaForm->get()); |
| 156 | if(is_string($input) && $input != '') | 156 | //if(is_string($input) && $input != '') |
| 157 | if(is_string($input)) // chaine vide autorisée | ||
| 157 | { | 158 | { |
| 158 | $Presta->set($choix_niv3, $input); | 159 | $Presta->set($choix_niv3, $input); |
| 159 | $PrestaDetails->set($choix_niv3, $input); | 160 | $PrestaDetails->set($choix_niv3, $input); |
| @@ -163,10 +164,13 @@ function modifyData($Client): array | |||
| 163 | $PrestaDetails->update(); | 164 | $PrestaDetails->update(); |
| 164 | 165 | ||
| 165 | // mettre à jour les documents | 166 | // mettre à jour les documents |
| 166 | $DocumentPresta = Latex::makeInstance($Presta->getTypePresta()); // $type = facture, devis, location | 167 | if($Presta->getTypePresta() === 'devis' || $Presta->getTypePresta() === 'facture' || $Presta->getTypePresta() === 'location') |
| 167 | $DocumentPresta->setData($Client)->setData($Presta)->setData($PrestaDetails); | 168 | { |
| 168 | $DocumentPresta->makeLatex(); | 169 | $DocumentPresta = Latex::makeInstance($Presta->getTypePresta()); // $type = facture, devis, location |
| 169 | makeTexAndPdf($DocumentPresta); | 170 | $DocumentPresta->setData($Client)->setData($Presta)->setData($PrestaDetails); |
| 171 | $DocumentPresta->makeLatex(); | ||
| 172 | makeTexAndPdf($DocumentPresta); | ||
| 173 | } | ||
| 170 | } | 174 | } |
| 171 | else | 175 | else |
| 172 | { | 176 | { |
