diff --git a/src/cg/cg7600.cpp b/src/cg/cg7600.cpp
index f714187ce..508b7dd29 100644
--- a/src/cg/cg7600.cpp
+++ b/src/cg/cg7600.cpp
@@ -97,10 +97,18 @@ void TQuadro_VE_recordset::load()
TString8 codiva(codtab.mid(16,4)); codiva.trim();
const TRectype & ivar = cache().get("%IVA", codiva);
const TString8 aliquota = ivar.get("R0");
+ const TString4 tipo_aliquota = ivar.get("S1");
+ const TString4 tipo_iva11_ven = ivar.get("S2");
+ const int int_tipo_iva11_ven = atoi(tipo_iva11_ven);
+ const bool non_imponibile = (tipo_aliquota == "NI");
+ const bool esente = (tipo_aliquota == "ES");
+ const bool reverse = int_tipo_iva11_ven >= 31 && int_tipo_iva11_ven <= 38;
+ const bool terremotati = int_tipo_iva11_ven == 25;
tiporec tipo;
- real imp;
- real iva;
+ real imp = pimr.get_real("R0");
+ real iva = pimr.get_real("R1");
+ bool done = false;
if (classify_pim(pimr, imp, iva, tipo, true))
{
@@ -175,59 +183,46 @@ void TQuadro_VE_recordset::load()
};
}
- else
+ if (non_imponibile)
{
- const real imp = pimr.get_real("R0");
- const real iva = pimr.get_real("R1");
- const TString4 tipo_aliquota = ivar.get("S1");
- const TString4 tipo_iva11_ven = ivar.get("S2");
- const int int_tipo_iva11_ven = atoi(tipo_iva11_ven);
- const bool non_imponibile = (tipo_aliquota == "NI");
- const bool esente = (tipo_aliquota == "ES");
- const bool reverse = int_tipo_iva11_ven >= 31 && int_tipo_iva11_ven <= 38;
- const bool terremotati = int_tipo_iva11_ven == 25;
+ if (int_tipo_iva11_ven == 21)
+ add_value("VE31.1", imp);
+ else
+ if (int_tipo_iva11_ven == 22)
+ add_value("VE32.1", imp);
+ }
+ if (esente)
+ {
+ if ((tipo_iva11_ven == "B1") ||
+ (tipo_iva11_ven == "B2") ||
+ (tipo_iva11_ven == "B3") ||
+ (tipo_iva11_ven == "B4") ||
+ (tipo_iva11_ven == "B5"))
+ add_value("VE33.1", imp);
+ else
+ if ((tipo_iva11_ven == "B6"))
+ add_value("VE34.1", imp);
+ }
- if (non_imponibile)
- {
- if (int_tipo_iva11_ven == 21)
- add_value("VE31.1", imp);
- else
- if (int_tipo_iva11_ven == 22)
- add_value("VE32.1", imp);
- }
- if (esente)
- {
- if ((tipo_iva11_ven == "B1") ||
- (tipo_iva11_ven == "B2") ||
- (tipo_iva11_ven == "B3") ||
- (tipo_iva11_ven == "B4") ||
- (tipo_iva11_ven == "B5"))
- add_value("VE33.1", imp);
- else
- if ((tipo_iva11_ven == "B6"))
- add_value("VE34.1", imp);
- }
-
- if (reverse)
- {
- const int tipo_reverse = int_tipo_iva11_ven;
+ if (reverse)
+ {
+ const int tipo_reverse = int_tipo_iva11_ven;
- switch (tipo_reverse)
- {
- case 31 : add_value("VE35.2", imp); break;
- case 32 : add_value("VE35.3", imp); break;
- case 33 : add_value("VE35.4", imp); break;
- case 34 : add_value("VE35.5", imp); break;
- case 35 : add_value("VE35.6", imp); break;
- case 36 : add_value("VE35.7", imp); break;
- case 37 : add_value("VE35.8", imp); break;
- case 38 : add_value("VE35.9", imp); break;
- default : break;
- }
+ switch (tipo_reverse)
+ {
+ case 31 : add_value("VE35.2", imp); break;
+ case 32 : add_value("VE35.3", imp); break;
+ case 33 : add_value("VE35.4", imp); break;
+ case 34 : add_value("VE35.5", imp); break;
+ case 35 : add_value("VE35.6", imp); break;
+ case 36 : add_value("VE35.7", imp); break;
+ case 37 : add_value("VE35.8", imp); break;
+ case 38 : add_value("VE35.9", imp); break;
+ default : break;
}
- if (terremotati)
- add_value("VE36.1", imp);
- }
+ }
+ if (terremotati)
+ add_value("VE36.1", imp);
}
}
diff --git a/src/cg/cg7600a.pdf b/src/cg/cg7600a.pdf
index f79559242..ca8605303 100644
Binary files a/src/cg/cg7600a.pdf and b/src/cg/cg7600a.pdf differ
diff --git a/src/cg/cg7600a.png b/src/cg/cg7600a.png
index 0a02c97cd..5ab255ee1 100644
Binary files a/src/cg/cg7600a.png and b/src/cg/cg7600a.png differ
diff --git a/src/cg/cg7600a.rep b/src/cg/cg7600a.rep
index 494672303..2f743699c 100644
--- a/src/cg/cg7600a.rep
+++ b/src/cg/cg7600a.rep
@@ -103,7 +103,6 @@
VE22.2
- MESSAGE ADD,#B1.2402
VE23.1
@@ -159,7 +158,7 @@
VE35.3
- V35.4
+ VE35.4
VE35.5
diff --git a/src/cg/cg7700.cpp b/src/cg/cg7700.cpp
index fa7c7bbed..01cc487c0 100644
--- a/src/cg/cg7700.cpp
+++ b/src/cg/cg7700.cpp
@@ -85,17 +85,8 @@ void TQuadro_VF_recordset::load()
{
agenziaviaggio |= at.get(ATT_REG74TER).as_bool();
minori |= at.get(ATT_ART74_4).as_bool();
- if (!agricolo_misto)
- {
- if (!agricolo)
- agricolo |= at.get(ATT_REGAGR).as_bool();
- else
- if (at.get(ATT_REGAGR).as_bool())
- {
- agricolo = false;
- agricolo_misto = true;
- }
- }
+ agricolo |= at.get(ATT_REGAGR).as_bool();
+ agricolo_misto |= !at.get(ATT_REGAGR).as_bool();
const TString16 codatt = at.get(ATT_CODATT).as_string();
const int tipoatt = at.get(ATT_TIPOATT).as_int();
@@ -113,6 +104,8 @@ void TQuadro_VF_recordset::load()
}
}
}
+ if (!agricolo)
+ agricolo_misto = false;
set_bool("VF30.1", agenziaviaggio);
set_bool("VF30.2");
@@ -171,8 +164,15 @@ void TQuadro_VF_recordset::load()
const TString8 aliquota = ivar.get("R0");
const int tipocr = atoi(codtab.mid(15,1)); // tipo costo_ricavo
tiporec tipo;
- real imp;
- real iva;
+ const TString4 tipo_aliquota = ivar.get("S1");
+ const TString4 tipo_iva11_acq = ivar.get("S9");
+ const int int_tipo_iva11_acq = atoi(tipo_iva11_acq);
+ const bool non_imponibile = (tipo_aliquota == "NI");
+ const bool esente = (tipo_aliquota == "ES");
+ const bool non_soggetto = (tipo_aliquota == "NS");
+ const bool terremotati = int_tipo_iva11_acq == 16;
+ real imp = pimr.get_real("R0") - pimr.get_real("R9");
+ real iva = pimr.get_real("R1") - pimr.get_real("R10");
if (classify_pim(pimr, imp, iva, tipo, true))
{
@@ -201,10 +201,11 @@ void TQuadro_VF_recordset::load()
}
else
- {
- add_value("VF38.1", imp); // VF38.1 2 Riservato alle imprese agricole miste - Totale operazioni imponibili diverse
- add_value("VF38.2", iva);
- }
+ if (agricolo_misto)
+ {
+ add_value("VF38.1", imp); // VF38.1 2 Riservato alle imprese agricole miste - Totale operazioni imponibili diverse
+ add_value("VF38.2", iva);
+ }
const TString * field = (TString *) imponibile.objptr(aliquota);
if (field != NULL) add_value(*field, imp);
@@ -261,73 +262,32 @@ void TQuadro_VF_recordset::load()
};
}
- else
+ if (non_imponibile)
{
- const TString4 tipo_aliquota = ivar.get("S1");
- const TString4 tipo_iva11_acq = ivar.get("S9");
- const int int_tipo_iva11_acq = atoi(tipo_iva11_acq);
- const bool non_imponibile = (tipo_aliquota == "NI");
- const bool esente = (tipo_aliquota == "ES");
- const bool non_soggetto = (tipo_aliquota == "NS");
- const bool terremotati = int_tipo_iva11_acq == 16;
-
- if (non_imponibile)
+ if (int_tipo_iva11_acq == 12)
{
- if (int_tipo_iva11_acq == 12)
- {
- add_value("VF14.1", imp);
- add_value("VF35.2", iva); // VF35.1 IVA non assolta sugli acquisti e importazioni indicati al rigo VF14
- }
- else
- if (int_tipo_iva11_acq == 13)
- add_value("VF15.1", imp);
+ add_value("VF14.1", imp);
+ add_value("VF35.2", iva); // VF35.1 IVA non assolta sugli acquisti e importazioni indicati al rigo VF14
}
- if (esente)
- if (int_tipo_iva11_acq == 14)
- add_value("VF16.1", imp);
- if (non_soggetto)
- {
- if (tipo_iva11_acq == "15A" || int_tipo_iva11_acq == 15)
- {
- if (tipo_iva11_acq == "15A")
- add_value("VF17.2", imp);
- add_value("VF17.1", imp);
- }
- }
- if (terremotati)
- add_value("VF18.1", imp);
-
- }
-
- switch (tipocr)
- {
- case 0:
- add_value("VF27.4", imp);
- break;
- case 1:
- add_value("VF27.3", imp);
- break;
- case 2:
- add_value("VF27.1", imp);
- break;
- case 3:
- add_value("VF27.4", imp);
- break;
- case 5:
- add_value("VF27.4", imp);
- break;
- case 8:
- add_value("VF27.2", imp);
- break;
- case 9:
- add_value("VF27.4", imp);
- break;
- case 17:
- add_value("VF27.4", imp);
- break;
- default:
- break;
+ else
+ if (int_tipo_iva11_acq == 13)
+ add_value("VF15.1", imp);
}
+ if (esente)
+ if (int_tipo_iva11_acq == 14)
+ add_value("VF16.1", imp);
+ if (non_soggetto)
+ {
+ if (tipo_iva11_acq == "15A" || int_tipo_iva11_acq == 15)
+ {
+ if (tipo_iva11_acq == "15A")
+ add_value("VF17.2", imp);
+ add_value("VF17.1", imp);
+ }
+ }
+ if (terremotati)
+ add_value("VF18.1", imp);
+
}
}
@@ -378,19 +338,13 @@ void TQuadro_VF_recordset::load()
add_value("VF21.1", (sezione == 'D') ? -imp : imp); // VF21.1 iva sospensione da pagare
add_value("VF22.1", (sezione == 'D') ? imp : -imp); // VF22.1 iva sospensione pagata
if (cur_tipodiff == 2)
- add_value("VF21.2", (sezione == 'D') ? imp : -imp); // VF21.2 iva per cassa da pagare
+ add_value("VF21.2", (sezione == 'D') ? -imp : imp); // VF21.2 iva per cassa da pagare
break;
default:
break;
}
}
}
- // VF21.1 iva sospensione da pagare
- add_value("VF21.1", val);
- // VF22.1 iva per cassa da pagare
- add_value("Vf21.2", val);
- // VF22.1 iva sospensione pagata
- add_value("VF22.1", val);
// V24.2 Variazioni e arrotondamenti d’imposta (indicare con il segno +/–)
// V50.2 Variazioni e arrotondamenti d’imposta (indicare con il segno +/–)
@@ -427,6 +381,15 @@ void TQuadro_VF_recordset::load()
val = evaluate_recordset_imposta(REP_SANMARINO, year());
add_value("VF24.6", val);
+ val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "RMOVIVA.TIPOCR==2");
+ add_value("VF27.1", val);
+ val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "RMOVIVA.TIPOCR==8");
+ add_value("VF27.2", val);
+ val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "RMOVIVA.TIPOCR==1");
+ add_value("VF27.3", val);
+ val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "(RMOVIVA.TIPOCR==0)||(RMOVIVA.TIPOCR==3)||(RMOVIVA.TIPOCR==5)||(RMOVIVA.TIPOCR==9)||(RMOVIVA.TIPOCR==17)");
+ add_value("VF27.4", val);
+
// VF32.1 Se per l’anno 2016 sono state effettuate esclusivamente operazioni esenti barrare la casella
set_bool("VF32.1", prorata100);
// VF33.1 Se per l’anno 2016 ha avuto effetto l’opzione di cui all’art. 36-bis barrare la casella
diff --git a/src/cg/cg7700a.pdf b/src/cg/cg7700a.pdf
index 4848189ad..bc8c5e1e9 100644
Binary files a/src/cg/cg7700a.pdf and b/src/cg/cg7700a.pdf differ
diff --git a/src/cg/cg7700a.png b/src/cg/cg7700a.png
index 113f87679..34b89389a 100644
Binary files a/src/cg/cg7700a.png and b/src/cg/cg7700a.png differ
diff --git a/src/cg/cg7700b.pdf b/src/cg/cg7700b.pdf
index c259aeed3..b7da6932c 100644
Binary files a/src/cg/cg7700b.pdf and b/src/cg/cg7700b.pdf differ
diff --git a/src/cg/cg7700b.png b/src/cg/cg7700b.png
index a411b1aaa..c09eb8773 100644
Binary files a/src/cg/cg7700b.png and b/src/cg/cg7700b.png differ
diff --git a/src/cg/cg7700g.rep b/src/cg/cg7700g.rep
index b2911488b..6d87f932f 100644
--- a/src/cg/cg7700g.rep
+++ b/src/cg/cg7700g.rep
@@ -1,6 +1,6 @@
- Dichiarazione IVA Quadro VF - VF25 1-4
+ Dichiarazione IVA Quadro VF - VF27 1-4
@@ -31,7 +31,7 @@
"Data di Stampa: " +#SYSTEM.DATE
- "RIPARTIZIONE TOTALE ACQUISTI E IMPORTAZIONI VF25 - 1F;4 - " +#ANNO
+ "RIPARTIZIONE TOTALE ACQUISTI E IMPORTAZIONI VF27 - 1F;4 - " +#ANNO
@@ -91,10 +91,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/cg/cg7800a.pdf b/src/cg/cg7800a.pdf
index 2ec1d2ce6..93a16eea1 100644
Binary files a/src/cg/cg7800a.pdf and b/src/cg/cg7800a.pdf differ
diff --git a/src/cg/cg7800a.png b/src/cg/cg7800a.png
index a0cc60ce9..8e7c185ea 100644
Binary files a/src/cg/cg7800a.png and b/src/cg/cg7800a.png differ