diff --git a/modules/contratti/row-list.php b/modules/contratti/row-list.php
index 559d5a186..4f391b3c9 100755
--- a/modules/contratti/row-list.php
+++ b/modules/contratti/row-list.php
@@ -21,11 +21,11 @@ echo '
// Righe documento
$righe = $contratto->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
echo '
- '.($riga->order + 1).'
+ '.($key + 1).'
| ';
// Descrizione
diff --git a/modules/ddt/row-list.php b/modules/ddt/row-list.php
index 10b92baf4..0c31abd9c 100755
--- a/modules/ddt/row-list.php
+++ b/modules/ddt/row-list.php
@@ -21,7 +21,7 @@ echo '
// Righe documento
$righe = $ddt->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$extra = '';
$mancanti = 0;
@@ -40,7 +40,7 @@ foreach ($righe as $riga) {
echo '
- '.($riga->order + 1).'
+ '.($key + 1).'
|
';
diff --git a/modules/fatture/row-list.php b/modules/fatture/row-list.php
index 792befc4f..fac8e8fd9 100755
--- a/modules/fatture/row-list.php
+++ b/modules/fatture/row-list.php
@@ -20,7 +20,7 @@ echo '
// Righe documento
$righe = $fattura->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$extra = '';
$mancanti = 0;
$delete = 'delete_riga';
@@ -71,7 +71,7 @@ foreach ($righe as $riga) {
echo '
|
- '.($riga->order + 1).'
+ '.($key + 1).'
|
';
diff --git a/modules/ordini/row-list.php b/modules/ordini/row-list.php
index 3c63a0f2f..8d4cf15ed 100755
--- a/modules/ordini/row-list.php
+++ b/modules/ordini/row-list.php
@@ -24,7 +24,7 @@ echo '
$today = new Carbon\Carbon();
$today = $today->startOfDay();
$righe = $ordine->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$extra = '';
$mancanti = 0;
@@ -43,7 +43,7 @@ foreach ($righe as $riga) {
echo '
|
- '.($riga->order + 1).'
+ '.($key + 1).'
|
';
@@ -106,7 +106,7 @@ foreach ($righe as $riga) {
|
'.$info_evasione.'
| ';
-
+
if ($riga->isDescrizione()) {
echo '
|
diff --git a/modules/preventivi/row-list.php b/modules/preventivi/row-list.php
index 8002150ed..03913fccc 100755
--- a/modules/preventivi/row-list.php
+++ b/modules/preventivi/row-list.php
@@ -20,11 +20,11 @@ echo '
// Righe documento
$righe = $preventivo->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
echo '
- '.($riga->order + 1).'
+ '.($key + 1).'
| ';
// Descrizione
diff --git a/templates/ddt/body.php b/templates/ddt/body.php
index 9ad39f769..bf3159401 100755
--- a/templates/ddt/body.php
+++ b/templates/ddt/body.php
@@ -34,7 +34,7 @@ if ($options['pricing']) {
// Righe documento
$righe = $documento->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$r = $riga->toArray();
$autofill->count($r['descrizione']);
@@ -42,9 +42,10 @@ foreach ($righe as $riga) {
echo '
';
- echo'
-
- '.($r['order'] + 1).' | ';
+ echo '
+
+ '.($key + 1).'
+ | ';
echo'
diff --git a/templates/fatture/body.php b/templates/fatture/body.php
index 52384300d..867fb7863 100755
--- a/templates/fatture/body.php
+++ b/templates/fatture/body.php
@@ -31,7 +31,7 @@ echo "
// Righe documento
$righe = $documento->getRighe();
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$r = $riga->toArray();
$autofill->count($r['descrizione']);
@@ -42,9 +42,10 @@ foreach ($righe as $riga) {
echo '
|
';
- echo'
-
- '.($r['order'] + 1).' | ';
+ echo '
+
+ '.($key + 1).'
+ | ';
echo '
diff --git a/templates/ordini/body.php b/templates/ordini/body.php
index 407d5b110..ca7922111 100755
--- a/templates/ordini/body.php
+++ b/templates/ordini/body.php
@@ -50,7 +50,7 @@ if ($options['pricing']) {
|
';
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$r = $riga->toArray();
$autofill->count($r['descrizione']);
@@ -58,9 +58,10 @@ foreach ($righe as $riga) {
echo '
';
- echo'
-
- '.($r['order'] + 1).' | ';
+ echo '
+
+ '.($key + 1).'
+ | ';
if ($has_image) {
if ($riga->isArticolo()) {
diff --git a/templates/preventivi/body.php b/templates/preventivi/body.php
index f0cfe1e46..45b2d2f63 100755
--- a/templates/preventivi/body.php
+++ b/templates/preventivi/body.php
@@ -125,7 +125,7 @@ echo '
';
-foreach ($righe as $riga) {
+foreach ($righe as $key => $riga) {
$r = $riga->toArray();
$autofill->count($r['descrizione']);
@@ -133,9 +133,10 @@ foreach ($righe as $riga) {
echo '
';
- echo'
-
- '.($r['order'] + 1).' | ';
+ echo '
+
+ '.($key + 1).'
+ | ';
if ($has_images) {
echo '';
|