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 = $contratto->getRighe();
foreach ($righe as $riga) {
foreach ($righe as $key => $riga) {
echo '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'">
<td class="text-center">
'.($riga->order + 1).'
'.($key + 1).'
</td>';
// Descrizione

View File

@ -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 '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center">
'.($riga->order + 1).'
'.($key + 1).'
</td>
<td>';

View File

@ -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 '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center">
'.($riga->order + 1).'
'.($key + 1).'
</td>
<td>';

View File

@ -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 '
<tr data-id="'.$riga->id.'" data-type="'.get_class($riga).'" '.$extra.'>
<td class="text-center">
'.($riga->order + 1).'
'.($key + 1).'
</td>
<td>';
@ -106,7 +106,7 @@ foreach ($righe as $riga) {
<td class="text-center">
'.$info_evasione.'
</td>';
if ($riga->isDescrizione()) {
echo '
<td></td>

View File

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

View File

@ -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 '
<tr>';
echo'
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
echo '
<td class="text-center" style="vertical-align: middle">
'.($key + 1).'
</td>';
echo'
<td>

View File

@ -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 '
<tr>';
echo'
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
echo '
<td class="text-center" style="vertical-align: middle">
'.($key + 1).'
</td>';
echo '
<td>

View File

@ -50,7 +50,7 @@ if ($options['pricing']) {
<tbody>';
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 '
<tr>';
echo'
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
echo '
<td class="text-center" style="vertical-align: middle">
'.($key + 1).'
</td>';
if ($has_image) {
if ($riga->isArticolo()) {

View File

@ -125,7 +125,7 @@ echo '
<tbody>';
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 '
<tr>';
echo'
<td class="text-center" style="vertical-align: middle" >
'.($r['order'] + 1).'</td>';
echo '
<td class="text-center" style="vertical-align: middle">
'.($key + 1).'
</td>';
if ($has_images) {
echo '<td class=\"text-center\" style=\"vertical-align: middle\" >';