Ajout impression logo avec option de configuration
This commit is contained in:
parent
f93bb57906
commit
3d5af4ebb0
|
@ -23,8 +23,9 @@ $form->runIf('save', function () use ($plugin) {
|
|||
$plugin->setConfigProperty('objet_1', trim(f('objet_1')));
|
||||
$plugin->setConfigProperty('objet_2', trim(f('objet_2')));;
|
||||
|
||||
$plugin->setConfigProperty('logo', (bool)f('logo'));
|
||||
$plugin->setConfigProperty('footer', f('footer'));
|
||||
|
||||
|
||||
$plugin->setConfigProperty('validate_cp', (bool)f('validate_cp'));
|
||||
$plugin->setConfigProperty('unique_client_name', (bool)f('unique_client_name'));
|
||||
|
||||
|
@ -38,4 +39,4 @@ $tpl->assign('ok', qg('ok') !== null);
|
|||
$tpl->assign('conf', $plugin->getConfig());
|
||||
$tpl->assign('patterns', \Paheko\Plugin\Facturation\PATTERNS_LIST);
|
||||
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/config.tpl');
|
||||
$tpl->display(PLUGIN_ROOT . '/templates/config.tpl');
|
||||
|
|
|
@ -61,17 +61,17 @@ if ($f->type_facture != CERFA)
|
|||
$doc = 'Facture n° '. $f->numero;
|
||||
$txtemis = $doc . " - Émise le " . $emission;
|
||||
$txtdest = "Adressée à :";
|
||||
break;
|
||||
break;
|
||||
case DEVIS:
|
||||
$doc = 'Devis n° '. $f->numero;
|
||||
$txtemis = $doc . " - Émis le " . $emission;
|
||||
$txtdest = "Adressé à :";
|
||||
break;
|
||||
break;
|
||||
case COTIS:
|
||||
$doc = 'Reçu de cotisation n° '. $f->numero;
|
||||
$txtemis = $doc . " - Émis le " . $emission;
|
||||
$txtdest = "Adressé à :";
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
// utiliser l'adresse configurée dans le plugin sinon celle de l'asso sinon rien !
|
||||
|
@ -93,6 +93,10 @@ if ($f->type_facture != CERFA)
|
|||
$adresse = "";
|
||||
}
|
||||
|
||||
$logo='';
|
||||
if ($plugin->getConfig('logo')) {
|
||||
$logo = '<img id="logo" src="' . $config->fileURL('logo') . '" />';
|
||||
}
|
||||
$asso =
|
||||
// 'Émis par :<br><br>'.
|
||||
'<b>'.$config->get('org_name')."</b><br>".
|
||||
|
@ -267,6 +271,13 @@ EOF;
|
|||
width: 40%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.adressage td#logo {
|
||||
width: 20%;
|
||||
vertical-align: top;
|
||||
}
|
||||
.adressage img#logo {
|
||||
height : 3cm;
|
||||
}
|
||||
|
||||
.contenuTexte {
|
||||
padding: 0 6mm;
|
||||
|
@ -318,6 +329,7 @@ EOF;
|
|||
|
||||
<table class="adressage">
|
||||
<tr>
|
||||
<td id="logo">$logo</td>
|
||||
<td>$asso</td>
|
||||
<td>$receveur</td>
|
||||
</tr>
|
||||
|
|
|
@ -47,11 +47,12 @@
|
|||
</dl>
|
||||
</fieldset>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>input type="checkbox" name
|
||||
|
||||
<fieldset>
|
||||
<legend>Factures</legend>
|
||||
<dl>
|
||||
{input type="checkbox" name="logo" value="1" source=$conf label="Imprimer le logo de l'association"}
|
||||
{input type="textarea" class="full-width" rows="10" name="footer" source=$conf label="Pied de document — informations légales" required=true}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
Loading…
Reference in New Issue