2017-08-04 16:28:16 +02:00
|
|
|
<?php
|
|
|
|
|
2017-09-08 18:19:39 +02:00
|
|
|
include_once __DIR__.'/info.php';
|
2017-09-10 14:35:41 +02:00
|
|
|
|
2017-09-12 11:49:39 +02:00
|
|
|
// Retrocompatibilità con le stampe gestite da HTML2PDF
|
2017-09-10 14:35:41 +02:00
|
|
|
$replaces['pagination'] = str_replace(['{PAGENO}', '{nb}'], ['[[page_cu]]', '[[page_nb]]'], $replaces['pagination']);
|
|
|
|
|
|
|
|
$prefixes = [
|
|
|
|
'c_',
|
|
|
|
'f_',
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($prefixes as $prefix) {
|
|
|
|
if ($replaces[$prefix.'piva'] != $replaces[$prefix.'codicefiscale']) {
|
|
|
|
$replaces[$prefix.'piva'] = !empty($replaces[$prefix.'piva']) ? 'P.Iva: '.$replaces[$prefix.'piva'] : '';
|
|
|
|
$replaces[$prefix.'codicefiscale'] = !empty($replaces[$prefix.'codicefiscale']) ? 'C.F.: '.$replaces[$prefix.'codicefiscale'] : '';
|
|
|
|
} else {
|
|
|
|
$replaces[$prefix.'piva'] = !empty($replaces[$prefix.'piva']) ? 'P.Iva/C.F.: '.$replaces[$prefix.'piva'] : '';
|
|
|
|
$replaces[$prefix.'codicefiscale'] = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
$replaces[$prefix.'capsoc'] = !empty($replaces[$prefix.'capsoc']) ? 'Cap.Soc.: '.$replaces[$prefix.'capsoc'] : '';
|
|
|
|
$replaces[$prefix.'sitoweb'] = !empty($replaces[$prefix.'sitoweb']) ? 'Web: '.$replaces[$prefix.'sitoweb'] : '';
|
|
|
|
$replaces[$prefix.'telefono'] = !empty($replaces[$prefix.'telefono']) ? 'Tel: '.$replaces[$prefix.'telefono'] : '';
|
|
|
|
$replaces[$prefix.'fax'] = !empty($replaces[$prefix.'fax']) ? 'Fax: '.$replaces[$prefix.'fax'] : '';
|
|
|
|
$replaces[$prefix.'cellulare'] = !empty($replaces[$prefix.'cellulare']) ? 'Cell: '.$replaces[$prefix.'cellulare'] : '';
|
|
|
|
$replaces[$prefix.'email'] = !empty($replaces[$prefix.'email']) ? 'Email: '.$replaces[$prefix.'email'] : '';
|
|
|
|
$replaces[$prefix.'codiceiban'] = !empty($replaces[$prefix.'codiceiban']) ? 'IBAN: '.$replaces[$prefix.'codiceiban'] : '';
|
|
|
|
|
|
|
|
foreach ($replaces as $key => $value) {
|
|
|
|
if (starts_with($key, $prefix)) {
|
|
|
|
$replaces[$key] = empty($value) ? $value : $value.'<br/>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|