From 47dea9f314eba66afb250fce280d391f6e438c5a Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Tue, 13 Apr 2021 22:50:44 +0200 Subject: [PATCH] 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. --- src/ve/velib04b.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ve/velib04b.cpp b/src/ve/velib04b.cpp index b7c9ad268..686b228e6 100755 --- a/src/ve/velib04b.cpp +++ b/src/ve/velib04b.cpp @@ -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)