mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-03-19 04:30:05 +01:00
fix: allineamento template stampe documenti
This commit is contained in:
parent
7f3e751723
commit
9965cab299
src/Util
templates
contratti
ddt
fatture
ordini
preventivi
@ -30,8 +30,8 @@ class Autofill
|
||||
protected $space = 0;
|
||||
protected $current = 0;
|
||||
|
||||
protected $max_rows = 26;
|
||||
protected $max_rows_first_page = 38;
|
||||
protected $max_rows = 27;
|
||||
protected $max_rows_first_page = 39;
|
||||
protected $max_additional = 0;
|
||||
|
||||
public function __construct(protected $column_number, protected $char_number = 70)
|
||||
|
@ -39,100 +39,20 @@ if ($has_image) {
|
||||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill($columns);
|
||||
$autofill->setRows(20, 10);
|
||||
$autofill->setRows(23, 0, 38);
|
||||
|
||||
// Conteggio righe destinazione diversa
|
||||
$autofill->count($destinazione);
|
||||
|
||||
// Elenco impianti
|
||||
$impianti = $dbo->fetchArray('SELECT nome, matricola FROM my_impianti WHERE id IN (SELECT my_impianti_contratti.idimpianto FROM my_impianti_contratti WHERE idcontratto = '.prepare($documento['id']).')');
|
||||
|
||||
echo '
|
||||
<div class="col-xs-5">
|
||||
<div class="text-center" style="height:5mm;">
|
||||
<b>CONTRATTO</b>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table text-center">
|
||||
<tr>
|
||||
<td valign="top" class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Nr. documento', [], ['upper' => true]).'</p>
|
||||
<p>'.$documento['numero'].'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Data documento', [], ['upper' => true]).'</p>
|
||||
<p>'.Translator::dateToLocale($documento['data_bozza']).'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Foglio', [], ['upper' => true]).'</p>
|
||||
<p> {PAGENO}/{nb} </p>
|
||||
</td>
|
||||
</tr>';
|
||||
if (!empty($impianti)) {
|
||||
$list = [];
|
||||
foreach ($impianti as $impianto) {
|
||||
$list[] = $impianto['nome']." <span style='color:#777;'>(".$impianto['matricola'].')</span>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<br>
|
||||
<p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).'</p>
|
||||
<p><small>'.implode(', ', $list).'</small></p>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 pull-right">
|
||||
<table class="table border-bottom">
|
||||
<tr>
|
||||
<td colspan=2 style="height:16mm;">
|
||||
<p class="small-bold text-muted ">'.tr('Spett.le', [], ['upper' => true]).'</p>
|
||||
<p>$c_ragionesociale$</p>
|
||||
<p>$c_indirizzo$</p>
|
||||
<p>$c_citta_full$</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Partita IVA', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_piva$</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_codicefiscale$</small>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if (!empty($destinazione)) {
|
||||
echo '
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>'.$destinazione.'</small>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
// Descrizione
|
||||
if (!empty($documento['descrizione'])) {
|
||||
echo '
|
||||
<p>'.nl2br((string) $documento['descrizione']).'</p>
|
||||
<br>';
|
||||
$autofill->count($documento['descrizione']);
|
||||
}
|
||||
|
||||
// Intestazione tabella per righe
|
||||
@ -191,8 +111,6 @@ foreach ($righe as $riga) {
|
||||
++$num;
|
||||
$r = $riga->toArray();
|
||||
|
||||
$autofill->count($r['descrizione']);
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td class="text-center" nowrap="nowrap" style="vertical-align: middle" width="25">
|
||||
@ -234,12 +152,14 @@ foreach ($righe as $riga) {
|
||||
$text = $text.'</td><td></td></tr><tr><td>';
|
||||
|
||||
echo nl2br($text);
|
||||
$autofill->count($text);
|
||||
}
|
||||
}
|
||||
$r['descrizione'] = str_replace('Rif. '.strtolower((string) $key), '', $r['descrizione']);
|
||||
}
|
||||
|
||||
$source_type = $riga::class;
|
||||
$autofill->count($r['descrizione']);
|
||||
|
||||
if (!setting('Visualizza riferimento su ogni riga in stampa')) {
|
||||
echo $r['descrizione'];
|
||||
@ -249,8 +169,7 @@ foreach ($righe as $riga) {
|
||||
|
||||
if ($riga->isArticolo()) {
|
||||
echo nl2br('<br><small>'.$riga->codice.'</small>');
|
||||
} else {
|
||||
echo '-';
|
||||
$autofill->count($riga->codice, true);
|
||||
}
|
||||
|
||||
if ($riga->isArticolo()) {
|
||||
|
117
templates/contratti/header.php
Normal file
117
templates/contratti/header.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if ($options['hide-header']) {
|
||||
echo '
|
||||
<!-- Intestazione vuota fornitore -->
|
||||
<div class="row" style="height:111px;">
|
||||
<div class="col-xs-6">
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
</div>
|
||||
</div>';
|
||||
} else {
|
||||
echo '
|
||||
<!-- Intestazione fornitore -->
|
||||
$default_header$';
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="col-xs-5">
|
||||
<div class="text-center" style="height:5mm;">
|
||||
<b>CONTRATTO</b>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table text-center">
|
||||
<tr>
|
||||
<td valign="top" class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Nr. documento', [], ['upper' => true]).'</p>
|
||||
<p>'.$documento['numero'].'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Data documento', [], ['upper' => true]).'</p>
|
||||
<p>'.Translator::dateToLocale($documento['data_bozza']).'</p>
|
||||
</td>
|
||||
<td class="border-bottom border-top center text-center">
|
||||
<p class="small-bold text-muted">'.tr('Foglio', [], ['upper' => true]).'</p>
|
||||
<p>{PAGENO}/{nb}</p>
|
||||
</td>
|
||||
</tr>';
|
||||
if (!empty($impianti)) {
|
||||
$list = [];
|
||||
foreach ($impianti as $impianto) {
|
||||
$list[] = $impianto['nome']." <span style='color:#777;'>(".$impianto['matricola'].')</span>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<br>
|
||||
<p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).'</p>
|
||||
<p><small>'.implode(', ', $list).'</small></p>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 pull-right">
|
||||
<table class="table border-bottom">
|
||||
<tr>
|
||||
<td colspan=2 style="height:16mm;">
|
||||
<p class="small-bold text-muted ">'.tr('Spett.le', [], ['upper' => true]).'</p>
|
||||
<p>$c_ragionesociale$</p>
|
||||
<p>$c_indirizzo$</p>
|
||||
<p>$c_citta_full$</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Partita IVA', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_piva$</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_codicefiscale$</small>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if (!empty($destinazione)) {
|
||||
echo '
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>'.$destinazione.'</small>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
</div>';
|
@ -24,8 +24,12 @@ $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill($options['pricing'] ? 6 : 3, 70);
|
||||
$rows_per_page = ($documento['note'] || $options['pricing'] ? 19 : 27);
|
||||
$autofill->setRows($rows_per_page, 0, 32);
|
||||
$rows_per_page = ($documento['note'] || $options['pricing'] ? ($tipo_doc == 'Ddt in uscita' ? 20 : 22) : 27);
|
||||
$autofill->setRows($rows_per_page, 0, $options['last-page-footer'] ? 34 : $rows_per_page);
|
||||
|
||||
// Conteggio righe destinazione diversa
|
||||
$autofill->count($destinazione);
|
||||
$autofill->count($partenza);
|
||||
|
||||
// Intestazione tabella per righe
|
||||
echo "
|
||||
|
@ -103,8 +103,9 @@ echo '
|
||||
<td class="text-right">
|
||||
<small>$c_codicefiscale$</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tr>';
|
||||
if (!empty($partenza)) {
|
||||
echo'
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Partenza merce', [], ['upper' => true]).'</p>
|
||||
@ -113,6 +114,7 @@ echo '
|
||||
<p><small>'.$partenza.'</small></p>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
if (!empty($destinazione)) {
|
||||
echo '
|
||||
|
@ -52,7 +52,11 @@ if (empty($documento['numero_esterno'])) {
|
||||
// Leggo i dati della destinazione (se 0=sede legale, se!=altra sede da leggere da tabella an_sedi)
|
||||
$destinazione = '';
|
||||
if (!empty($documento['idsede_destinazione'])) {
|
||||
$rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, nomesede, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale, id_nazione, telefono, cellulare FROM an_sedi WHERE idanagrafica='.prepare($id_cliente).' AND id='.prepare($documento['idsede_destinazione']));
|
||||
if ($tipo_doc == 'Ddt in uscita') {
|
||||
$rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, nomesede, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale, id_nazione, telefono, cellulare FROM an_sedi WHERE idanagrafica='.prepare($documento['idanagrafica']).' AND id='.prepare($documento['idsede_destinazione']));
|
||||
}else{
|
||||
$rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, nomesede, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale, id_nazione, telefono, cellulare FROM an_sedi WHERE idanagrafica='.prepare($id_azienda).' AND id='.prepare($documento['idsede_destinazione']));
|
||||
}
|
||||
|
||||
if (!empty($rsd[0]['nomesede'])) {
|
||||
$destinazione .= $rsd[0]['nomesede'].'<br/>';
|
||||
@ -89,7 +93,11 @@ if (!empty($documento['idsede_destinazione'])) {
|
||||
// Leggo i dati della destinazione (se 0=sede legale, se!=altra sede da leggere da tabella an_sedi)
|
||||
$partenza = '';
|
||||
if (!empty($documento['idsede_partenza'])) {
|
||||
if ($tipo_doc != 'Ddt in uscita') {
|
||||
$rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, nomesede, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale, id_nazione, telefono, cellulare FROM an_sedi WHERE idanagrafica='.prepare($documento['idanagrafica']).' AND id='.prepare($documento['idsede_partenza']));
|
||||
}else{
|
||||
$rsd = $dbo->fetchArray('SELECT (SELECT codice FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS codice, (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica=an_sedi.idanagrafica) AS ragione_sociale, nomesede, indirizzo, indirizzo2, cap, citta, provincia, piva, codice_fiscale, id_nazione, telefono, cellulare FROM an_sedi WHERE idanagrafica='.prepare($id_azienda).' AND id='.prepare($documento['idsede_partenza']));
|
||||
}
|
||||
|
||||
if (!empty($rsd[0]['nomesede'])) {
|
||||
$partenza .= $rsd[0]['nomesede'].'<br/>';
|
||||
|
@ -27,7 +27,7 @@ $prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
|
||||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill(6, 70);
|
||||
$rows_per_page = $rows_per_page ?: ($fattura_accompagnatoria ? 24 : 26);
|
||||
$rows_per_page = ($fattura_accompagnatoria ? 24 : 26);
|
||||
$autofill->setRows($rows_per_page, 0);
|
||||
|
||||
// Intestazione tabella per righe
|
||||
@ -214,8 +214,10 @@ foreach ($righe as $riga) {
|
||||
}
|
||||
|
||||
foreach ($v_iva as $desc_iva => $tot_iva) {
|
||||
$autofill->count($desc_iva, true);
|
||||
$autofill->count($desc_iva);
|
||||
}
|
||||
$autofill->count($record['note']);
|
||||
$autofill->next();
|
||||
|
||||
echo '
|
||||
|autofill|
|
||||
@ -253,7 +255,6 @@ if (!empty($record['note'])) {
|
||||
echo '
|
||||
<p class="small-bold text-muted">'.tr('Note', [], ['upper' => true]).':</p>
|
||||
<p><small>'.nl2br((string) $record['note']).'</small></p>';
|
||||
$autofill->count($record['note'], true);
|
||||
}
|
||||
|
||||
echo '
|
||||
|
@ -60,7 +60,12 @@ $columns = $options['pricing'] ? $columns : $columns - 3;
|
||||
|
||||
// Creazione righe fantasma
|
||||
$autofill = new Util\Autofill($columns);
|
||||
$autofill->setRows(27, 0, 32);
|
||||
$autofill->setRows(31, 0, 34);
|
||||
|
||||
// Conteggio righe destinazione diversa
|
||||
$autofill->count($destinazione);
|
||||
$autofill->count($codice_destinatario);
|
||||
|
||||
|
||||
// Intestazione tabella per righe
|
||||
echo "
|
||||
|
@ -68,88 +68,8 @@ if ($has_image) {
|
||||
$autofill = new Util\Autofill($columns);
|
||||
$autofill->setRows(22, 0, 36);
|
||||
|
||||
echo '
|
||||
<div class="col-xs-5">
|
||||
<div class="text-center" style="height:5mm;">
|
||||
<b>PREVENTIVO</b>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table text-center">
|
||||
<tr>
|
||||
<td valign="top" class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Nr. documento', [], ['upper' => true]).'</p>
|
||||
<p>'.$documento['numero'].'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Data documento', [], ['upper' => true]).'</p>
|
||||
<p>'.Translator::dateToLocale($documento['data_bozza']).'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Foglio', [], ['upper' => true]).'</p>
|
||||
<p> {PAGENO}/{nb} </p>
|
||||
</td>
|
||||
</tr>';
|
||||
if (!empty($impianti)) {
|
||||
$list = [];
|
||||
foreach ($impianti as $impianto) {
|
||||
$list[] = $impianto['nome']." <span style='color:#777;'>(".$impianto['matricola'].')</span>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<br>
|
||||
<p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).'</p>
|
||||
<p><small>'.implode(', ', $list).'</small></p>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-6 pull-right">
|
||||
<table class="table border-bottom">
|
||||
<tr>
|
||||
<td colspan=2 style="height:16mm;">
|
||||
<p class="small-bold text-muted ">'.tr('Spett.le', [], ['upper' => true]).'</p>
|
||||
<p>$c_ragionesociale$</p>
|
||||
<p>$c_indirizzo$</p>
|
||||
<p>$c_citta_full$</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Partita IVA', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_piva$</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_codicefiscale$</small>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if (!empty($destinazione)) {
|
||||
echo '
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>'.$destinazione.'</small>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
</div>';
|
||||
// Conteggio righe destinazione diversa
|
||||
$autofill->count($destinazione);
|
||||
|
||||
// Descrizione
|
||||
if (!empty($documento['descrizione'])) {
|
||||
@ -215,7 +135,7 @@ foreach ($righe as $key => $riga) {
|
||||
$subtotale_gruppo += $riga->totale_imponibile;
|
||||
$iva_gruppo += $riga->iva;
|
||||
|
||||
$autofill->count($r['descrizione']);
|
||||
$autofill->count($descrizione);
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
@ -278,7 +198,6 @@ foreach ($righe as $key => $riga) {
|
||||
|
||||
echo '
|
||||
<br><small class="text-muted">'.$text.'</small>';
|
||||
|
||||
$autofill->count($text, true);
|
||||
}
|
||||
|
||||
@ -316,9 +235,6 @@ foreach ($righe as $key => $riga) {
|
||||
echo '
|
||||
</tr>';
|
||||
|
||||
$autofill->next();
|
||||
|
||||
$next = $righe->flatten()[$num];
|
||||
if ($has_gruppo && ($next->is_titolo || $next == null) && ($options['pricing'] || $options['show-only-total'])) {
|
||||
echo '
|
||||
<tr>
|
||||
@ -348,10 +264,9 @@ foreach ($righe as $key => $riga) {
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
$autofill->next();
|
||||
$autofill->next();
|
||||
$autofill->next();
|
||||
}
|
||||
|
||||
$autofill->next();
|
||||
}
|
||||
|
||||
echo '
|
||||
|
117
templates/preventivi/header.php
Normal file
117
templates/preventivi/header.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||
* Copyright (C) DevCode s.r.l.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if ($options['hide-header']) {
|
||||
echo '
|
||||
<!-- Intestazione vuota fornitore -->
|
||||
<div class="row" style="height:111px;">
|
||||
<div class="col-xs-6">
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
</div>
|
||||
</div>';
|
||||
} else {
|
||||
echo '
|
||||
<!-- Intestazione fornitore -->
|
||||
$default_header$';
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="col-xs-5">
|
||||
<div class="text-center" style="height:5mm;">
|
||||
<b>PREVENTIVO</b>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table text-center">
|
||||
<tr>
|
||||
<td valign="top" class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Nr. documento', [], ['upper' => true]).'</p>
|
||||
<p>'.$documento['numero'].'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Data documento', [], ['upper' => true]).'</p>
|
||||
<p>'.Translator::dateToLocale($documento['data_bozza']).'</p>
|
||||
</td>
|
||||
|
||||
<td class="border-bottom border-top">
|
||||
<p class="small-bold text-muted">'.tr('Foglio', [], ['upper' => true]).'</p>
|
||||
<p> {PAGENO}/{nb} </p>
|
||||
</td>
|
||||
</tr>';
|
||||
if (!empty($impianti)) {
|
||||
$list = [];
|
||||
foreach ($impianti as $impianto) {
|
||||
$list[] = $impianto['nome']." <span style='color:#777;'>(".$impianto['matricola'].')</span>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<br>
|
||||
<p class="small-bold text-muted">'.tr('Impianti', [], ['upper' => true]).'</p>
|
||||
<p><small>'.implode(', ', $list).'</small></p>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-xs-6 pull-right">
|
||||
<table class="table border-bottom">
|
||||
<tr>
|
||||
<td colspan=2 style="height:16mm;">
|
||||
<p class="small-bold text-muted ">'.tr('Spett.le', [], ['upper' => true]).'</p>
|
||||
<p>$c_ragionesociale$</p>
|
||||
<p>$c_indirizzo$</p>
|
||||
<p>$c_citta_full$</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Partita IVA', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_piva$</small>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Codice fiscale', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>$c_codicefiscale$</small>
|
||||
</td>
|
||||
</tr>';
|
||||
|
||||
if (!empty($destinazione)) {
|
||||
echo '
|
||||
<tr>
|
||||
<td class="border-bottom">
|
||||
<p class="small-bold text-muted">'.tr('Destinazione diversa', [], ['upper' => true]).'</p>
|
||||
</td>
|
||||
<td class="border-bottom text-right">
|
||||
<small>'.$destinazione.'</small>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
</table>
|
||||
</div>
|
||||
</div>';
|
Loading…
x
Reference in New Issue
Block a user