mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-01 16:36:45 +01:00
Aggiunto header di default per le stampe
This commit is contained in:
parent
0f37c587e1
commit
17c68b543b
@ -88,6 +88,9 @@ if (!$old_format) {
|
|||||||
}
|
}
|
||||||
$head = ob_get_clean();
|
$head = ob_get_clean();
|
||||||
|
|
||||||
|
// Footer di default
|
||||||
|
$head = !empty($head) ? $head : '$default_header$';
|
||||||
|
|
||||||
// Generazione dei contenuti del footer
|
// Generazione dei contenuti del footer
|
||||||
ob_start();
|
ob_start();
|
||||||
if (file_exists($docroot.'/templates/'.$ptype.'/custom/footer.php')) {
|
if (file_exists($docroot.'/templates/'.$ptype.'/custom/footer.php')) {
|
||||||
@ -119,7 +122,7 @@ if (!$old_format) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Footer di default
|
// Footer di default
|
||||||
$foot = !empty($foot) ? $foot : '$pagination$';
|
$foot = !empty($foot) ? $foot : '$default_footer$';
|
||||||
|
|
||||||
// Operazioni di sostituzione
|
// Operazioni di sostituzione
|
||||||
include $docroot.'/templates/replace.php';
|
include $docroot.'/templates/replace.php';
|
||||||
|
17
templates/base/footer.php
Normal file
17
templates/base/footer.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return '
|
||||||
|
<table style="color:#aaa; font-size:10px;">
|
||||||
|
<tr>
|
||||||
|
<td align="left" style="width:97mm;">
|
||||||
|
'.tr('Stampato con OpenSTAManager').'
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td align="right" style="width:97mm;">
|
||||||
|
'.tr('Pagina _PAGE_ di _TOTAL_', [
|
||||||
|
'_PAGE_' => '{PAGENO}',
|
||||||
|
'_TOTAL_' => '{nb}',
|
||||||
|
]).'
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>';
|
16
templates/base/header.php
Normal file
16
templates/base/header.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return '
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<img src="'.DOCROOT.'/templates/'.$ptype.'/logo_azienda.jpg" alt="Logo" border="0"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6 text-right">
|
||||||
|
<p><b>'.$f_ragionesociale.'</b></p>
|
||||||
|
<p>'.$f_indirizzo.' '.$f_citta_full.'</p>
|
||||||
|
<p>'.(!empty($f_piva) ? tr('P.Iva').': '.$f_piva : '').'</p>
|
||||||
|
<p>'.(!empty($f_codicefiscale) ? tr('C.F.').': '.$f_codicefiscale : '').'</p>
|
||||||
|
<p>'.(!empty($f_capsoc) ? tr('Cap.Soc.').': '.$f_capsoc : '').'</p>
|
||||||
|
<p>'.(!empty($f_telefono) ? tr('Tel').': '.$f_telefono : '').'</p>
|
||||||
|
</div>
|
||||||
|
</div>';
|
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
echo '
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<img src="'.__DIR__.'/logo_azienda.jpg" alt="Logo" border="0"/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 text-right">
|
|
||||||
<p><b>$f_ragionesociale$</b></p>
|
|
||||||
<p>$f_indirizzo$ $f_citta_full$</p>
|
|
||||||
<p>'.(!empty($f_piva) ? tr('P.Iva').': ' : '').'$f_piva$</p>
|
|
||||||
<p>'.(!empty($f_codicefiscale) ? tr('C.F.').': ' : '').'$f_codicefiscale$</p>
|
|
||||||
<p>'.(!empty($f_capsoc) ? tr('Cap.Soc.').': ' : '').'$f_capsoc$</p>
|
|
||||||
<p>'.(!empty($f_telefono) ? tr('Tel').': ' : '').'$f_telefono$</p>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
@ -167,4 +167,4 @@ echo '
|
|||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
$pagination$';
|
$default_footer$';
|
||||||
|
@ -197,4 +197,4 @@ echo '
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
$pagination$';
|
$default_footer$';
|
||||||
|
@ -51,5 +51,5 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
$pagination$
|
$default_footer$
|
||||||
</page_footer>
|
</page_footer>
|
||||||
|
@ -1,28 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Valori aggiuntivi per la sostituzione
|
|
||||||
$replaces = [
|
|
||||||
'docroot' => DOCROOT,
|
|
||||||
'rootdir' => ROOTDIR,
|
|
||||||
'footer' => !empty($footer) ? $footer : '',
|
|
||||||
'dicitura_fissa_fattura' => get_var('Dicitura fissa fattura'),
|
|
||||||
'pagination' => '
|
|
||||||
<table style="color:#aaa; font-size:10px;">
|
|
||||||
<tr>
|
|
||||||
<td align="left" style="width:97mm;">
|
|
||||||
'.tr('Stampato con OpenSTAManager').'
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td align="right" style="width:97mm;">
|
|
||||||
'.tr('Pagina _PAGE_ di _TOTAL_', [
|
|
||||||
'_PAGE_' => '{PAGENO}',
|
|
||||||
'_TOTAL_' => '{nb}',
|
|
||||||
]).'
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>',
|
|
||||||
];
|
|
||||||
|
|
||||||
// Retrocompatibilità
|
// Retrocompatibilità
|
||||||
$id_cliente = $id_cliente ?: $idcliente;
|
$id_cliente = $id_cliente ?: $idcliente;
|
||||||
|
|
||||||
@ -103,3 +80,13 @@ foreach ($replace as $prefix => $values) {
|
|||||||
$replaces[$prefix.$key] = $value;
|
$replaces[$prefix.$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Valori aggiuntivi per la sostituzione
|
||||||
|
$replaces = [
|
||||||
|
'docroot' => DOCROOT,
|
||||||
|
'rootdir' => ROOTDIR,
|
||||||
|
'footer' => !empty($footer) ? $footer : '',
|
||||||
|
'dicitura_fissa_fattura' => get_var('Dicitura fissa fattura'),
|
||||||
|
'default_header' => include DOCROOT.'/templates/base/header.php',
|
||||||
|
'default_footer' => include DOCROOT.'/templates/base/footer.php',
|
||||||
|
];
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
echo '
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<img src="'.__DIR__.'/logo_azienda.jpg" alt="Logo" border="0"/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 text-right">
|
|
||||||
<p><b>$f_ragionesociale$</b></p>
|
|
||||||
<p>$f_indirizzo$ $f_citta_full$</p>
|
|
||||||
<p>'.(!empty($f_piva) ? tr('P.Iva').': ' : '').'$f_piva$</p>
|
|
||||||
<p>'.(!empty($f_codicefiscale) ? tr('C.F.').': ' : '').'$f_codicefiscale$</p>
|
|
||||||
<p>'.(!empty($f_capsoc) ? tr('Cap.Soc.').': ' : '').'$f_capsoc$</p>
|
|
||||||
<p>'.(!empty($f_telefono) ? tr('Tel').': ' : '').'$f_telefono$</p>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
echo '
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<img src="'.__DIR__.'/logo_azienda.jpg" alt="Logo" border="0"/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 text-right">
|
|
||||||
<p><b>$f_ragionesociale$</b></p>
|
|
||||||
<p>$f_indirizzo$ $f_citta_full$</p>
|
|
||||||
<p>'.(!empty($f_piva) ? tr('P.Iva').': ' : '').'$f_piva$</p>
|
|
||||||
<p>'.(!empty($f_codicefiscale) ? tr('C.F.').': ' : '').'$f_codicefiscale$</p>
|
|
||||||
<p>'.(!empty($f_capsoc) ? tr('Cap.Soc.').': ' : '').'$f_capsoc$</p>
|
|
||||||
<p>'.(!empty($f_telefono) ? tr('Tel').': ' : '').'$f_telefono$</p>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
echo '
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<img src="'.__DIR__.'/logo_azienda.jpg" alt="Logo" border="0"/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 text-right">
|
|
||||||
<p><b>$f_ragionesociale$</b></p>
|
|
||||||
<p>$f_indirizzo$ $f_citta_full$</p>
|
|
||||||
<p>'.(!empty($f_piva) ? tr('P.Iva').': ' : '').'$f_piva$</p>
|
|
||||||
<p>'.(!empty($f_codicefiscale) ? tr('C.F.').': ' : '').'$f_codicefiscale$</p>
|
|
||||||
<p>'.(!empty($f_capsoc) ? tr('Cap.Soc.').': ' : '').'$f_capsoc$</p>
|
|
||||||
<p>'.(!empty($f_telefono) ? tr('Tel').': ' : '').'$f_telefono$</p>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
Loading…
x
Reference in New Issue
Block a user