Fix install, use Paheko sign, fix $plugin vars
This commit is contained in:
parent
235f8ceeed
commit
899bf02775
@ -9,6 +9,7 @@ $users = new Users\Users;
|
|||||||
f(['id' => 'required|numeric']);
|
f(['id' => 'required|numeric']);
|
||||||
$id = (int) qg('id');
|
$id = (int) qg('id');
|
||||||
$id_field = Users\DynamicFields::getNameFieldsSQL();
|
$id_field = Users\DynamicFields::getNameFieldsSQL();
|
||||||
|
$sign_tag = UserTemplate\Functions::signature();
|
||||||
|
|
||||||
// Vérification que le document existe
|
// Vérification que le document existe
|
||||||
if (!$f = $facture->get($id))
|
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;
|
$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.';
|
$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';
|
$ttc = $plugin->getConfig('ttc') ? 'TTC':'HT';
|
||||||
|
|
||||||
// Génération du contenu de la facture
|
// 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: 148mm;">{$t['m2']}</div>
|
||||||
<div style="top: 239mm; left: 156mm;">{$t['Y2']}</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.6 KiB |
@ -7,7 +7,4 @@ $db = DB::getInstance();
|
|||||||
|
|
||||||
$db->import(dirname(__FILE__) . "/data/schema.sql");
|
$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']);
|
$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']);
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
@ -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"}
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="aide"}
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client"}
|
||||||
|
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client_modifier"}
|
||||||
|
|
||||||
{form_errors}
|
{form_errors}
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu_client.tpl"|args:$plugin_root current="client_supprimer"}
|
||||||
|
|
||||||
{if !$deletable}
|
{if !$deletable}
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="clients"}
|
||||||
|
|
||||||
{if $list->count()}
|
{if $list->count()}
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"}
|
||||||
|
|
||||||
{form_errors}
|
{form_errors}
|
||||||
|
@ -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/_menu.tpl"|args:$plugin_root current="facture"}
|
||||||
|
|
||||||
{include file="%s/templates/_form.tpl"|args:$plugin_root}
|
{include file="%s/templates/_form.tpl"|args:$plugin_root}
|
||||||
|
@ -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/_menu.tpl"|args:$plugin_root current="index"}
|
||||||
|
|
||||||
{include file="%s/templates/_form.tpl"|args:$plugin_root}
|
{include file="%s/templates/_form.tpl"|args:$plugin_root}
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"}
|
||||||
|
|
||||||
{form_errors}
|
{form_errors}
|
||||||
|
@ -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"}
|
{include file="%s/templates/_menu.tpl"|args:$plugin_root current="index"}
|
||||||
|
|
||||||
{form_errors}
|
{form_errors}
|
||||||
|
Loading…
Reference in New Issue
Block a user