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>';

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']);
@ -43,8 +43,9 @@ foreach ($righe as $riga) {
<tr>';
echo '
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
<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']);
@ -43,8 +43,9 @@ foreach ($righe as $riga) {
<tr>';
echo '
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
<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']);
@ -59,8 +59,9 @@ foreach ($righe as $riga) {
<tr>';
echo '
<td class=\'text-center\' >
'.($r['order'] + 1).'</td>';
<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']);
@ -135,7 +135,8 @@ foreach ($righe as $riga) {
echo '
<td class="text-center" style="vertical-align: middle">
'.($r['order'] + 1).'</td>';
'.($key + 1).'
</td>';
if ($has_images) {
echo '<td class=\"text-center\" style=\"vertical-align: middle\" >';