Patch level : 12.0 1056

Files correlati     : cg2.exe ve0.exe

Il campo reverse charge delle righe IVA non era inizializzato correttamente dalla contabilizzazione delle vendite.

Interno

Da controllare una vendita un acquistoe un acquisto reverse charge.
This commit is contained in:
Alessandro Bonazzi 2021-04-13 22:50:44 +02:00
parent 151046c354
commit 47dea9f314

View File

@ -713,7 +713,7 @@ error_type TIVA_array::add(const TRiga_documento& r, const TBill& conto, const i
// speciale per lo storno, proveniente da configurazione
const TString4 tipodet = r.get(RDOC_TIPODET);
const bool revcharge = r.get_bool(RDOC_REVCHARGE);
const bool revcharge = _caus->reg().tipo_registro() == acquisto && _caus->reverse_charge_pubb() && r.get_bool(RDOC_REVCHARGE);
TString80 key;
key.format("%d|%-4s|%c|%03d|%03d|%06ld|%s",
@ -727,7 +727,7 @@ error_type TIVA_array::add(const TRiga_documento& r, const TBill& conto, const i
else
key << "|+";
}
if (_caus->reverse_charge_pubb())
if (_caus->reg().tipo_registro() == acquisto && _caus->reverse_charge_pubb())
key << '|' << revcharge;
@ -2235,7 +2235,7 @@ error_type TContabilizzazione::create_iva_rows(TDocumento& doc)
const bool revcharge = cur.get_bool(RMI_REVCHARGE);
rec_iva.put(RMI_REVCHARGE, revcharge);
if (_caus->reverse_charge_pubb() && !revcharge) //risitema la testata per il reverse charge parziale
if (_caus->reg().tipo_registro() == acquisto && _caus->reverse_charge_pubb() && !revcharge) //risitema la testata per il reverse charge parziale
{
head.add(MOV_TOTDOC, imposta);
if (in_valuta)