|
39 | 39 |
|
40 | 40 | // Creazione righe fantasma ottimizzata |
41 | 41 | $autofill = new Util\Autofill($columns); |
42 | | -$rows_per_page = 23; |
| 42 | +$rows_per_page = 22; |
43 | 43 | $rows_first_page = 36; |
44 | 44 | $autofill->setRows($rows_per_page, 0, $rows_first_page); |
45 | 45 |
|
|
220 | 220 |
|
221 | 221 | if ($riga->sconto > 0) { |
222 | 222 | $text = discountInfo($riga, false); |
223 | | - |
| 223 | + $autofill->count($text, true); |
224 | 224 | echo ' |
225 | 225 | <br><small class="text-muted">'.$text.'</small>'; |
226 | 226 | } |
|
247 | 247 | if ($options['pricing']) { |
248 | 248 | echo ' |
249 | 249 | <td></td> |
| 250 | + <td></td> |
250 | 251 | <td></td>'; |
251 | 252 | } |
252 | 253 | } |
|
257 | 258 | $autofill->next(); |
258 | 259 | } |
259 | 260 |
|
| 261 | + $autofill->count($documento['esclusioni']); |
260 | 262 | echo ' |
261 | 263 | |autofill| |
262 | 264 | </tbody>'; |
|
277 | 279 | // Totale imponibile |
278 | 280 | echo ' |
279 | 281 | <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"> |
281 | 283 | <b>'.tr('Imponibile', [], ['upper' => true]).':</b> |
282 | 284 | </td> |
283 | 285 |
|
|
290 | 292 | if ($show_sconto) { |
291 | 293 | echo ' |
292 | 294 | <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"> |
294 | 296 | <b>'.tr($sconto > 0 ? 'Sconto' : 'Maggiorazione', [], ['upper' => true]).':</b> |
295 | 297 | </td> |
296 | 298 |
|
|
302 | 304 | // Totale imponibile |
303 | 305 | echo ' |
304 | 306 | <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"> |
306 | 308 | <b>'.tr('Totale imponibile', [], ['upper' => true]).':</b> |
307 | 309 | </td> |
308 | 310 |
|
309 | 311 | <th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> |
310 | 312 | <b>'.moneyFormat($totale_imponibile, $d_totali).'</b> |
311 | 313 | </th> |
312 | 314 | </tr>'; |
313 | | - $autofill->set(3); |
314 | | - $autofill->next(); |
315 | 315 | } |
316 | 316 | if (!$options['no-iva']) { |
317 | 317 | // IVA |
318 | 318 | echo ' |
319 | 319 | <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"> |
321 | 321 | <b>'.tr('Totale IVA', [], ['upper' => true]).':</b> |
322 | 322 | </td> |
323 | 323 |
|
|
329 | 329 | // TOTALE |
330 | 330 | echo ' |
331 | 331 | <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"> |
333 | 333 | <b>'.tr('Totale documento', [], ['upper' => true]).':</b> |
334 | 334 | </td> |
335 | 335 |
|
|
342 | 342 | // SCONTO IN FATTURA |
343 | 343 | echo ' |
344 | 344 | <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"> |
346 | 346 | <b>'.tr('Sconto in fattura', [], ['upper' => true]).':</b> |
347 | 347 | </td> |
348 | 348 | <th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> |
|
353 | 353 | // NETTO A PAGARE |
354 | 354 | echo ' |
355 | 355 | <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"> |
357 | 357 | <b>'.tr('Netto a pagare', [], ['upper' => true]).':</b> |
358 | 358 | </td> |
359 | 359 | <th colspan="'.($options['show-only-total'] ? (($has_image) ? 2 : 1) : (($has_image) ? 3 : 2)).'" class="text-right"> |
360 | 360 | <b>'.moneyFormat($netto_a_pagare, $d_totali).'</b> |
361 | 361 | </th> |
362 | 362 | </tr>'; |
363 | | - $autofill->set(2); |
364 | 363 | } |
365 | 364 | } |
366 | 365 | } |
|
0 commit comments