Gestione Autofattura
This commit is contained in:
parent
86f22542cf
commit
3a6184ccae
|
@ -1107,4 +1107,8 @@ div.tip {
|
||||||
.table-extra-condensed > tbody > tr > td,
|
.table-extra-condensed > tbody > tr > td,
|
||||||
.table-extra-condensed > tfoot > tr > td {
|
.table-extra-condensed > tfoot > tr > td {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-warning {
|
||||||
|
background-color: #ff851b !important;
|
||||||
}
|
}
|
|
@ -20,6 +20,7 @@
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
use Modules\Anagrafiche\Anagrafica;
|
use Modules\Anagrafiche\Anagrafica;
|
||||||
|
use Modules\Anagrafiche\Tipo as TipoAnagrafica;
|
||||||
use Modules\Articoli\Articolo as ArticoloOriginale;
|
use Modules\Articoli\Articolo as ArticoloOriginale;
|
||||||
use Modules\Fatture\Components\Articolo;
|
use Modules\Fatture\Components\Articolo;
|
||||||
use Modules\Fatture\Components\Descrizione;
|
use Modules\Fatture\Components\Descrizione;
|
||||||
|
@ -28,7 +29,7 @@ use Modules\Fatture\Components\Sconto;
|
||||||
use Modules\Fatture\Fattura;
|
use Modules\Fatture\Fattura;
|
||||||
use Modules\Fatture\Stato;
|
use Modules\Fatture\Stato;
|
||||||
use Modules\Fatture\Tipo;
|
use Modules\Fatture\Tipo;
|
||||||
use Plugins\ExportFE\FatturaElettronica;
|
use Modules\Iva\Aliquota;
|
||||||
use Util\XML;
|
use Util\XML;
|
||||||
|
|
||||||
$module = Modules::get($id_module);
|
$module = Modules::get($id_module);
|
||||||
|
@ -817,10 +818,9 @@ switch (post('op')) {
|
||||||
$copia = $riga->copiaIn($nota, $qta);
|
$copia = $riga->copiaIn($nota, $qta);
|
||||||
$copia->ref_riga_documento = $riga->id;
|
$copia->ref_riga_documento = $riga->id;
|
||||||
|
|
||||||
// Aggiornamento seriali dalla riga dell'ordine
|
// Aggiornamento seriali dalla riga della fattura
|
||||||
if ($copia->isArticolo()) {
|
if ($copia->isArticolo()) {
|
||||||
$serials = is_array(post('serial')[$riga->id]) ? post('serial')[$riga->id] : [];
|
$serials = is_array(post('serial')[$riga->id]) ? post('serial')[$riga->id] : [];
|
||||||
|
|
||||||
$copia->serials = $serials;
|
$copia->serials = $serials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -833,6 +833,50 @@ switch (post('op')) {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Autofattura
|
||||||
|
case 'autofattura':
|
||||||
|
$fattura = Fattura::find($id_record);
|
||||||
|
|
||||||
|
$id_segment = post('id_segment');
|
||||||
|
$data = date('Y-m-d');
|
||||||
|
|
||||||
|
$anagrafica = $fattura->anagrafica;
|
||||||
|
$tipo = Tipo::find(post('idtipodocumento'));
|
||||||
|
$iva = Aliquota::find(setting('Iva predefinita'));
|
||||||
|
$totale_imponibile = setting('Utilizza prezzi di vendita comprensivi di IVA') ? $fattura->totale_imponibile + ($fattura->totale_imponibile * $iva->percentuale / 100) : $fattura->totale_imponibile;
|
||||||
|
|
||||||
|
$autofattura = Fattura::build($anagrafica, $tipo, $data, $id_segment);
|
||||||
|
$autofattura->idconto = $fattura->idconto;
|
||||||
|
$autofattura->idpagamento = $fattura->idpagamento;
|
||||||
|
$autofattura->is_fattura_conto_terzi = 1;
|
||||||
|
$autofattura->save();
|
||||||
|
|
||||||
|
$riga = Riga::build($autofattura);
|
||||||
|
$riga->descrizione = $tipo->descrizione;
|
||||||
|
$riga->id_iva = $iva->id;
|
||||||
|
$riga->idconto = setting('Conto per autofattura') ?: setting('Conto predefinito fatture di vendita');
|
||||||
|
$riga->setPrezzoUnitario($totale_imponibile, $iva->id);
|
||||||
|
$riga->qta = 1;
|
||||||
|
$riga->save();
|
||||||
|
|
||||||
|
// Aggiunta tipologia cliente se necessario
|
||||||
|
if (!$anagrafica->isTipo('Cliente')) {
|
||||||
|
$tipo_cliente = TipoAnagrafica::where('descrizione', '=', 'Cliente')->first();
|
||||||
|
$tipi = $anagrafica->tipi->pluck('idtipoanagrafica')->toArray();
|
||||||
|
$tipi[] = $tipo_cliente->id;
|
||||||
|
|
||||||
|
$anagrafica->tipologie = $tipi;
|
||||||
|
$anagrafica->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$fattura->id_autofattura = $autofattura->id;
|
||||||
|
$fattura->save();
|
||||||
|
|
||||||
|
$id_module = Modules::get('Fatture di vendita')['id'];
|
||||||
|
$id_record = $autofattura->id;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case 'transform':
|
case 'transform':
|
||||||
$fattura->id_segment = post('id_segment');
|
$fattura->id_segment = post('id_segment');
|
||||||
$fattura->data = post('data');
|
$fattura->data = post('data');
|
||||||
|
|
|
@ -33,14 +33,15 @@ if ($module->name == 'Fatture di vendita') {
|
||||||
</a>';
|
</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($dir == 'entrata') {
|
if ($dir == 'entrata' || !empty($abilita_autofattura)) {
|
||||||
echo '
|
echo '
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary unblockable dropdown-toggle '.(((!empty($record['ref_documento']) || $record['stato'] != 'Bozza') and empty($record['is_reversed'])) ? '' : 'disabled').'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-primary unblockable dropdown-toggle '.(((!empty($record['ref_documento']) || $record['stato'] != 'Bozza') and empty($record['is_reversed'])) ? '' : 'disabled').'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fa fa-magic"></i> '.tr('Crea').'
|
<i class="fa fa-magic"></i> '.tr('Crea').'
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>';
|
||||||
|
if ($dir == 'entrata') {
|
||||||
|
echo '
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
|
<li><a href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=nota_addebito&backto=record-edit">
|
||||||
'.tr('Nota di debito').'
|
'.tr('Nota di debito').'
|
||||||
|
@ -49,7 +50,16 @@ if ($dir == 'entrata') {
|
||||||
<li><a data-href="'.base_path().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
|
<li><a data-href="'.base_path().'/modules/fatture/crea_documento.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi nota di credito">
|
||||||
'.tr('Nota di credito').'
|
'.tr('Nota di credito').'
|
||||||
</a></li>
|
</a></li>
|
||||||
</ul>
|
</ul>';
|
||||||
|
} elseif (!empty($abilita_autofattura)) {
|
||||||
|
echo '
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
|
<li><a data-href="'.base_path().'/modules/fatture/crea_autofattura.php?id_module='.$id_module.'&id_record='.$id_record.'&iddocumento='.$id_record.'" data-title="Aggiungi autofattura">
|
||||||
|
'.tr('Autofattura').'
|
||||||
|
</a></li>
|
||||||
|
</ul>';
|
||||||
|
}
|
||||||
|
echo '
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,4 +118,4 @@ if (!empty($record['is_fiscale'])) {
|
||||||
<i class="fa fa-folder-open"></i> '.tr('Riapri documento').'...
|
<i class="fa fa-folder-open"></i> '.tr('Riapri documento').'...
|
||||||
</button>';
|
</button>';
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||||
|
* Copyright (C) DevCode s.r.l.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
|
$id_module_fatture_vendita = Modules::get('Fatture di vendita')['id'];
|
||||||
|
$id_segment = setting('Sezionale per autofatture di vendita');
|
||||||
|
|
||||||
|
echo '
|
||||||
|
<form action="" method="post" id="crea-autofattura">
|
||||||
|
<input type="hidden" name="backto" value="record-edit">
|
||||||
|
<input type="hidden" name="op" value="autofattura">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{[ "type": "select", "label": "'.tr('Tipo documento').'", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT_WS(\" - \",codice_tipo_documento_fe, descrizione) AS descrizione FROM co_tipidocumento WHERE dir=\"entrata\" AND codice_tipo_documento_fe IN(\"TD16\", \"TD17\", \"TD18\", \"TD19\", \"TD20\") ORDER BY codice_tipo_documento_fe" ]}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE id_module='.prepare($id_module_fatture_vendita).' ORDER BY name", "value": "'.$id_segment.'" ]}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- PULSANTI -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-right">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
<i class="fa fa-magic"></i> '.tr('Crea autofattura').'
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>$(document).ready(init)</script>';
|
|
@ -86,6 +86,45 @@ if ($dir == 'entrata' && !empty($fattura->dichiarazione) ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Autofattura
|
||||||
|
if (!empty($fattura_acquisto_originale)) {
|
||||||
|
echo '
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<i class="fa fa-info"></i> '.tr("Questa è un'autofattura generata da una fattura di acquisto").':
|
||||||
|
<b>'.Modules::link('Fatture di acquisto', $fattura_acquisto_originale->id, tr('Fattura num. _NUM_ del _DATE_', [
|
||||||
|
'_NUM_' => $fattura_acquisto_originale->numero_esterno,
|
||||||
|
'_DATE_' => dateFormat($fattura_acquisto_originale->data),
|
||||||
|
])).'</b>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($abilita_autofattura) {
|
||||||
|
echo '
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<i class="fa fa-info-circle"></i> '.tr("Per questa fattura è prevista la generazione di un'autofattura tramite <b>Crea » Autofattura</b>").'.
|
||||||
|
</div>';
|
||||||
|
} elseif ($fattura->id_autofattura != null) {
|
||||||
|
echo '
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<i class="fa fa-info"></i> '.tr("È presente un'autofattura collegata").':
|
||||||
|
<b>'.Modules::link('Fatture di vendita', $fattura->id_autofattura, tr('Fattura num. _NUM_ del _DATE_', [
|
||||||
|
'_NUM_' => $autofattura_vendita->numero_esterno,
|
||||||
|
'_DATE_' => dateFormat($autofattura_vendita->data),
|
||||||
|
])).'</b>
|
||||||
|
</div>';
|
||||||
|
} elseif ($autofattura_collegata != null) {
|
||||||
|
$link_module = $fattura->direzione == 'entrata' ? 'Fatture di acquisto' : 'Fatture di vendita';
|
||||||
|
$link_desc = $fattura->direzione == 'entrata' ? tr("Questa autofattura è già stata importata come fattura di acquisto") : tr("È presente un'autofattura collegata");
|
||||||
|
echo '
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<i class="fa fa-info"></i> '.$link_desc.':
|
||||||
|
<b>'.Modules::link($link_module, $autofattura_collegata->id, tr('Fattura num. _NUM_ del _DATE_', [
|
||||||
|
'_NUM_' => $autofattura_collegata->numero_esterno,
|
||||||
|
'_DATE_' => dateFormat($autofattura_collegata->data),
|
||||||
|
])).'</b>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
// Ricordo che si sta emettendo una fattura conto terzi
|
// Ricordo che si sta emettendo una fattura conto terzi
|
||||||
if ($dir == 'entrata' && $fattura->stato->descrizione == 'Bozza' ) {
|
if ($dir == 'entrata' && $fattura->stato->descrizione == 'Bozza' ) {
|
||||||
if ($fattura->is_fattura_conto_terzi){
|
if ($fattura->is_fattura_conto_terzi){
|
||||||
|
@ -96,7 +135,6 @@ if ($dir == 'entrata' && $fattura->stato->descrizione == 'Bozza' ) {
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// Verifica aggiuntive sulla sequenzialità dei numeri
|
// Verifica aggiuntive sulla sequenzialità dei numeri
|
||||||
if ($dir == 'entrata') {
|
if ($dir == 'entrata') {
|
||||||
|
|
|
@ -63,4 +63,23 @@ if (isset($id_record)) {
|
||||||
// Blocco gestito dallo stato della Fattura Elettronica
|
// Blocco gestito dallo stato della Fattura Elettronica
|
||||||
$stato_fe = $database->fetchOne('SELECT * FROM fe_stati_documento WHERE codice = '.prepare($fattura->codice_stato_fe));
|
$stato_fe = $database->fetchOne('SELECT * FROM fe_stati_documento WHERE codice = '.prepare($fattura->codice_stato_fe));
|
||||||
$abilita_genera = empty($fattura->codice_stato_fe) || intval($stato_fe['is_generabile']);
|
$abilita_genera = empty($fattura->codice_stato_fe) || intval($stato_fe['is_generabile']);
|
||||||
|
|
||||||
|
// Controllo autofattura e gestione avvisi
|
||||||
|
$reverse_charge = null;
|
||||||
|
$abilita_autofattura = null;
|
||||||
|
$autofattura_vendita = null;
|
||||||
|
$fattura_acquisto_originale = null;
|
||||||
|
|
||||||
|
if (!empty($fattura)) {
|
||||||
|
$reverse_charge = $fattura->getRighe()->first(function ($item, $key) {
|
||||||
|
return $item->aliquota != null && substr($item->aliquota->codice_natura_fe, 0, 2) == 'N6';
|
||||||
|
})->id;
|
||||||
|
$autofattura_vendita = Fattura::find($fattura->id_autofattura);
|
||||||
|
if (empty($autofattura_vendita) && !empty($fattura->progressivo_invio)) {
|
||||||
|
$autofattura_collegata = Fattura::where('progressivo_invio', '=', $fattura->progressivo_invio)->where('id', '!=', $fattura->id)->first();
|
||||||
|
}
|
||||||
|
$abilita_autofattura = ($fattura->anagrafica->nazione->iso2 != 'IT' || $reverse_charge) && $dir == 'uscita' && $fattura->id_autofattura == null && empty($autofattura_collegata);
|
||||||
|
|
||||||
|
$fattura_acquisto_originale = Fattura::where('id_autofattura', '=', $fattura->id)->first();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -747,6 +747,17 @@ class Fattura extends Document
|
||||||
return $this->tipo->reversed == 1;
|
return $this->tipo->reversed == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controlla se la fattura è una nota di credito.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isAutofattura()
|
||||||
|
{
|
||||||
|
return in_array($this->tipo->codice_tipo_documento_fe, ['TD16','TD17','TD18','TD19',
|
||||||
|
'TD20']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controlla se la fattura è fiscale.
|
* Controlla se la fattura è fiscale.
|
||||||
*
|
*
|
||||||
|
|
|
@ -143,6 +143,14 @@ switch (filter('op')) {
|
||||||
$fattura_pa->delete();
|
$fattura_pa->delete();
|
||||||
$fattura = Fattura::find($id_fattura);
|
$fattura = Fattura::find($id_fattura);
|
||||||
|
|
||||||
|
if ($fattura->isAutofattura()) {
|
||||||
|
$autofattura_collegata = Fattura::where('progressivo_invio', '=', $fattura->progressivo_invio)->where('id', '!=', $fattura->id)->first();
|
||||||
|
if (!empty($autofattura_collegata)) {
|
||||||
|
$fattura->registraScadenze(true);
|
||||||
|
$autofattura_collegata->registraScadenze(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Aggiorno la tipologia di anagrafica fornitore
|
// Aggiorno la tipologia di anagrafica fornitore
|
||||||
$anagrafica = $database->fetchOne('SELECT idanagrafica FROM co_documenti WHERE co_documenti.id='.prepare($id_fattura));
|
$anagrafica = $database->fetchOne('SELECT idanagrafica FROM co_documenti WHERE co_documenti.id='.prepare($id_fattura));
|
||||||
$rs_t = $database->fetchOne("SELECT * FROM an_tipianagrafiche_anagrafiche WHERE idtipoanagrafica=(SELECT an_tipianagrafiche.idtipoanagrafica FROM an_tipianagrafiche WHERE an_tipianagrafiche.descrizione='Fornitore') AND idanagrafica=".prepare($anagrafica['idanagrafica']));
|
$rs_t = $database->fetchOne("SELECT * FROM an_tipianagrafiche_anagrafiche WHERE idtipoanagrafica=(SELECT an_tipianagrafiche.idtipoanagrafica FROM an_tipianagrafiche WHERE an_tipianagrafiche.descrizione='Fornitore') AND idanagrafica=".prepare($anagrafica['idanagrafica']));
|
||||||
|
|
|
@ -124,6 +124,11 @@ if (isset($fattura_body['DatiPagamento'])) {
|
||||||
$pagamenti = isset($pagamenti[0]) ? $pagamenti : [$pagamenti];
|
$pagamenti = isset($pagamenti[0]) ? $pagamenti : [$pagamenti];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$is_autofattura = false;
|
||||||
|
if (in_array($dati_generali['TipoDocumento'], ['TD16', 'TD17', 'TD18', 'TD19', 'TD20'])) {
|
||||||
|
$is_autofattura = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Individuazione metodo di pagamento di base
|
// Individuazione metodo di pagamento di base
|
||||||
$metodi = isset($pagamenti[0]['DettaglioPagamento']) ? $pagamenti[0]['DettaglioPagamento'] : [];
|
$metodi = isset($pagamenti[0]['DettaglioPagamento']) ? $pagamenti[0]['DettaglioPagamento'] : [];
|
||||||
$metodi = isset($metodi[0]) ? $metodi : [$metodi];
|
$metodi = isset($metodi[0]) ? $metodi : [$metodi];
|
||||||
|
@ -219,9 +224,11 @@ echo '
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
// Sezionale
|
// Sezionale
|
||||||
|
$id_segment = $is_autofattura ? setting('Sezionale per autofatture di acquisto') : $_SESSION['module_'.$id_module]['id_segment'];
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE is_fiscale = 1 AND id_module='.$id_module.' ORDER BY name", "value": "'.$_SESSION['module_'.$id_module]['id_segment'].'" ]}
|
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_segment", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_segments WHERE is_fiscale = 1 AND id_module='.$id_module.' ORDER BY name", "value": "'.$id_segment.'" ]}
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
// Data di registrazione
|
// Data di registrazione
|
||||||
|
@ -400,6 +407,7 @@ if (!empty($righe)) {
|
||||||
$idconto_acquisto = $database->fetchOne('SELECT idconto_acquisto FROM mg_articoli WHERE id = '.prepare($id_articolo))['idconto_acquisto'];
|
$idconto_acquisto = $database->fetchOne('SELECT idconto_acquisto FROM mg_articoli WHERE id = '.prepare($id_articolo))['idconto_acquisto'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$idconto_acquisto = $is_autofattura ? setting('Conto per autofattura') : $idconto_acquisto;
|
||||||
$qta = $riga['Quantita'];
|
$qta = $riga['Quantita'];
|
||||||
$um = $riga['UnitaMisura'];
|
$um = $riga['UnitaMisura'];
|
||||||
$prezzo_unitario = $riga['PrezzoUnitario'] ?: $riga['Importo'];
|
$prezzo_unitario = $riga['PrezzoUnitario'] ?: $riga['Importo'];
|
||||||
|
|
Loading…
Reference in New Issue