Skip to content

Commit 9cbd304

Browse files
committed
fix: stampa contratti
1 parent 6fee98a commit 9cbd304

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

templates/contratti/body.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// Creazione righe fantasma ottimizzata
4141
$autofill = new Util\Autofill($columns);
42-
$rows_per_page = 23;
42+
$rows_per_page = 22;
4343
$rows_first_page = 36;
4444
$autofill->setRows($rows_per_page, 0, $rows_first_page);
4545

@@ -220,7 +220,7 @@
220220

221221
if ($riga->sconto > 0) {
222222
$text = discountInfo($riga, false);
223-
223+
$autofill->count($text, true);
224224
echo '
225225
<br><small class="text-muted">'.$text.'</small>';
226226
}
@@ -247,6 +247,7 @@
247247
if ($options['pricing']) {
248248
echo '
249249
<td></td>
250+
<td></td>
250251
<td></td>';
251252
}
252253
}
@@ -257,6 +258,7 @@
257258
$autofill->next();
258259
}
259260

261+
$autofill->count($documento['esclusioni']);
260262
echo '
261263
|autofill|
262264
</tbody>';
@@ -277,7 +279,7 @@
277279
// Totale imponibile
278280
echo '
279281
<tr>
280-
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : 5).'" class="text-right text-muted">
282+
<td colspan="'.($options['show-only-total'] ? (($has_image) ? 3 : 2) : 4).'" class="text-right text-muted">
281283
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
282284
</td>
283285
@@ -290,7 +292,7 @@
290292
if ($show_sconto) {
291293
echo '
292294
<tr>
293-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right text-muted">
295+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted">
294296
<b>'.tr($sconto > 0 ? 'Sconto' : 'Maggiorazione', [], ['upper' => true]).':</b>
295297
</td>
296298
@@ -302,22 +304,20 @@
302304
// Totale imponibile
303305
echo '
304306
<tr>
305-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right text-muted">
307+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted">
306308
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
307309
</td>
308310
309311
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
310312
<b>'.moneyFormat($totale_imponibile, $d_totali).'</b>
311313
</th>
312314
</tr>';
313-
$autofill->set(3);
314-
$autofill->next();
315315
}
316316
if (!$options['no-iva']) {
317317
// IVA
318318
echo '
319319
<tr>
320-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right text-muted">
320+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted">
321321
<b>'.tr('Totale IVA', [], ['upper' => true]).':</b>
322322
</td>
323323
@@ -329,7 +329,7 @@
329329
// TOTALE
330330
echo '
331331
<tr>
332-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right text-muted">
332+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right text-muted">
333333
<b>'.tr('Totale documento', [], ['upper' => true]).':</b>
334334
</td>
335335
@@ -342,7 +342,7 @@
342342
// SCONTO IN FATTURA
343343
echo '
344344
<tr>
345-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right">
345+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right">
346346
<b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b>
347347
</td>
348348
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
@@ -353,14 +353,13 @@
353353
// NETTO A PAGARE
354354
echo '
355355
<tr>
356-
<td colspan="'.($options['show-only-total'] ? 2 : 5).'" class="text-right">
356+
<td colspan="'.($options['show-only-total'] ? 2 : 4).'" class="text-right">
357357
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
358358
</td>
359359
<th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right">
360360
<b>'.moneyFormat($netto_a_pagare, $d_totali).'</b>
361361
</th>
362362
</tr>';
363-
$autofill->set(2);
364363
}
365364
}
366365
}

0 commit comments

Comments
 (0)