From b08049e932432b92d60a8fe944587996e39b5530 Mon Sep 17 00:00:00 2001 From: Sirio Builder Date: Mon, 14 Oct 2019 15:35:07 +0200 Subject: [PATCH 1/4] Patch level : 12.0 888 Files correlati : fp Commento : patch --- cd/test/fp0888a1.zip | Bin 855912 -> 855838 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/cd/test/fp0888a1.zip b/cd/test/fp0888a1.zip index fec79955f2056fb734d5f8915c40a5bb85f0878e..a2fd233eb075a24e7aed24c3a9e87437fa00a061 100644 GIT binary patch delta 200 zcmaDc&t%>_6P^HXW)=|!1_llW^_oVWRvyMy9;Q|v=2jk-Rvy+?9=28<_EsK_Rvyk) z9Wu?pAs{X;%+XIPFaTjgLnA#PxA+TZA#V^z zVacb$P>zBUV-sV8g5UzqPy7J|-@bG6aTa~~!rkb}67{*ra?y(NBTMfIE|Oyi@MdI^ cVSqVm`fEO3V?I>trt9$Ynz2ph;{{p@0OB1t82|tP delta 275 zcmbO?&*a5C6P^HXW)=|!1_llWv$RH@RvyMy9;Q|v=2jk-Rvy+?9=28<_EsK_Rvyk) z9eXRnU=RY*#f3TgX$1x#Y-nht2jp(;+s$>z zLBRF5!@q}Rf!v+Fz8fU2M;dMDPboW4^80^%;)h1FTa~A)Eeeh_i))5$aC~^++=k}s zGKweDds8L_>*hW2s9s$B;8l^y))0|GnZevGA3e$*1<@`{(a&%iYk|wDHlq z$0u#{W-aIc&iZU&?vwb)FUsBfQf-$!WDD?SWRhWk`EU9{K3-!!RF_YG#K&vKc9)MA G=zajQplA#L From 900fc56e39db5298e886378cc5728ed1bf8904ca Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Mon, 14 Oct 2019 21:53:58 +0200 Subject: [PATCH 2/4] progetto ve --- build/profiles.vcxproj | 8 +--- build/profiles.vcxproj.filters | 14 +------ build/srcini32.bat | 19 +++++++++ build/ve0.vcxproj | 21 ++++++---- build/ve0.vcxproj.filters | 25 +++++++++++- build/ve2.vcxproj | 2 +- build/ve2.vcxproj.filters | 3 ++ build/ve_maskrighe.vcxproj | 62 ---------------------------- build/ve_maskrighe.vcxproj.filters | 65 ++++-------------------------- 9 files changed, 70 insertions(+), 149 deletions(-) create mode 100644 build/srcini32.bat diff --git a/build/profiles.vcxproj b/build/profiles.vcxproj index 3bbc7199e..a6823f111 100644 --- a/build/profiles.vcxproj +++ b/build/profiles.vcxproj @@ -164,15 +164,9 @@ - - Document - - - - - + diff --git a/build/profiles.vcxproj.filters b/build/profiles.vcxproj.filters index ee1f40b34..0ea84d2bf 100644 --- a/build/profiles.vcxproj.filters +++ b/build/profiles.vcxproj.filters @@ -47,18 +47,8 @@ - + Sources - - - - - Dat - - - - - Src - + \ No newline at end of file diff --git a/build/srcini32.bat b/build/srcini32.bat new file mode 100644 index 000000000..74141492f --- /dev/null +++ b/build/srcini32.bat @@ -0,0 +1,19 @@ +rem @echo off +echo Generating %1 ini file + +set oldinc=%include +set include=..\src\include;..\src\xvaga;..\src\ve;%~p1 + +type ..\src\include\uml.h >%TMP%\%~n1.tmp +type ..\src\ve\veuml.h >>%TMP%\%~n1.tmp +type %1 >>%TMP%\%~n1.tmp +cl /nologo /EP %TMP%\%~n1.tmp >%TMP%\%~n1.ini +fastrip %TMP%\%~n1.ini %2 + +set include=%oldinc +set oldinc= + +del %TMP%\%~n1.ini +del %TMP%\%~n1.tmp + +cd %~p2 diff --git a/build/ve0.vcxproj b/build/ve0.vcxproj index de8f6cdff..bb45d8990 100644 --- a/build/ve0.vcxproj +++ b/build/ve0.vcxproj @@ -69,7 +69,6 @@ MultiThreadedDebug - Level3 true ProgramDatabase @@ -182,12 +181,7 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - + @@ -260,6 +254,7 @@ + @@ -274,6 +269,7 @@ + @@ -287,6 +283,17 @@ + + + Document + + + + + + + + diff --git a/build/ve0.vcxproj.filters b/build/ve0.vcxproj.filters index 85ddc8e8e..c21517d4b 100644 --- a/build/ve0.vcxproj.filters +++ b/build/ve0.vcxproj.filters @@ -43,10 +43,10 @@ Sources - + Sources - + Sources @@ -192,6 +192,9 @@ Trr + + Trr + @@ -230,5 +233,23 @@ Dir + + Dir + + + + + Sources + + + + + Sources + + + + + Sources + \ No newline at end of file diff --git a/build/ve2.vcxproj b/build/ve2.vcxproj index 879e5aeb1..61e4a1de3 100644 --- a/build/ve2.vcxproj +++ b/build/ve2.vcxproj @@ -68,7 +68,6 @@ _DEBUG;WIN32;_WINDOWS;__LONGDOUBLE__ false MultiThreadedDebug - Level3 true ProgramDatabase @@ -281,6 +280,7 @@ true true + diff --git a/build/ve2.vcxproj.filters b/build/ve2.vcxproj.filters index 7bae6a0b9..382724d6a 100644 --- a/build/ve2.vcxproj.filters +++ b/build/ve2.vcxproj.filters @@ -217,5 +217,8 @@ Masks + + Masks + \ No newline at end of file diff --git a/build/ve_maskrighe.vcxproj b/build/ve_maskrighe.vcxproj index a397c58ee..b3b9c2068 100644 --- a/build/ve_maskrighe.vcxproj +++ b/build/ve_maskrighe.vcxproj @@ -139,56 +139,6 @@ - - Document - - - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - - - Document - Compiling line mask %(FullPath)... @@ -349,18 +299,6 @@ $(TargetDir)%(Filename).msk;%(Outputs) - - - Copying dat %(Filename)... - copy %(FullPath) $(TargetDir)%(Filename).dat - - $(TargetDir)%(Filename).dat;%(Outputs) - Copying dat %(Filename)... - copy %(FullPath) $(TargetDir)%(Filename).dat - - $(TargetDir)%(Filename).dat;%(Outputs) - - diff --git a/build/ve_maskrighe.vcxproj.filters b/build/ve_maskrighe.vcxproj.filters index fb1c3d6e6..99fb29f86 100644 --- a/build/ve_maskrighe.vcxproj.filters +++ b/build/ve_maskrighe.vcxproj.filters @@ -12,59 +12,6 @@ {14bb585e-0c0d-42da-a077-cb102cf4ebfa} - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - - Mask - - Ini @@ -105,10 +52,10 @@ Ini - + Ini - + Ini @@ -161,8 +108,10 @@ Mask - - Ini - + + + + Mask + \ No newline at end of file From 8f2aec0049dc6cfb422f5351a7839e29578957c7 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Tue, 15 Oct 2019 15:14:48 +0200 Subject: [PATCH 3/4] Patch level : 12.0 888 Files correlati : cg0.exe cg0800a.rep cg4.exe cg4b00a.rep Commento : Aggiornate stampe prpgressivi avanzate --- src/cg/cg0800a.rep | 80 ++++++++++++++++++++++++++++------------------ src/cg/cg4b00a.rep | 80 ++++++++++++++++++++++++++++------------------ src/cg/cglib05.cpp | 35 +++++++++++++++++--- src/cg/cglib05.h | 2 ++ 4 files changed, 131 insertions(+), 66 deletions(-) diff --git a/src/cg/cg0800a.rep b/src/cg/cg0800a.rep index 6f6fafbaa..f4f7c94cb 100644 --- a/src/cg/cg0800a.rep +++ b/src/cg/cg0800a.rep @@ -1,31 +1,31 @@ - + Riepilogo progressivi IVA
#SYSTEM.DATE - + #SYSTEM.RAGSOC - + #SYSTEM.RAGSOC - + #PAGE - + #PAGE - + - + #ANNO - + #DAMESE @@ -44,7 +44,7 @@
  • - + #AMESE @@ -63,25 +63,31 @@
  • - + + + + + + + - - + + - - + + - - + + - - + + - - + + - +
  • @@ -97,22 +103,22 @@ #THIS @ #F1.102 +! - + IVAVEN #THIS @ #F1.103 +! - + IMPCORR #THIS @ #F1.104 +! - + IVACORR #THIS @ #F1.105 +! - + IMPACQ #THIS @ #F1.106 +! @@ -122,19 +128,31 @@ #THIS @ #F1.107 +! + + IMPACQIND + #THIS @ +#F1.108 +! + + + IVAACQIND + #THIS @ +#F1.109 +! +
    - + DESC - - - - - + + + + + + +
    USE 25 KEY 1 SELECT BETWEEN(23.DATAREG;#FROMDATE;#TODATE) \nJOIN 23 INTO NUMREG==NUMREG"; \ No newline at end of file diff --git a/src/cg/cg4b00a.rep b/src/cg/cg4b00a.rep index 0ec843aed..a6a812fa6 100644 --- a/src/cg/cg4b00a.rep +++ b/src/cg/cg4b00a.rep @@ -1,31 +1,31 @@ - + Riepilogo progressivi IVA per competenza
    #SYSTEM.DATE - + #SYSTEM.RAGSOC - + #SYSTEM.RAGSOC - + #PAGE - + #PAGE - + - + #ANNO - + #DAMESE @@ -44,7 +44,7 @@
  • - + #AMESE @@ -63,39 +63,45 @@
  • - + - + #FROMDATE - + - + #TODATE - + + + + + + + - - + + - - + + - - + + - - + + - - + + - +
  • @@ -111,7 +117,7 @@ #THIS @ #F1.102 +! - + IVAVEN #THIS @ #F1.103 +! @@ -121,7 +127,7 @@ #THIS @ #F1.104 +! - + IVACORR #THIS @ #F1.105 +! @@ -131,24 +137,36 @@ #THIS @ #F1.106 +! - + IVAACQ #THIS @ #F1.107 +! + + IMPACQIND + #THIS @ +#F1.108 +! + + + IVAACQIND + #THIS @ +#F1.109 +! +
    - + DESC - + - + + +
    USE 25 KEY 1 SELECT BETWEEN(23.DATAREG;#FROMDATE;#TODATE) \nJOIN 23 INTO NUMREG==NUMREG"; \ No newline at end of file diff --git a/src/cg/cglib05.cpp b/src/cg/cglib05.cpp index 1f865064b..2d4b30c08 100644 --- a/src/cg/cglib05.cpp +++ b/src/cg/cglib05.cpp @@ -32,6 +32,8 @@ public: real & ivacorr() { return get_val(3); } real & impven() { return get_val(4); } real & ivaven() { return get_val(5); } + real & impacqind() { return get_val(6); } + real & ivaacqind() { return get_val(7); } TRiepilogoIVA_record& operator= (const TRiepilogoIVA_record & rec) { return copy(rec);} TRiepilogoIVA_record(const TRiepilogoIVA_record & rec) { copy(rec); } @@ -85,6 +87,7 @@ void TRiepilogoIVA_recordset::requery() long gruppo = recset.get(RMI_GRUPPO).as_int(); long conto = recset.get(RMI_CONTO).as_int(); long sottoconto = recset.get(RMI_SOTTOCONTO).as_int(); + int indetr = recset.get(RMI_TIPODET).as_int(); TRegistro reg(recset.get(reg_fieldname).as_string()); TipoIVA t = reg.iva(); @@ -119,10 +122,20 @@ void TRiepilogoIVA_recordset::requery() work_array.add(cod, rec = new TRiepilogoIVA_record(cod)); if (t == iva_acquisti) { - real & r = rec->impacq(); - r += recset.get(RMI_IMPONIBILE).as_real(); - real & r1 = rec->ivaacq(); - r1 += recset.get(RMI_IMPOSTA).as_real(); + if (indetr == 0) + { + real & r = rec->impacq(); + r += recset.get(RMI_IMPONIBILE).as_real(); + real & r1 = rec->ivaacq(); + r1 += recset.get(RMI_IMPOSTA).as_real(); + } + else + { + real & r = rec->impacqind(); + r += recset.get(RMI_IMPONIBILE).as_real(); + real & r1 = rec->ivaacqind(); + r1 += recset.get(RMI_IMPOSTA).as_real(); + } } else if (t == iva_vendite) @@ -237,6 +250,18 @@ const TVariant& TRiepilogoIVA_recordset::get_field(int num, const char* field) c val = row.ivaven(); return val; } + else + if (xvt_str_compare_ignoring_case(field, IMPACQIND) == 0) + { + val = row.impacqind(); + return val; + } + else + if (xvt_str_compare_ignoring_case(field, IVAACQIND) == 0) + { + val = row.ivaacqind(); + return val; + } } return NULL_VARIANT; } @@ -281,5 +306,7 @@ TRiepilogoIVA_recordset::TRiepilogoIVA_recordset() : TRecordset(), _pos(0), _fro add_field(_realfld, 106, 18, IVACORR); add_field(_realfld, 107, 18, IMPVEN); add_field(_realfld, 108, 18, IVAVEN); + add_field(_realfld, 109, 18, IMPACQIND); + add_field(_realfld, 110, 18, IVAACQIND); } diff --git a/src/cg/cglib05.h b/src/cg/cglib05.h index 11f76e221..1048323df 100644 --- a/src/cg/cglib05.h +++ b/src/cg/cglib05.h @@ -17,6 +17,8 @@ #define IVACORR "IVACORR" #define IMPVEN "IMPVEN" #define IVAVEN "IVAVEN" +#define IMPACQIND "IMPACQIND" +#define IVAACQIND "IVAACQIND" class TRiepilogoIVA_recordset : public TRecordset { From b0ca7088b9606ebce4b6bda760dd22a2205e6b48 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Tue, 15 Oct 2019 18:41:05 +0200 Subject: [PATCH 4/4] Patch level : 12.0 888 Files correlati : cg0.exe cg0800a.rep cg4.exe cg4b00a.rep Commento : Aggiornate stampe prpgressivi avanzate corretto errore reverse_charge e causale collegata --- src/cg/cg2100.cpp | 8 ++++---- src/cg/cg2102.cpp | 10 +++++----- src/cg/cg2103.cpp | 6 ++++++ src/cg/cg2103.h | 3 ++- src/cg/cglib01.cpp | 10 ++++++++-- src/cg/cglib01.h | 5 ++++- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/cg/cg2100.cpp b/src/cg/cg2100.cpp index 6094f0d9c..ee30462ea 100755 --- a/src/cg/cg2100.cpp +++ b/src/cg/cg2100.cpp @@ -683,9 +683,9 @@ void TPrimanota_application::init_mask(TMask& m) } TEdit_field& rc = m.efield(F_REVCHARGE); - rc.show(cc.iva() == iva_acquisti && cc.reverse_charge()); + rc.show(cc.iva() == iva_acquisti && cc.reverse_charge_pubb()); - m.efield(F_MOVCOLL).show((cc.iva() == iva_acquisti && cc.reverse_charge()) || + m.efield(F_MOVCOLL).show((cc.iva() == iva_acquisti && cc.reverse_charge_pubb()) || (cc.iva() == iva_vendite && cc.causale_reg_iva())); // m.efield(F_GOCOLL).show((c.iva() == iva_acquisti && c.reverse_charge()) || // (c.iva() == iva_vendite && c.causale_reg_iva())); @@ -858,7 +858,7 @@ bool TPrimanota_application::get_next_key(TToken_string& tmp) else tmp.add(m.get(F_DATACOMP)); - if (_iva != nessuna_iva) + if (m.find_by_id(F_DATACOMPCR) && _iva != nessuna_iva) { tmp.add(F_DATACOMPCR); // Ricopia data competenza if (m.field(F_DATACOMPCR).empty()) @@ -1689,7 +1689,7 @@ int TPrimanota_application::write(const TMask& m) int TPrimanota_application::rewrite(const TMask& m) { - if (cached_causale(_rel->file().get(MOV_CODCAUS), _rel->file().get_int(MOV_ANNOES)).reverse_charge()) + if (cached_causale(_rel->file().get(MOV_CODCAUS), _rel->file().get_int(MOV_ANNOES)).reverse_charge_pubb()) { const long movcoll = m.get_long(F_MOVCOLL); diff --git a/src/cg/cg2102.cpp b/src/cg/cg2102.cpp index 3f89df35f..69eca9280 100755 --- a/src/cg/cg2102.cpp +++ b/src/cg/cg2102.cpp @@ -2332,8 +2332,8 @@ bool TPrimanota_application::caus_modify_handler(TMask_field& f, KEY key) } if (c.iva() != nessuna_iva && mask_ok) { - m.efield(F_REVCHARGE).show(c.iva() == iva_acquisti && c.reverse_charge()); - m.efield(F_MOVCOLL).show((c.iva() == iva_acquisti && c.reverse_charge()) || + m.efield(F_REVCHARGE).show(c.iva() == iva_acquisti && c.reverse_charge_pubb()); + m.efield(F_MOVCOLL).show((c.iva() == iva_acquisti && c.reverse_charge_pubb()) || (c.iva() == iva_vendite && c.causale_reg_iva())); // m.efield(F_GOCOLL).show((c.iva() == iva_acquisti && c.reverse_charge()) || // (c.iva() == iva_vendite && c.causale_reg_iva())); @@ -3084,7 +3084,7 @@ bool TPrimanota_application::main_codiva_handler(TMask_field& f, KEY key) mm.set(F_RITFIS, imposta, true); } } else - if (a.causale().reverse_charge()) + if (a.causale().reverse_charge_pubb()) { const real totale = mm.get_real(F_TOTALE) + mm.get_real(F_RITFIS); const real imposta = codiva.imposta(totale); @@ -3177,7 +3177,7 @@ bool TPrimanota_application::activate_split_payment(TMask& m) TMask_field* sp = m.find_by_id(F_SPLITPAY); if (sp != NULL) { - if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge()) + if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge_pubb()) { const TRectype& cliente = cache().get_rec(LF_CLIFO, "C", m.get(F_CODCLIFOR)); yes = cliente.get_bool(CLI_SPLITPAY); @@ -3228,7 +3228,7 @@ bool TPrimanota_application::is_split_payment() const s = 'N'; if (iva() == nessuna_iva) return false; - if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge()) + if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge_pubb()) { const TRectype& cliente = cache().get_rec(LF_CLIFO, "C", m.get(F_CODCLIFOR)); if (cliente.get_bool(CLI_SPLITPAY)) diff --git a/src/cg/cg2103.cpp b/src/cg/cg2103.cpp index aa6be0e8c..e6d71839d 100755 --- a/src/cg/cg2103.cpp +++ b/src/cg/cg2103.cpp @@ -174,6 +174,12 @@ bool TCausale::reverse_charge() const return rsi == 13 || rsi == 50 || rsi == 51; // Reverse charge! } +bool TCausale::reverse_charge_pubb() const +{ + const int rsi = regime_speciale(); + return rsi == 13 || rsi == 19 || rsi == 50 || rsi == 51; // Reverse charge! +} + bool TCausale::esclusione_allegati() const { return _rec.get_bool(CAU_ALLEG); } diff --git a/src/cg/cg2103.h b/src/cg/cg2103.h index d2038f227..aebeca499 100755 --- a/src/cg/cg2103.h +++ b/src/cg/cg2103.h @@ -40,7 +40,8 @@ public: bool intra() const; bool valintra() const; bool soloiva() const; - bool reverse_charge() const; + bool reverse_charge() const; + bool reverse_charge_pubb() const; bool regolarizzazione() const; bool ril_fat_em_ric() const; bool datareg_prec() const; diff --git a/src/cg/cglib01.cpp b/src/cg/cglib01.cpp index e4c02c2b9..c97e3ed50 100755 --- a/src/cg/cglib01.cpp +++ b/src/cg/cglib01.cpp @@ -717,8 +717,14 @@ real TCodiceIVA::lordo(const real& imponibile, int ndec, const char* codval) con bool TCodiceIVA::reverse_charge() const { - const int rsi = regime_speciale(); - return rsi == 13 || rsi == 50 || rsi == 51; // Reverse charge! + const int rsi = regime_speciale(); + return rsi == 13 || rsi == 50 || rsi == 51; // Reverse charge! +} + +bool TCodiceIVA::reverse_charge_pubb() const +{ + const int rsi = regime_speciale(); + return rsi == 13 || rsi == 19 || rsi == 50 || rsi == 51; // Reverse charge! con aggiunta dienti pubblici } /////////////////////////////////////////////////////////// diff --git a/src/cg/cglib01.h b/src/cg/cglib01.h index 75355c19c..32806ce55 100755 --- a/src/cg/cglib01.h +++ b/src/cg/cglib01.h @@ -161,12 +161,15 @@ public: // TObject bool has_plafond() const { return get_int("S3") > 0; } bool sospeso() const { return get_bool("B2"); } bool escluso_esenti() const { return get_bool("B5"); } + bool numeratore_pro_rata() const { return get_bool("B6"); } + bool denominatore_pro_rata() const { return get_bool("B7"); } real imposta(const real& imponibile, int ndec = AUTO_DECIMALS, const char * codval = "") const; // Calcola l'imposta sull'imponibile l'imposta e la ritorna real scorpora(real& imponibile, int ndec = AUTO_DECIMALS, const char * codval = "") const; // Scorpora dall'imponibile l'imposta e la ritorna real lordo(const real& imponibile, int ndec = AUTO_DECIMALS, const char * codval = "") const; // Calcola il lordo dell'imponibile l'imposta e la ritorna - bool reverse_charge() const; + bool reverse_charge() const; + bool reverse_charge_pubb() const; int regime_speciale() const { return get_int("I5");} const TString& natura() const { return get("S12"); }