diff --git a/modules/contratti/row-list.php b/modules/contratti/row-list.php index 3e2a48eea..ee0d02bb2 100755 --- a/modules/contratti/row-list.php +++ b/modules/contratti/row-list.php @@ -38,11 +38,14 @@ echo ' // Righe documento $righe = $contratto->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; + echo ' - '.($key + 1).' + '.$num.' '; // Descrizione diff --git a/modules/ddt/row-list.php b/modules/ddt/row-list.php index 291233f97..18f53ef93 100755 --- a/modules/ddt/row-list.php +++ b/modules/ddt/row-list.php @@ -38,7 +38,10 @@ echo ' // Righe documento $righe = $ddt->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; + $extra = ''; $mancanti = 0; @@ -57,7 +60,7 @@ foreach ($righe as $key => $riga) { echo ' - '.($key + 1).' + '.$num.' '; diff --git a/modules/fatture/row-list.php b/modules/fatture/row-list.php index b0f01a86a..44f681d99 100755 --- a/modules/fatture/row-list.php +++ b/modules/fatture/row-list.php @@ -37,7 +37,10 @@ echo ' // Righe documento $righe = $fattura->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; + $extra = ''; $mancanti = 0; $delete = 'delete_riga'; @@ -88,7 +91,7 @@ foreach ($righe as $key => $riga) { echo ' - '.($key + 1).' + '.$num.' '; diff --git a/modules/ordini/row-list.php b/modules/ordini/row-list.php index 97662a8e6..0df95ef9a 100755 --- a/modules/ordini/row-list.php +++ b/modules/ordini/row-list.php @@ -41,7 +41,10 @@ echo ' $today = new Carbon\Carbon(); $today = $today->startOfDay(); $righe = $ordine->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; + $extra = ''; $mancanti = 0; @@ -60,7 +63,7 @@ foreach ($righe as $key => $riga) { echo ' - '.($key + 1).' + '.$num.' '; diff --git a/modules/preventivi/row-list.php b/modules/preventivi/row-list.php index 07511dbd4..3edb929d5 100755 --- a/modules/preventivi/row-list.php +++ b/modules/preventivi/row-list.php @@ -37,11 +37,14 @@ echo ' // Righe documento $righe = $preventivo->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; + echo ' - '.($key + 1).' + '.$num.' '; // Descrizione diff --git a/templates/ddt/body.php b/templates/ddt/body.php index 6a3dd6b2c..367cb7fea 100755 --- a/templates/ddt/body.php +++ b/templates/ddt/body.php @@ -51,17 +51,17 @@ if ($options['pricing']) { // Righe documento $righe = $documento->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); echo ' - '; - - echo ' + - '.($key + 1).' + '.$num.' '; echo' diff --git a/templates/fatture/body.php b/templates/fatture/body.php index 0a64287bb..872b80655 100755 --- a/templates/fatture/body.php +++ b/templates/fatture/body.php @@ -48,7 +48,9 @@ echo " // Righe documento $righe = $documento->getRighe(); -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); @@ -61,7 +63,7 @@ foreach ($righe as $key => $riga) { echo ' - '.($key + 1).' + '.$num.' '; echo ' diff --git a/templates/ordini/body.php b/templates/ordini/body.php index f8e4cf0a9..f4753dd66 100755 --- a/templates/ordini/body.php +++ b/templates/ordini/body.php @@ -67,18 +67,18 @@ if ($options['pricing']) { '; -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); echo ' - '; - - echo ' - - '.($key + 1).' - '; + + + '.$num.' + '; if ($has_image) { if ($riga->isArticolo()) { diff --git a/templates/preventivi/body.php b/templates/preventivi/body.php index 1af65a42e..a04adb6f2 100755 --- a/templates/preventivi/body.php +++ b/templates/preventivi/body.php @@ -142,18 +142,18 @@ echo ' '; -foreach ($righe as $key => $riga) { +$num = 0; +foreach ($righe as $riga) { + ++$num; $r = $riga->toArray(); $autofill->count($r['descrizione']); echo ' - '; - - echo ' - - '.($key + 1).' - '; + + + '.$num.' + '; if ($has_images) { echo '';