diff --git a/build/Ba4.vcxproj b/build/Ba4.vcxproj index 6e0d147a5..b5969882b 100644 --- a/build/Ba4.vcxproj +++ b/build/Ba4.vcxproj @@ -232,6 +232,7 @@ + diff --git a/build/Ba4.vcxproj.filters b/build/Ba4.vcxproj.filters index 346421a11..ad87f17e9 100644 --- a/build/Ba4.vcxproj.filters +++ b/build/Ba4.vcxproj.filters @@ -82,5 +82,8 @@ Headers + + Headers + \ No newline at end of file diff --git a/src/ba/ba4500.h b/src/ba/ba4500.h index f89e832b6..1532e91f5 100755 --- a/src/ba/ba4500.h +++ b/src/ba/ba4500.h @@ -137,5 +137,6 @@ #define FLD_AT1_CODATTH 199 #define F_ATTPREV 200 #define F_CODATECO 201 +#define CHK_ATTNONCOM 202 #endif // __BA4500_H diff --git a/src/ba/ba4500a.uml b/src/ba/ba4500a.uml index 34e64405d..d771543fa 100755 --- a/src/ba/ba4500a.uml +++ b/src/ba/ba4500a.uml @@ -220,9 +220,16 @@ BEGIN HELP "Indicare se l'attivita' si svolge su piu' luoghi" END +BOOLEAN CHK_ATTNONCOM +BEGIN + PROMPT 1 15 "Attivitā non commerciale" + FIELD LF_ATTIV->ATTNONCOM + HELP "Indicare se l'attivita' non č di tipo commerciale (esempio ONLUS)" +END + NUMBER FLD_AT1_NSOCILDIP 3 BEGIN - PROMPT 1 15 "N.soci lavoro dipendente " + PROMPT 1 16 "N.soci lavoro dipendente " FIELD LF_ATTIV->NSOCILDIP FLAGS "R" HELP "Numero di soci lavoratori dipendenti" @@ -230,7 +237,7 @@ END NUMBER FLD_AT1_GIATTANN 3 BEGIN - PROMPT 44 15 "gg.attivita' annuali " + PROMPT 44 16 "gg.attivita' annuali " FIELD LF_ATTIV->GIATTANN FLAGS "R" HELP "Numero di giorni di attivita' all'anno" @@ -239,7 +246,7 @@ END STRING FLD_AT1_GILAVASTAG 3 BEGIN - PROMPT 1 16 "gg.lav.attivita' stagionale " + PROMPT 1 17 "gg.lav.attivita' stagionale " FIELD LF_ATTIV->GILAVASTAG FLAGS "R" HELP "Numero di giorni per l'attivita' stagionale" diff --git a/src/ba/f10.dir b/src/ba/f10.dir index 7201eb4a0..6a2322c84 100755 --- a/src/ba/f10.dir +++ b/src/ba/f10.dir @@ -1,3 +1,3 @@ 10 1 -%attiv|0|0|209|0|Attivita'|#9|| +%attiv|0|0|210|0|Attivita'||| diff --git a/src/ba/f10.trr b/src/ba/f10.trr index 4e40b6ec9..59e1e24b3 100755 --- a/src/ba/f10.trr +++ b/src/ba/f10.trr @@ -1,5 +1,5 @@ 10 -32 +33 CODDITTA|3|5|0| CODATT|1|5|0| ATTPREV|8|1|0| @@ -32,5 +32,6 @@ ATTLAVDIP|8|1|0| ART74_4|8|1|0| TIPOATT|1|1|0| CODATECO|1|6|0|Codice Attivitā ATECO 2007 +ATTNONCOM|8|1|0|Attivitā non commerciale (esempio ONLUS) 1 CODDITTA+CODATT| diff --git a/src/cg/cg7401.cpp b/src/cg/cg7401.cpp index 1e03e860d..fca6351bd 100644 --- a/src/cg/cg7401.cpp +++ b/src/cg/cg7401.cpp @@ -167,6 +167,7 @@ TISAM_recordset & TQuadro_IVA_recordset::get_recordset(const int code, const int CHECK(set != nullptr, TR("Null report")); set->set_var("#ANNO", format("%d", year == 0 ? _year : year)); + set->set_var("#DITTA", format("%d",prefix().get_codditta())); return *set; } diff --git a/src/cg/cg7600.cpp b/src/cg/cg7600.cpp index 6ee35f88c..a84c6108f 100644 --- a/src/cg/cg7600.cpp +++ b/src/cg/cg7600.cpp @@ -7,8 +7,9 @@ #include "cg7401.h" #include "cgpim.h" #include "cg7400a.h" - +#include #include "ivadiff.h" +#include #define REP_EXPORT 1 #define REP_INTRA 2 @@ -121,6 +122,11 @@ void TQuadro_VE_recordset::load() 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; + TToken_string codatt; + codatt.add(prefix().get_codditta()); + codatt.add(codtab.mid(4, 5)); + const TRectype& attiv = cache().get(LF_ATTIV, codatt); + const bool attivita_commerciale = !attiv.get_bool(ATT_ATTNONCOM); tiporec tipo; real imp; @@ -136,7 +142,7 @@ void TQuadro_VE_recordset::load() break; case vend_norm: // vendite normali case corr_norm: - if (atoi(aliquota) != 0) + if (attivita_commerciale && atoi(aliquota) != 0) { const bool agricolo = ivar.get_int("I4") != 0; diff --git a/src/cg/cg7600n.rep b/src/cg/cg7600n.rep index 6d7f7bd8f..cc35982e4 100644 --- a/src/cg/cg7600n.rep +++ b/src/cg/cg7600n.rep @@ -1,114 +1,116 @@ - + fatture in split -
+ -
+ -
+ -
-
+