Aggiunto ID (order) righe documenti

This commit is contained in:
Luca 2020-05-29 15:58:47 +02:00
parent 95c4d4d98f
commit 9e40728bbe
5 changed files with 79 additions and 41 deletions

View File

@ -5,7 +5,8 @@ include_once __DIR__.'/../../core.php';
echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<tr>
<th width="35" class="text-center" >'.tr('#').'</th>
<th>'.tr('Descrizione').'</th>
<th class="text-center tip" width="150" title="'.tr('da evadere').' / '.tr('totale').'">'.tr('Q.').' <i class="fa fa-question-circle-o"></i></th>
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
@ -22,6 +23,12 @@ foreach ($righe as $riga) {
echo '
<tr data-id="'.$riga->id.'">';
echo '
<td class="text-center">
'.(($riga->order)+1).'
</td>';
// Descrizione
$descrizione = nl2br($riga->descrizione);
if ($riga->isArticolo()) {
@ -140,7 +147,7 @@ $totale = abs($contratto->totale);
// Totale totale imponibile
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -153,7 +160,7 @@ echo '
if (!empty($sconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
<td class="text-right">
@ -165,7 +172,7 @@ if (!empty($sconto)) {
// Totale totale imponibile
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -178,7 +185,7 @@ if (!empty($sconto)) {
// Totale iva
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Iva', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -190,7 +197,7 @@ echo '
// Totale contratto
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -230,4 +237,4 @@ $(document).ready(function(){
});
});
});
</script>';
</script>';

View File

@ -6,6 +6,7 @@ echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<th width="35" class="text-center" >'.tr('#').'</th>
<th>'.tr('Descrizione').'</th>
<th class="text-center tip" width="150" title="'.tr('da evadere').' / '.tr('totale').'">'.tr('Q.').' <i class="fa fa-question-circle-o"></i></th>
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
@ -36,7 +37,14 @@ foreach ($righe as $riga) {
}
echo '
<tr data-id="'.$riga->id.'" '.$extra.'>
<tr data-id="'.$riga->id.'" '.$extra.'>';
echo '
<td class="text-center">
'.(($riga->order)+1).'
</td>';
echo '
<td>';
if ($riga->isArticolo()) {
echo '
@ -171,7 +179,7 @@ $totale = abs($ddt->totale);
// IMPONIBILE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
@ -186,7 +194,7 @@ echo '
if (!empty($sconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
@ -200,7 +208,7 @@ if (!empty($sconto)) {
// TOTALE IMPONIBILE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
@ -215,7 +223,7 @@ if (!empty($sconto)) {
// IVA
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('IVA', [], ['upper' => true]).':</b>
</td>
@ -229,7 +237,7 @@ echo '
// TOTALE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale', [], ['upper' => true]).':</b>
</td>
@ -271,4 +279,4 @@ $(document).ready(function(){
});
});
});
</script>';
</script>';

View File

@ -7,6 +7,7 @@ echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<th width="35" class="text-center" >'.tr('#').'</th>
<th>'.tr('Descrizione').'</th>
<th class="text-center" width="150">'.tr('Q.').'</th>
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
@ -69,7 +70,14 @@ foreach ($righe as $riga) {
}
echo '
<tr data-id="'.$riga->id.'" '.$extra.'>
<tr data-id="'.$riga->id.'" '.$extra.'>';
echo '
<td class="text-center">
'.(($riga->order)+1).'
</td>';
echo '
<td>';
if ($riga->isArticolo()) {
@ -240,7 +248,7 @@ echo '
if (!empty($sconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"><i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
<td align="right">
@ -252,7 +260,7 @@ if (!empty($sconto)) {
// TOTALE IMPONIBILE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -266,7 +274,7 @@ if (!empty($sconto)) {
if (!empty($fattura->rivalsa_inps)) {
echo '
<tr>
<td colspan="4" class="text-right">';
<td colspan="5" class="text-right">';
if ($dir == 'entrata') {
echo '
@ -287,7 +295,7 @@ if (!empty($fattura->rivalsa_inps)) {
if (!empty($iva)) {
echo '
<tr>
<td colspan="4" class="text-right">';
<td colspan="5" class="text-right">';
if ($records[0]['split_payment']) {
echo '<b>'.tr('Iva a carico del destinatario', [], ['upper' => true]).':</b>';
@ -306,7 +314,7 @@ if (!empty($iva)) {
// TOTALE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -319,7 +327,7 @@ echo '
if (!empty($fattura->ritenuta_acconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr("Ritenuta d'acconto", [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -333,7 +341,7 @@ if (!empty($fattura->ritenuta_acconto)) {
if (!empty($fattura->totale_ritenuta_contributi)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Ritenuta contributi', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -347,7 +355,7 @@ if (!empty($fattura->totale_ritenuta_contributi)) {
if ($totale != $netto_a_pagare) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Netto a pagare', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -389,4 +397,4 @@ $(document).ready(function(){
});
});
});
</script>';
</script>';

View File

@ -5,7 +5,8 @@ include_once __DIR__.'/../../core.php';
echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<tr>
<th width="35" class="text-center" >'.tr('#').'</th>
<th>'.tr('Descrizione').'</th>
<th class="text-center tip" width="150" title="'.tr('da evadere').' / '.tr('totale').'">'.tr('Q.').' <i class="fa fa-question-circle-o"></i></th>
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
@ -36,7 +37,15 @@ foreach ($righe as $riga) {
}
echo '
<tr data-id="'.$riga->id.'" '.$extra.'>
<tr data-id="'.$riga->id.'" '.$extra.'>';
echo '
<td class="text-center">
'.(($riga->order)+1).'
</td>';
echo '
<td>';
if ($riga->isArticolo()) {
@ -171,7 +180,7 @@ $totale = abs($ordine->totale);
// IMPONIBILE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -184,7 +193,7 @@ echo '
if (!empty($sconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
<td align="right">
@ -196,7 +205,7 @@ if (!empty($sconto)) {
// TOTALE IMPONIBILE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -209,7 +218,7 @@ if (!empty($sconto)) {
// IVA
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Iva', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -221,7 +230,7 @@ echo '
// TOTALE
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -261,4 +270,4 @@ $(document).ready(function(){
});
});
});
</script>';
</script>';

View File

@ -5,7 +5,8 @@ include_once __DIR__.'/../../core.php';
echo '
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<tr>
<th width="35" class="text-center" >'.tr('#').'</th>
<th>'.tr('Descrizione').'</th>
<th class="text-center tip" width="150" title="'.tr('da evadere').' / '.tr('totale').'">'.tr('Q.').' <i class="fa fa-question-circle-o"></i></th>
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
@ -22,6 +23,11 @@ foreach ($righe as $riga) {
echo '
<tr data-id="'.$riga->id.'">';
echo '
<td class="text-center">
'.(($riga->order)+1).'
</td>';
// Descrizione
$descrizione = nl2br($riga->descrizione);
if ($riga->isArticolo()) {
@ -139,7 +145,7 @@ $totale = abs($preventivo->totale);
// Totale imponibile scontato
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="4" class="text-right">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -152,7 +158,7 @@ echo '
if (!empty($sconto)) {
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b><span class="tip" title="'.tr('Un importo positivo indica uno sconto, mentre uno negativo indica una maggiorazione').'"> <i class="fa fa-question-circle-o"></i> '.tr('Sconto/maggiorazione', [], ['upper' => true]).':</span></b>
</td>
<td class="text-right">
@ -164,7 +170,7 @@ if (!empty($sconto)) {
// Totale imponibile scontato
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale imponibile', [], ['upper' => true]).':</b>
</td>
<td align="right">
@ -177,7 +183,7 @@ if (!empty($sconto)) {
// Totale iva
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Iva', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -189,7 +195,7 @@ echo '
// Totale
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
<b>'.tr('Totale', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
@ -205,7 +211,7 @@ $margine_icon = ($margine <= 0 and $preventivo->totale > 0) ? 'warning' : 'check
echo '
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
'.tr('Costi').':
</td>
<td align="right">
@ -215,7 +221,7 @@ echo '
</tr>
<tr>
<td colspan="4" class="text-right">
<td colspan="5" class="text-right">
'.tr('Margine (_PRC_%)', [
'_PRC_' => numberFormat($preventivo->margine_percentuale),
]).':
@ -257,4 +263,4 @@ $(document).ready(function(){
});
});
});
</script>';
</script>';