Fix install, use Paheko sign, fix $plugin vars

This commit is contained in:
Noizette 2023-08-04 17:41:29 +02:00
parent 235f8ceeed
commit 899bf02775
16 changed files with 14 additions and 16 deletions

View File

@ -12,4 +12,4 @@ $list->loadFromQueryString();
$tpl->assign(compact('list'));
$tpl->display(PLUGIN_ROOT . '/templates/index.tpl');
$tpl->display(PLUGIN_ROOT . '/templates/index.tpl');

View File

@ -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", '<br>', $plugin->getConfig('footer'));
$footer = str_replace("\n", '<br>', $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)
<div style="top: 239mm; left: 148mm;">{$t['m2']}</div>
<div style="top: 239mm; left: 156mm;">{$t['Y2']}</div>
<div style="top: 243mm; left: 137mm;"><img src="{$url}plugin/facturation/sign.png" style="width: 50mm;"/></div>
<div style="top: 243mm; left: 137mm;">{$sign_tag}</div>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -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']);

View File

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -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"}
<fieldset>

View File

@ -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"}
<dl class="describe">

View File

@ -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}

View File

@ -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}

View File

@ -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()}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}