diff options
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 | { |