diff --git a/admin/index.php b/admin/index.php index e402ec5..3a6df02 100644 --- a/admin/index.php +++ b/admin/index.php @@ -12,4 +12,4 @@ $list->loadFromQueryString(); $tpl->assign(compact('list')); -$tpl->display(PLUGIN_ROOT . '/templates/index.tpl'); +$tpl->display(PLUGIN_ROOT . '/templates/index.tpl'); \ No newline at end of file diff --git a/admin/pdf.php b/admin/pdf.php index 8c0fd6a..1b07649 100644 --- a/admin/pdf.php +++ b/admin/pdf.php @@ -9,6 +9,7 @@ $users = new Users\Users; f(['id' => 'required|numeric']); $id = (int) qg('id'); $id_field = Users\DynamicFields::getNameFieldsSQL(); +$sign_tag = UserTemplate\Functions::signature(); // Vérification que le document existe if (!$f = $facture->get($id)) @@ -94,7 +95,7 @@ if ($f->type_facture != CERFA) { $echeance = ($f->type_facture?'Échéance de paiement':'Échéance du devis')." : ".$echeance; $reglee = !$f->reglee?'Cette facture est en attente de règlement.':'Cette facture a été reglée.'; - $footer = str_replace("\n", '
', $plugin->getConfig('footer')); + $footer = str_replace("\n", '
', $plugin->getConfig('footer') ?? '[Pied de page à configurer]'); $ttc = $plugin->getConfig('ttc') ? 'TTC':'HT'; // Génération du contenu de la facture @@ -480,7 +481,7 @@ elseif ($f->type_facture == CERFA)
{$t['m2']}
{$t['Y2']}
-
+
{$sign_tag}
diff --git a/data/default_sign.png b/data/default_sign.png deleted file mode 100644 index 38aa69f..0000000 Binary files a/data/default_sign.png and /dev/null differ diff --git a/install.php b/install.php index 7ae8274..9393594 100644 --- a/install.php +++ b/install.php @@ -7,7 +7,4 @@ $db = DB::getInstance(); $db->import(dirname(__FILE__) . "/data/schema.sql"); -$path = __DIR__.'/data/default_sign.png'; -$png = (new File)->createAndStore('skel/plugin/facturation','sign.png', $path, null); - $plugin->registerSignal('menu.item', [Facture::class, 'menuItem']); \ No newline at end of file diff --git a/www/public/cerfa-1.png b/public/cerfa-1.png similarity index 100% rename from www/public/cerfa-1.png rename to public/cerfa-1.png diff --git a/www/public/cerfa-2.png b/public/cerfa-2.png similarity index 100% rename from www/public/cerfa-2.png rename to public/cerfa-2.png diff --git a/templates/aide.tpl b/templates/aide.tpl index 62ac020..d82931e 100644 --- a/templates/aide.tpl +++ b/templates/aide.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Aide — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} +{include file="_head.tpl" title="Aide — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="aide"}
diff --git a/templates/client.tpl b/templates/client.tpl index 8ac2c7f..08cb1d9 100644 --- a/templates/client.tpl +++ b/templates/client.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Client — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=0} +{include file="_head.tpl" title="Client — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=0} {include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client"}
diff --git a/templates/client_modifier.tpl b/templates/client_modifier.tpl index 65c4dbe..d3a3f38 100644 --- a/templates/client_modifier.tpl +++ b/templates/client_modifier.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Modifier un client — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=0} +{include file="_head.tpl" title="Modifier un client — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=0} {include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client_modifier"} {form_errors} diff --git a/templates/client_supprimer.tpl b/templates/client_supprimer.tpl index 7940b33..de3becb 100644 --- a/templates/client_supprimer.tpl +++ b/templates/client_supprimer.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Supprimer un client — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=0} +{include file="_head.tpl" title="Supprimer un client — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=0} {include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client_supprimer"} {if !$deletable} diff --git a/templates/clients.tpl b/templates/clients.tpl index 38d5619..6c6bb9d 100644 --- a/templates/clients.tpl +++ b/templates/clients.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Clients — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=1} +{include file="_head.tpl" title="Clients — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=1} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="clients"} {if $list->count()} diff --git a/templates/facture.tpl b/templates/facture.tpl index 8ea6ca0..9248779 100644 --- a/templates/facture.tpl +++ b/templates/facture.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Document — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} +{include file="_head.tpl" title="Document — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"} {form_errors} diff --git a/templates/facture_ajouter.tpl b/templates/facture_ajouter.tpl index c97ee4f..e4add63 100644 --- a/templates/facture_ajouter.tpl +++ b/templates/facture_ajouter.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Créer un document — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=1} +{include file="_head.tpl" title="Créer un document — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=1} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="facture"} {include file="%s/templates/_form.tpl"|args:$plugin_root} diff --git a/templates/facture_modifier.tpl b/templates/facture_modifier.tpl index d2d9496..77dd30b 100644 --- a/templates/facture_modifier.tpl +++ b/templates/facture_modifier.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Modifier un document — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=1} +{include file="_head.tpl" title="Modifier un document — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=1} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"} {include file="%s/templates/_form.tpl"|args:$plugin_root} diff --git a/templates/facture_supprimer.tpl b/templates/facture_supprimer.tpl index 0d13668..4ba5791 100644 --- a/templates/facture_supprimer.tpl +++ b/templates/facture_supprimer.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Supprimer un document — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id js=0} +{include file="_head.tpl" title="Supprimer un document — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id js=0} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"} {form_errors} diff --git a/templates/index.tpl b/templates/index.tpl index f759a75..94093b5 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,4 +1,4 @@ -{include file="_head.tpl" title="Documents — %s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id} +{include file="_head.tpl" title="Documents — %s"|args:$plugin.name current="plugin_%s"|args:$plugin.id} {include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"} {form_errors}