Skip to content

Commit 8830cd7

Browse files
committed
fix: colonna codice articolo in stampa ddt
1 parent 88e79a3 commit 8830cd7

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

templates/ddt/body.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
$prezzi_ivati = setting('Utilizza prezzi di vendita comprensivi di IVA');
2424

2525
// Creazione righe fantasma
26-
$autofill = new Util\Autofill($options['pricing'] ? 6 : 3, 70);
26+
$autofill = new Util\Autofill($options['pricing'] ? 7 : 4, 70);
2727
$rows_per_page = ($documento['note'] || $options['pricing'] ? ($tipo_doc == 'Ddt in uscita' ? 22 : 24) : 27);
2828
$autofill->setRows($rows_per_page, 0, $options['last-page-footer'] ? 34 : $rows_per_page);
2929

@@ -42,6 +42,7 @@
4242
<thead>
4343
<tr>
4444
<th class='text-center' style='width:5%'>".tr('#', [], ['upper' => true])."</th>
45+
<th class='text-center' style='width:15%'>".tr('Cod.', [], ['upper' => true])."</th>
4546
<th class='text-center'>".tr('Descrizione', [], ['upper' => true])."</th>
4647
<th class='text-center'>".tr('Q.tà', [], ['upper' => true]).'</th>';
4748

@@ -110,7 +111,14 @@
110111
if ($options['pricing']) {
111112
$text .= '</td><td></td><td></td><td>';
112113
}
113-
$text .= '</td><td></td></tr><tr><td class="text-center" nowrap="nowrap" style="vertical-align: middle">';
114+
115+
if ($riga->isArticolo()) {
116+
echo '</td><td>'.$riga->codice.'</td>';
117+
} else {
118+
$text .= '</td><td></td>';
119+
}
120+
121+
$text .= '</tr><tr><td class="text-center" nowrap="nowrap" style="vertical-align: middle">';
114122

115123
echo '
116124
</td>
@@ -127,14 +135,18 @@
127135
$autofill->count($r['descrizione']);
128136

129137
echo $num.'
130-
</td>
131-
<td>'.nl2br((string) $r['descrizione']);
138+
</td>';
132139

133140
if ($riga->isArticolo()) {
134-
echo '<br><small>'.$riga->codice.'</small>';
135-
$autofill->count($riga->codice, true);
141+
echo '<td class="text-center">'.$riga->codice.'</td>';
142+
} else {
143+
echo '<td>-</td>';
136144
}
137145

146+
echo'
147+
<td>'.nl2br((string) $r['descrizione']);
148+
149+
138150
if ($riga->isArticolo()) {
139151
// Seriali
140152
$seriali = $riga->serials;

0 commit comments

Comments
 (0)