From 8541938ee3d7be026e40039be7ab6cf5457d2345 Mon Sep 17 00:00:00 2001 From: francescofucarino Date: Wed, 3 Feb 2021 17:26:48 +0100 Subject: [PATCH] Cu2021 per preformattata --- build/770.vcxproj | 3 +-- build/770.vcxproj.filters | 2 +- build/777.vcxproj | 6 +++--- build/777.vcxproj.filters | 15 +++++++++------ build/fp0.vcxproj | 30 ++++++++++++++++++++---------- build/vedoc.vcxproj | 1 + build/vedoc.vcxproj.filters | 24 ++++++------------------ src/m770/771230.cpp | 9 ++++----- src/m770/771230la.uml | 17 ++++++++++++----- src/m770/777100.cpp | 2 +- src/m770/777200.cpp | 37 ++++++++++++++++++++++--------------- src/m770/777201.cpp | 2 ++ src/m770/77qla.frm | 13 +++++++++++-- src/m770/77tbca7.uml | 4 +++- src/m770/f144.dir | 2 +- src/m770/f144.trr | 3 ++- src/m770/f41.dir | 2 +- src/m770/f41.trr | 3 ++- src/m770/quadrod.h | 1 + src/m770/rpag.h | 1 + 20 files changed, 104 insertions(+), 73 deletions(-) diff --git a/build/770.vcxproj b/build/770.vcxproj index c70f4ba6a..85706a442 100644 --- a/build/770.vcxproj +++ b/build/770.vcxproj @@ -71,7 +71,6 @@ false MultiThreadedDebug .\..\debug/770.pch - Level3 true ProgramDatabase @@ -149,7 +148,7 @@ - + %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) diff --git a/build/770.vcxproj.filters b/build/770.vcxproj.filters index 182fdff88..79831893d 100644 --- a/build/770.vcxproj.filters +++ b/build/770.vcxproj.filters @@ -53,7 +53,7 @@ Sources - + Sources diff --git a/build/777.vcxproj b/build/777.vcxproj index be0377f98..9f619201d 100644 --- a/build/777.vcxproj +++ b/build/777.vcxproj @@ -68,7 +68,6 @@ _DEBUG;WIN32;__LONGDOUBLE__;_WINDOWS;%(PreprocessorDefinitions) false MultiThreadedDebug - Level3 true ProgramDatabase @@ -147,9 +146,10 @@ - - + + + %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) diff --git a/build/777.vcxproj.filters b/build/777.vcxproj.filters index 757f77042..e821bc699 100644 --- a/build/777.vcxproj.filters +++ b/build/777.vcxproj.filters @@ -30,12 +30,6 @@ Sources - - Sources - - - Sources - Sources @@ -45,6 +39,15 @@ Sources + + Sources + + + Sources + + + Sources + diff --git a/build/fp0.vcxproj b/build/fp0.vcxproj index 9a41d56c9..3c9478f21 100644 --- a/build/fp0.vcxproj +++ b/build/fp0.vcxproj @@ -228,54 +228,64 @@ Document - true + + - true + + - true + + - true + + - true + + - true + + - true + + - true + + - true + + - true + + Document diff --git a/build/vedoc.vcxproj b/build/vedoc.vcxproj index 6869d40ec..1fa1b6854 100644 --- a/build/vedoc.vcxproj +++ b/build/vedoc.vcxproj @@ -200,6 +200,7 @@ + diff --git a/build/vedoc.vcxproj.filters b/build/vedoc.vcxproj.filters index 2d319771a..e479b767a 100644 --- a/build/vedoc.vcxproj.filters +++ b/build/vedoc.vcxproj.filters @@ -11,15 +11,6 @@ - - Source Files - - - Source Files - - - Source Files - Source Files @@ -59,15 +50,9 @@ Source Files - - Source Files - Source Files - - Source Files - @@ -79,9 +64,6 @@ Header Files - - Header Files - Header Files @@ -100,5 +82,11 @@ Header Files + + Header Files + + + Header Files + \ No newline at end of file diff --git a/src/m770/771230.cpp b/src/m770/771230.cpp index 37786dd9a..bf0f04aee 100755 --- a/src/m770/771230.cpp +++ b/src/m770/771230.cpp @@ -90,11 +90,6 @@ void TRighe_riepilogo::genera_aliquota(TRectype& quadro, const char* aliquota, void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const TString& codcaus) const { -#ifdef DBG - if (riga.get_long(SPR_CODANAGR) == 571) - int minimo = 1; -#endif - const TDate datapag = riga.get(PAG_DATAPAG); const real compenso = riga.get_real(PAG_COMPENSO); const real imponibile = riga.get(PAG_IMPONIBILE); @@ -132,8 +127,10 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T { const real inps_perc = riga.get_real(PAG_INPSPERC); const real inps_erog = inps_tot - inps_perc; + const real somm_rest = riga.get_real(PAG_NETRIT); quadro.put(QUD_CTINPSEROG, inps_erog); // AUXXX020 quadro.put(QUD_CTINPSPERC, inps_perc); // AUXXX021 + quadro.put(QUD_SRNETRIT, somm_rest); // AUXXX022 } if (somme.is_zero() && quadro.get(QUD_TOTALE) == quadro.get(QUD_IMPONIBILE)) @@ -830,6 +827,7 @@ void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga, const TStrin const real inps_tot = riga.get(PAG_INPSCOMP); real inps_erog, inps_perc; + const real somm_rest = riga.get_real(PAG_NETRIT); if (inps_tot > ZERO && riga.get_real(PAG_IMPONIBILE) > real(5000)) { inps_perc = riga.get_real(PAG_INPSPERC); @@ -837,6 +835,7 @@ void TQuadroC_E2::genera_la(TRectype& quadro, const TRectype& riga, const TStrin } quadro.put(QUD_CTINPSEROG, inps_erog); // AUXXX020 quadro.put(QUD_CTINPSPERC, inps_perc); // AUXXX021 + quadro.put(QUD_SRNETRIT, somm_rest); // AUXXX022 const TRectype& perc = cache().get_rec(LF_PERC, quadro.get(SPR_CODDITTA), quadro.get(SPR_TIPOA), quadro.get(SPR_CODANAGR)); quadro.put("ENTEPREV", perc.get("ENTEPREV")); // AUXXX029 / 32 diff --git a/src/m770/771230la.uml b/src/m770/771230la.uml index ed0e6d1df..e324bfb73 100755 --- a/src/m770/771230la.uml +++ b/src/m770/771230la.uml @@ -141,7 +141,8 @@ BEGIN ITEM "Ente\nPrev.@8" ITEM "Categ." ITEM "Contributi\nerogante@15" - ITEM "Contributi\npercipiente@15" + ITEM "Contributi\npercipiente@15" //18 + ITEM "Somme restit.\nnetto ritenute@15" ITEM "Altri contributi" ITEM "Contributi dovuti" ITEM "Contributi versati" @@ -292,13 +293,13 @@ BEGIN FIELD RITANNIPRE END -BOOLEAN 122 +BOOLEAN 123 BEGIN PROMPT 1 13 "Anticipazione" FIELD ANTICIPAZ END -BOOLEAN 123 +BOOLEAN 124 BEGIN PROMPT 31 13 "Riga generata da schede" FLAGS "D" @@ -340,18 +341,24 @@ BEGIN END CURRENCY 119 15 +BEGIN + PROMPT 1 4 "Somme restituite al netto ritenuta " + FIELD SRNETRIT +END + +CURRENCY 120 15 BEGIN PROMPT 1 5 "Altri contributi " FIELD ALTRICONTR END -CURRENCY 120 15 +CURRENCY 121 15 BEGIN PROMPT 1 6 "Contributi dovuti " FIELD CONTRDOV END -CURRENCY 121 15 +CURRENCY 122 15 BEGIN PROMPT 1 7 "Contributi versati " FIELD CONTRVER diff --git a/src/m770/777100.cpp b/src/m770/777100.cpp index 3a8291788..931e2b2e1 100755 --- a/src/m770/777100.cpp +++ b/src/m770/777100.cpp @@ -10,7 +10,7 @@ #include "777lib.h" #include "777100a.h" -#include "../fe/felib.h" +#include "../cg/cglib.h" #include #include diff --git a/src/m770/777200.cpp b/src/m770/777200.cpp index e52e6355e..66c1793ab 100755 --- a/src/m770/777200.cpp +++ b/src/m770/777200.cpp @@ -10,7 +10,7 @@ #include "777200a.h" #include "777200.h" -#include "../fe/felib.h" +#include "../cg/cglib.h" #include #include @@ -89,15 +89,15 @@ TTracciatoCU::TTracciatoCU(char tipo) add_field("Denominazione (Alternativo a 12 e 13)",AN,137, 60); add_field("Indirizzo E-mail", AN,197,100); add_field("Telefono o Fax", AN,297, 12); - add_field("Eventi Eccezionali", NU,309, 1, 17); // 17 + add_field("Eventi Eccezionali", NU,309, 2, 17); // 17 - add_field("Codice fiscale del rappresentante", CF,310,16); // 18 - add_field("Codice carica del rappresentante", NU,326, 2); - add_field("Cognome", AN,328,24); - add_field("Nome", AN,352,20); - add_field("Codice fiscale del dichiarante", CN,372,11); + add_field("Codice fiscale del rappresentante", CF,311,16); // 18 + add_field("Codice carica del rappresentante", NU,327, 2); + add_field("Cognome", AN,329,24); + add_field("Nome", AN,353,20); + add_field("Codice fiscale del dichiarante", CN,373,11); - add_filler(383,19); // 23 + add_filler(384,18); // 23 add_field("Numero comunicaz. relative a certificazioni",NU, 402, 8); add_field("Casella quadro CT", CB, 410, 1); add_field("Firma del dichiarante", CB, 411, 1); @@ -695,9 +695,9 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log) long int da2010 = anag.get_long(ANA_ESCPRECOMP); // Tolla 2017: Aggiunto questo controllo in quanto noi non gestiamo nessuno dei quadri che richiedono il valore 2 if(da2010 == 2) da2010 = 0; - rec.np_put("DA002010", da2010); + rec.np_put("DA002010", da2010); - const TString& causale = qla.get("CAUSALE"); + const TString& causale = qla.get("CAUSALE"); if (perc.stato_residenza_ISO() == "IT") { TString4 cod_com, cod_fus = perc.codice_comune_residenza(); @@ -748,6 +748,12 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log) rec.np_put("DA002022", cod_com); rec.np_put("DA002023", cod_fus); } + else // Estero aggiunta 2021 + { + TString stato_estero; + rec.np_put("DA002011", stato_estero); + + } // rec.np_put("DA002030", ""); // Codice fiscale del rappresentante un incapace if (perc.estero()) @@ -811,7 +817,7 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep real imponibile = qla.get_real("IMPONIBILE"); const TString4 codcaus = qla.get("CODCAUS"); - long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 + long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 // Edit 2021 aggiunti 12,13 real altre_somme = qla.get_real("SOMME"); if (altre_somme > -0.02 && altre_somme < 0.02) @@ -828,7 +834,7 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep if (codice <= 0) codice = 7; // Regime minimi if (codice == 2) message_box("Anagrafica %c &ld : Il codice 2 somme non soggette č stato eliminato", tipoanag, codanagr); - rec.np_put("AU001006", codice); // 1, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 + rec.np_put("AU001006", codice); // 1, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 //Edit 2021 aggiunti 12,13 rec.np_put("AU001007", altre_somme); } rec.np_put("AU001008", imponibile); // 004 - 005 - 007 @@ -840,8 +846,9 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep rec.np_put("AU001018", qla.get_real("IMPANNIPRE")); // imponibile anni precedenti rec.np_put("AU001019", qla.get_real("RITANNIPRE")); // ritenute anni precedenti - //rec.np_put("AU001020", qla.get_real("SPESERIMB")); // spese rimborsate - //rec.np_put("AU001021", qla.get_real("RITRIMB")); // ritenute rimborsate + rec.np_put("AU001020", qla.get_real("SPESERIMB")); // spese rimborsate + rec.np_put("AU001021", qla.get_real("RITRIMB")); // ritenute rimborsate + rec.np_put("AU001022", qla.get_real("SRNETRIT")); // somme restituite al netto della ritenuta subita const real cce = qla.get_real("CTINPSEROG"); const real ccp = qla.get_real("CTINPSPERC"); @@ -929,7 +936,7 @@ bool TTrasferimentoCU::split(const char* path) { TRecordCU rec; rec.tipo_record('A'); // Compila record di testata A - rec.set(3, "CUR20"); // Codice fornitura 2020 + rec.set(3, "CUR21"); // Codice fornitura 2021 rec.set(4, 1); // Tipo fornitore: 01=Soggetto che invia la propria dichiarazione; 10=CAF rec.set(5, _codfis_int.full() ? _codfis_int : cod_fis_dic()); // Codice fiscale del fornitore outfile << rec; // Scrive record testata diff --git a/src/m770/777201.cpp b/src/m770/777201.cpp index 0a96c2b8c..a10fec58b 100644 --- a/src/m770/777201.cpp +++ b/src/m770/777201.cpp @@ -725,6 +725,7 @@ void TCU_report::create_D() add_labeled_field(body, 1, 49, 3, "#DA002008", "Categorie\nparticolari", 'C'); add_labeled_number(body,1, 55, 3, "#DA002009", "Eventi\neccezionali", 'C'); add_labeled_number(body,1, 61, 3, "#DA002010", "Casi di esclusione\ndalla precompilata", 'C'); + add_labeled_number(body,1, 67, 3, "#DA002011", "Stato\nEstero", 'C'); end_paragraph(body); begin_paragraph(body, CU_AFTER_LAST, 8, ""); @@ -818,6 +819,7 @@ void TCU_report::create_H() add_labeled_number(body, 5, tab1, CU_EURO_LEN, "#AU001019", "Ritenute operate anni precedenti", 'C'); add_labeled_number(body, 5, tab2, CU_EURO_LEN, "#AU001020", "Spese rimborsate", 'C'); add_labeled_number(body, 5, tab3, CU_EURO_LEN, "#AU001021", "Ritenute rimborsate", 'C'); + add_labeled_number(body, 5, tab3, CU_EURO_LEN, "#AU001022", "Somme restituite al netto della ritenuta subita", 'C'); end_paragraph(body); // 2016 diff --git a/src/m770/77qla.frm b/src/m770/77qla.frm index 279cd90c0..010ed2c0e 100755 --- a/src/m770/77qla.frm +++ b/src/m770/77qla.frm @@ -288,6 +288,15 @@ BEGIN FIELD CTINPSPERC SPECIAL STRING TRASFER "AU001021" "NP" MESSAGE _SOLO_CAUS_M -END +End -END +VALUTA 122 +BEGIN +KEY "SOMME RESTITUITE AL NETTO DELLA RITENUTA SUBITA" + PROMPT 122 9 "" + FIELD SRNETRIT +SPECIAL String TRASFER "AU001022" "NP" + //MESSAGE _SOLO_CAUS_M +End + +End diff --git a/src/m770/77tbca7.uml b/src/m770/77tbca7.uml index e9f8e1ac8..03b69d108 100755 --- a/src/m770/77tbca7.uml +++ b/src/m770/77tbca7.uml @@ -328,7 +328,7 @@ BEGIN WARNING "Percentuale della ritenuta d'acconto non valida" END -NUMBER F_ALTRENONSOGG 1 +NUMBER F_ALTRENONSOGG 2 BEGIN PROMPT 1 15 "Codice per somme non soggette a ritenuta " SHEET "Codice|Descrizione@450" @@ -342,6 +342,8 @@ BEGIN ITEM "9|Somme corrisposte che non hanno concorso a formare il reddito imponibile (70% dell’ammontare erogato), relative ai compensi percepiti dai lavoratori impatriati in base a quanto stabilito dal comma1, dell’articolo 16 del D.lgs. n. 147 del 2015 modificato dal D.L. 30 aprile 2019, n. 34" ITEM "10|Somme corrisposte che non hanno concorso a formare il reddito imponibile (90% dell’ammontare erogato), relative ai compensi percepiti dai lavoratori impatriati in base a quanto stabilito dal comma 5-bis, dell’articolo 16 del D.lgs. n. 147 del 2015 modificato dal D.L. 30 aprile 2019, n. 34" ITEM "11|Somme corrisposte che non hanno concorso a formare il reddito imponibile (50% dell’ammontare erogato), relative ai compensi percepiti dai lavoratori impatriati in base a quanto stabilito dal comma 5-quater, dell’articolo 16 del D.lgs. n. 147 del 2015 modificato dal D.L. 30 aprile 2019, n. 34" + ITEM "12|Spese diverse da istruzione universitaria" + ITEM "13|Spese per istruzione universitaria" OUTPUT F_ALTRENONSOGG FIELD I1 END diff --git a/src/m770/f144.dir b/src/m770/f144.dir index d3d0491f6..463ed816c 100755 --- a/src/m770/f144.dir +++ b/src/m770/f144.dir @@ -1,3 +1,3 @@ 144 1 -m770/quadrola|0|0|312|0|Quadro LA 770||| +m770/quadrola|0|0|330|0|Quadro LA 770||| diff --git a/src/m770/f144.trr b/src/m770/f144.trr index 212b0d026..00de8f765 100755 --- a/src/m770/f144.trr +++ b/src/m770/f144.trr @@ -1,5 +1,5 @@ 144 -27 +28 CODDITTA|3|5|0|Codice ditta TIPOA|1|1|0|Tipo anagrafica (Sempre 'F') CODANAGR|3|5|0|Codice anagrafica @@ -21,6 +21,7 @@ RITANNIPRE|4|18|3|Ritenute anni precedenti SOMREGCONV|4|18|3|Somme non soggette a ritenuta per reg. conv. CTINPSEROG|4|18|3|Contribuiti previdenziali a carico dell'erogante CTINPSPERC|4|18|3|Contribuiti previdenziali a carico del percipiente +SRNETRIT|4|18|3|Somme restituite al netto della ritenuta ENTEPREV|1|8|0|Ente previdenziale CATEGORIA|1|2|0|Categoria previdenziale ALTRICONTR|4|18|3|Altri contributi diff --git a/src/m770/f41.dir b/src/m770/f41.dir index 99483e25c..c75021765 100755 --- a/src/m770/f41.dir +++ b/src/m770/f41.dir @@ -1,3 +1,3 @@ 41 1 -m770/rpag|0|0|476|0|Righe di pagamento|#9|| +m770/rpag|0|0|494|0|Righe di pagamento|#9|| diff --git a/src/m770/f41.trr b/src/m770/f41.trr index d7237e00a..f4fe29635 100755 --- a/src/m770/f41.trr +++ b/src/m770/f41.trr @@ -1,5 +1,5 @@ 41 -36 +37 CODDITTA|3|5|0|Codice ditta TIPOA|1|1|0|Tipo percipiente CODANAGR|3|5|0|Codice percipiente @@ -31,6 +31,7 @@ RITUTPAG|4|18|2|Ritenute utili pagati (G) RITUTSPE|4|18|2|Ritenute utili spettanti (G) NQUOTE|4|6|2|Numero quote (G) SOMNSRIT|4|18|2|Somme non soggette a ritenuta (calc) +SRNETRIT|4|18|2|Somme restituite al netto delle ritenute AMMLORDO|4|18|2|Ammontare lordo corrisposto (calc) QUOTAPROV|4|18|2|Quota provvigioni (calc) IMPNETTO|4|18|2|Imponibile al netto delle ritenute (calc) diff --git a/src/m770/quadrod.h b/src/m770/quadrod.h index 7f6874f7a..c8fcf0437 100755 --- a/src/m770/quadrod.h +++ b/src/m770/quadrod.h @@ -17,6 +17,7 @@ #define QUD_SOMREGCONV "SOMREGCONV" #define QUD_CTINPSEROG "CTINPSEROG" #define QUD_CTINPSPERC "CTINPSPERC" +#define QUD_SRNETRIT "SRNETRIT" #define QUD_GENERATA "GENERATA" #endif diff --git a/src/m770/rpag.h b/src/m770/rpag.h index 96dce4602..cd2ae6953 100755 --- a/src/m770/rpag.h +++ b/src/m770/rpag.h @@ -18,6 +18,7 @@ #define PAG_NUMPAG "NUMPAG" #define PAG_SPESA "SPESA" #define PAG_INPSPERC "CTSSNPERC" +#define PAG_NETRIT "SRNETRIT" #define PAG_INPSCOMP "CTSSNCOMP" #define PAG_RITLORDA "RITLORDA" #define PAG_CONTROBB "CONTROBB"