diff --git a/build/fp.sln b/build/fp.sln index 1bbe8d4b7..0db597406 100644 --- a/build/fp.sln +++ b/build/fp.sln @@ -8,10 +8,13 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fp0", "fp0.vcxproj", "{9C91BACF-9A70-4973-B8CC-FA3D2AF9867C}" ProjectSection(ProjectDependencies) = postProject {C575788B-0BE4-4F68-B9C9-3C204EC04E07} = {C575788B-0BE4-4F68-B9C9-3C204EC04E07} + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5} = {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tflib", "tflib.vcxproj", "{7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -30,6 +33,10 @@ Global {2D38A763-3D74-4338-9362-B891784EC90E}.Debug|Win32.Build.0 = Debug|Win32 {2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.ActiveCfg = Release|Win32 {2D38A763-3D74-4338-9362-B891784EC90E}.Release|Win32.Build.0 = Release|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Debug|Win32.Build.0 = Debug|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Release|Win32.ActiveCfg = Release|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/fp0.vcxproj b/build/fp0.vcxproj index 50ab48dd4..ced657e32 100644 --- a/build/fp0.vcxproj +++ b/build/fp0.vcxproj @@ -193,14 +193,12 @@ false - - diff --git a/build/fp0.vcxproj.filters b/build/fp0.vcxproj.filters index 157ba8c65..c19edbf4c 100644 --- a/build/fp0.vcxproj.filters +++ b/build/fp0.vcxproj.filters @@ -27,9 +27,6 @@ Sources - - Sources - Sources @@ -53,9 +50,6 @@ Headers - - Headers - Headers diff --git a/build/tf.sln b/build/tf.sln index 4d35d8843..a80e16d27 100644 --- a/build/tf.sln +++ b/build/tf.sln @@ -1,7 +1,12 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.106 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tf0", "tf0.vcxproj", "{9C91BACF-9A70-4973-B8CC-FA3D2AF9867C}" + ProjectSection(ProjectDependencies) = postProject + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5} = {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}" EndProject @@ -9,6 +14,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fplib", "fplib.vcxproj", "{C575788B-0BE4-4F68-B9C9-3C204EC04E07}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tflib", "tflib.vcxproj", "{7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}" + ProjectSection(ProjectDependencies) = postProject + {C575788B-0BE4-4F68-B9C9-3C204EC04E07} = {C575788B-0BE4-4F68-B9C9-3C204EC04E07} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -31,8 +43,19 @@ Global {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32 {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32 {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.Build.0 = Release|Win32 + {C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.ActiveCfg = Debug|Win32 + {C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Debug|Win32.Build.0 = Debug|Win32 + {C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.ActiveCfg = Release|Win32 + {C575788B-0BE4-4F68-B9C9-3C204EC04E07}.Release|Win32.Build.0 = Release|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Debug|Win32.Build.0 = Debug|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Release|Win32.ActiveCfg = Release|Win32 + {7BF6939E-DFCD-49ED-B0A8-EDB68DDCE6D5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {864F23A5-CCF4-4E1F-9D38-1416F09EEE8D} + EndGlobalSection EndGlobal diff --git a/build/tf0.vcxproj b/build/tf0.vcxproj index cd87b590a..5746ed8c2 100644 --- a/build/tf0.vcxproj +++ b/build/tf0.vcxproj @@ -64,7 +64,7 @@ Disabled - ..\src\xvtext\;..\src\cg;..\src\include;..\src\xvaga;..\src\fe;%(AdditionalIncludeDirectories) + ..\src\xvtdb\;..\src\xvtext\;..\src\cg;..\src\include;..\src\xvaga;..\src\fe;%(AdditionalIncludeDirectories) _DEBUG;WIN32;__LONGDOUBLE__;_WINDOWS;%(PreprocessorDefinitions) false MultiThreadedDebug @@ -111,7 +111,7 @@ MaxSpeed Default - ..\src\cg;..\src\include;..\src\xvaga;%(AdditionalIncludeDirectories) + ..\src\xvtdb\;..\src\xvtext\;..\src\cg;..\src\include;..\src\xvaga;..\src\fe;%(AdditionalIncludeDirectories) NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions) true MultiThreaded @@ -188,7 +188,6 @@ - @@ -202,7 +201,6 @@ - diff --git a/build/tf0.vcxproj.filters b/build/tf0.vcxproj.filters index d8f84988b..c0aeaf30e 100644 --- a/build/tf0.vcxproj.filters +++ b/build/tf0.vcxproj.filters @@ -16,7 +16,7 @@ {681a7df4-f2b5-4870-8949-6d7adba5aa29} - + {a3067f4a-a21c-4966-b31b-d0536b8df95f} @@ -39,9 +39,6 @@ Headers - - Headers - Headers @@ -56,9 +53,6 @@ Sources - - Sources - Sources @@ -68,9 +62,6 @@ Sources - - Sources - Sources @@ -86,25 +77,28 @@ Sources + + Sources + - Ini\Masks + Masks - Ini\Masks + Masks - Ini\Masks + Masks - Ini\Masks + Masks - Ini\Masks + Masks - Ini\Masks + Masks diff --git a/src/tf/tf0100a.h b/src/tf/tf0100a.h index a6fc8fbfe..c919eaac1 100644 --- a/src/tf/tf0100a.h +++ b/src/tf/tf0100a.h @@ -19,9 +19,10 @@ #define B_TIPO_BOLLADOG 413 #define B_TIPO_STORDOC 414 - #define END_BOOLEAN 415 +#define F_ESTEROMETRO 416 + #define END_MASK 421 #define F_RIGHE 301 // Sheet righe tf diff --git a/src/tf/tf0100a.uml b/src/tf/tf0100a.uml index 5031144cd..c4376f548 100644 --- a/src/tf/tf0100a.uml +++ b/src/tf/tf0100a.uml @@ -165,6 +165,12 @@ BEGIN FLAGS "" END +BOOLEAN B_ESTEROMETRO +BEGIN + PROMPT 1 10 "Esporta solo fatture attive non inviate con FP" + FLAGS "" +END + ENDPAGE PAGE "Trasferimento Fatture" 0 2 0 0 diff --git a/src/tf/tfutility.cpp b/src/tf/tfutility.cpp index c0b6a3dc6..92a29f002 100644 --- a/src/tf/tfutility.cpp +++ b/src/tf/tfutility.cpp @@ -4,6 +4,8 @@ #include "../cg/cglib03.h" #include "../fe/felib.h" #include "tfutility.h" +#include "../fp/fplib.h" +#include "tf0100b.h" // Ritorna il record da trasfatt @@ -102,6 +104,27 @@ bool checkRecord(TISAM_recordset* rec) TCausale caus(rec->get("23.CODCAUS").as_string(), rec->get("23.DATAREG").as_date().year()); if(caus.soloiva() && (caus.reverse_charge() || caus.regime_speciale() == 3)) return false; + + // controllo se la fattura non è già stata spedita con la fatt. elettronica + static TPaf_record paf0100f("PAF0100F"); + // controllo se il movimento è agganciato a un documento + if(!rec->get("23.DPROVV").is_empty() && !rec->get("23.DANNO").is_empty() && !rec->get("23.DCODNUM").is_empty() && !rec->get("23.DNDOC").is_empty()) + { + TString hfatt, bfatt; + TRectype rdoc(LF_DOC); + rdoc.put(DOC_PROVV, rec->get("23.DPROVV").as_string()); + rdoc.put(DOC_PROVV, rec->get("23.DANNO").as_string()); + rdoc.put(DOC_PROVV, rec->get("23.DCODNUM").as_string()); + rdoc.put(DOC_PROVV, rec->get("23.DNDOC").as_string()); + + // se riesco a generare la chiave, trovo il record e ha il flag di gestione in errore o un errore esterno, salto la fattura (solo se attivo flag in maschera) + if (msk().get_bool(F_ESTEROMETRO) && chiave_paf(rdoc, hfatt, bfatt) && paf0100f.search(nullptr, hfatt, bfatt) && (paf0100f.sq_get("P1_GESTIONE") == "E" || paf0100f.sq_get("P1_ERREST") == "*")) + { + return false; + } + } + + } else if(anaCli.italiano() && anaCli.partita_IVA()[0] != '0' && anaCli.partita_IVA()[0] != '1' && anaCli.codice_fiscale()[0] > '8') // Salto tutti i fornitori con cod cf che inizia per 8 o 9 e con p.iva non valida {