Compare commits
No commits in common. "master" and "evolution" have entirely different histories.
@ -16,14 +16,10 @@ $_GET['_dialog'] = true;
|
||||
|
||||
// signature
|
||||
$signature =
|
||||
(null !== $config->fileURL('signature')) ?
|
||||
$config->fileURL('signature') :
|
||||
((null !== $plugin->getConfig('signature')) ?
|
||||
\KD2\HTTP::getScheme() . '://' . \KD2\HTTP::getHost() . WWW_URI . $plugin->getConfig('signature') :
|
||||
"");
|
||||
(null !== $plugin->getConfig('signature')) ?
|
||||
\KD2\HTTP::getScheme() . '://' . \KD2\HTTP::getHost() . WWW_URI . "/" . $plugin->getConfig('signature') :
|
||||
"";
|
||||
|
||||
// http://test.paheko.bzh/config/cavalier.png
|
||||
error_log('signature = ' . $signature);
|
||||
// logo
|
||||
$config = Config::getInstance();
|
||||
$logo_asso =
|
||||
@ -115,8 +111,7 @@ function genererRecusPDF($totalPersonnes,
|
||||
$numero_sequentiel = getNumSequentiel($configNum);
|
||||
foreach ($totalPersonnes as $idPersonne => $personne) {
|
||||
$tpl = new UserTemplate(null);
|
||||
/* $tpl->setSource(PLUGIN_ROOT . '/templates/recu.skel'); */
|
||||
$tpl->setSourcePath(PLUGIN_ROOT . '/templates/recu.skel');
|
||||
$tpl->setSource(PLUGIN_ROOT . '/templates/recu.skel');
|
||||
|
||||
$tpl->assignArray(compact('signature', 'logo_asso', 'texteArticles'));
|
||||
$tpl->assign('objet_asso', $plugin->getConfig('objet_asso'));
|
||||
|
@ -34,18 +34,5 @@ div.previs_recu
|
||||
font-family: Serif;
|
||||
font-size: 11pt;
|
||||
background-color: white;
|
||||
break-after: always;
|
||||
}
|
||||
|
||||
/* supprimer saut de page après dernier */
|
||||
div.previs_recu:last-of-type
|
||||
{
|
||||
font-family: Serif;
|
||||
font-size: 11pt;
|
||||
background-color: white;
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
#__profiler {
|
||||
display: none;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
@ -95,9 +95,3 @@ span.titre, span.libelle
|
||||
{
|
||||
display : inline;
|
||||
}
|
||||
|
||||
/* Ne pas imprimer le bandeau des boutons du profiler */
|
||||
#__profiler
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class Utils
|
||||
description,
|
||||
amount as montant
|
||||
FROM services_fees');
|
||||
return $db->getGrouped($sql);
|
||||
return Utils::toAssoc($db->get($sql), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -37,7 +37,7 @@ class Utils
|
||||
services.label,
|
||||
services.description
|
||||
FROM services');
|
||||
return $db->getGrouped($sql);
|
||||
return Utils::toAssoc($db->get($sql), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@ class Utils
|
||||
$annee,
|
||||
$db->where('code', $op, $comptes)
|
||||
);
|
||||
return $db->getGrouped($sql);
|
||||
return Utils::toAssoc($db->get($sql), 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -120,6 +120,32 @@ class Utils
|
||||
return $db->get($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* faire un tableau associatif avec le résultat d'une requête
|
||||
*/
|
||||
static function toAssoc($array, $nomCle)
|
||||
{
|
||||
$assoc = array();
|
||||
foreach ($array as $elem)
|
||||
{
|
||||
$ro = new \ReflectionObject($elem);
|
||||
$proprietes = $ro->getProperties();
|
||||
$obj = new \stdClass();
|
||||
foreach ($proprietes as $p)
|
||||
{
|
||||
$pname = $p->getName();
|
||||
if ($pname == $nomCle) {
|
||||
$key = $p->getValue($elem);
|
||||
}
|
||||
else {
|
||||
$obj->$pname = $p->getValue($elem);
|
||||
}
|
||||
}
|
||||
$assoc[$key] = $obj;
|
||||
}
|
||||
return $assoc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return versements correspondants à l'année donnée
|
||||
* @param $annee
|
||||
|
@ -5,8 +5,8 @@
|
||||
<nav class="tabs">
|
||||
<ul>
|
||||
<li{if $current_nav == 'index'} class="current"{/if}><a href="{plugin_url}">Accueil</a></li>
|
||||
{if $current_nav == 'personne'} <li class="current"><a>Versements par personne</a></li>{/if}
|
||||
{if $current_nav == 'activite'} <li class="current"><a>Versements par activité et tarif</a></li>{/if}
|
||||
<li{if $current_nav == 'personne'} class="current"{/if}><a href="{plugin_url file="action.php?action=personne"}">Versements par personne</a></li>
|
||||
<li{if $current_nav == 'activite'} class="current"{/if}><a href="{plugin_url file="action.php?action=activite"}">Versements par activité et tarif</a></li>
|
||||
{if $session->canAccess($session::SECTION_ACCOUNTING, $session::ACCESS_WRITE)}
|
||||
<li{if $current_nav == 'config'} class="current"{/if}><a href="{plugin_url file="config.php"}">Configuration</a></li>
|
||||
{/if}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{include file="_head.tpl" title="%s"|args:$plugin.label current="plugin_%s"|args:$plugin.id}
|
||||
{include file="_head.tpl" title="%s"|args:$plugin.name current="plugin_%s"|args:$plugin.id}
|
||||
|
||||
<?php
|
||||
$fmt = new \NumberFormatter('fr_FR', \NumberFormatter::SPELLOUT);
|
||||
|
Loading…
Reference in New Issue
Block a user