Correzione numerazione delle righe documenti

This commit is contained in:
Dasc3er 2020-09-03 14:41:17 +02:00
parent 445e28e7bd
commit a67064e459
9 changed files with 31 additions and 27 deletions

View File

@ -21,11 +21,11 @@ echo '
// Righe documento // Righe documento
$righe = $contratto->getRighe(); $righe = $contratto->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
echo ' echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'"> <tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'">
<td class="text-center"> <td class="text-center">
'.($riga->order + 1).' '.($key + 1).'
</td>'; </td>';
// Descrizione // Descrizione

View File

@ -21,7 +21,7 @@ echo '
// Righe documento // Righe documento
$righe = $ddt->getRighe(); $righe = $ddt->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$extra = ''; $extra = '';
$mancanti = 0; $mancanti = 0;
@ -40,7 +40,7 @@ foreach ($righe as $riga) {
echo ' echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'> <tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center"> <td class="text-center">
'.($riga->order + 1).' '.($key + 1).'
</td> </td>
<td>'; <td>';

View File

@ -20,7 +20,7 @@ echo '
// Righe documento // Righe documento
$righe = $fattura->getRighe(); $righe = $fattura->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$extra = ''; $extra = '';
$mancanti = 0; $mancanti = 0;
$delete = 'delete_riga'; $delete = 'delete_riga';
@ -71,7 +71,7 @@ foreach ($righe as $riga) {
echo ' echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'> <tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center"> <td class="text-center">
'.($riga->order + 1).' '.($key + 1).'
</td> </td>
<td>'; <td>';

View File

@ -24,7 +24,7 @@ echo '
$today = new Carbon\Carbon(); $today = new Carbon\Carbon();
$today = $today->startOfDay(); $today = $today->startOfDay();
$righe = $ordine->getRighe(); $righe = $ordine->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$extra = ''; $extra = '';
$mancanti = 0; $mancanti = 0;
@ -43,7 +43,7 @@ foreach ($righe as $riga) {
echo ' echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'> <tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center"> <td class="text-center">
'.($riga->order + 1).' '.($key + 1).'
</td> </td>
<td>'; <td>';

View File

@ -20,11 +20,11 @@ echo '
// Righe documento // Righe documento
$righe = $preventivo->getRighe(); $righe = $preventivo->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
echo ' echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'"> <tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'">
<td class="text-center"> <td class="text-center">
'.($riga->order + 1).' '.($key + 1).'
</td>'; </td>';
// Descrizione // Descrizione

View File

@ -34,7 +34,7 @@ if ($options['pricing']) {
// Righe documento // Righe documento
$righe = $documento->getRighe(); $righe = $documento->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$r = $riga->toArray(); $r = $riga->toArray();
$autofill->count($r['descrizione']); $autofill->count($r['descrizione']);
@ -42,9 +42,10 @@ foreach ($righe as $riga) {
echo ' echo '
<tr>'; <tr>';
echo' echo '
<td class=\'text-center\' > <td class="text-center" style="vertical-align: middle">
'.($r['order'] + 1).'</td>'; '.($key + 1).'
</td>';
echo' echo'
<td> <td>

View File

@ -31,7 +31,7 @@ echo "
// Righe documento // Righe documento
$righe = $documento->getRighe(); $righe = $documento->getRighe();
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$r = $riga->toArray(); $r = $riga->toArray();
$autofill->count($r['descrizione']); $autofill->count($r['descrizione']);
@ -42,9 +42,10 @@ foreach ($righe as $riga) {
echo ' echo '
<tr>'; <tr>';
echo' echo '
<td class=\'text-center\' > <td class="text-center" style="vertical-align: middle">
'.($r['order'] + 1).'</td>'; '.($key + 1).'
</td>';
echo ' echo '
<td> <td>

View File

@ -50,7 +50,7 @@ if ($options['pricing']) {
<tbody>'; <tbody>';
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$r = $riga->toArray(); $r = $riga->toArray();
$autofill->count($r['descrizione']); $autofill->count($r['descrizione']);
@ -58,9 +58,10 @@ foreach ($righe as $riga) {
echo ' echo '
<tr>'; <tr>';
echo' echo '
<td class=\'text-center\' > <td class="text-center" style="vertical-align: middle">
'.($r['order'] + 1).'</td>'; '.($key + 1).'
</td>';
if ($has_image) { if ($has_image) {
if ($riga->isArticolo()) { if ($riga->isArticolo()) {

View File

@ -125,7 +125,7 @@ echo '
<tbody>'; <tbody>';
foreach ($righe as $riga) { foreach ($righe as $key => $riga) {
$r = $riga->toArray(); $r = $riga->toArray();
$autofill->count($r['descrizione']); $autofill->count($r['descrizione']);
@ -133,9 +133,10 @@ foreach ($righe as $riga) {
echo ' echo '
<tr>'; <tr>';
echo' echo '
<td class="text-center" style="vertical-align: middle" > <td class="text-center" style="vertical-align: middle">
'.($r['order'] + 1).'</td>'; '.($key + 1).'
</td>';
if ($has_images) { if ($has_images) {
echo '<td class=\"text-center\" style=\"vertical-align: middle\" >'; echo '<td class=\"text-center\" style=\"vertical-align: middle\" >';