Merge branch 'R12.00' of http://10.65.20.33/sirio/CAMPO/campo into R12.00

This commit is contained in:
Alessandro Bonazzi 2022-02-13 10:04:43 +01:00
commit ae0ffdde44
23 changed files with 388 additions and 98 deletions

View File

@ -149,7 +149,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\cg\cglib03.cpp" />
<ClCompile Include="..\src\m770\770.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -188,8 +187,6 @@
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\src\cg\cglib01.cpp" />
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\m770\770100a.uml" />
@ -344,6 +341,9 @@
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="cglib.vcxproj">
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -41,21 +41,12 @@
<ClCompile Include="..\src\m770\77lib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\m770\770300.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\m770\770400.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\m770\770100a.uml">

View File

@ -147,9 +147,6 @@
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\cg\cglib01.cpp" />
<ClCompile Include="..\src\cg\cglib03.cpp" />
<ClCompile Include="..\src\cg\cglib07.cpp" />
<ClCompile Include="..\src\cg\cgsaldac.cpp" />
<ClCompile Include="..\src\m770\777.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -202,6 +199,9 @@
<ProjectReference Include="AgaLib.vcxproj">
<Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
</ProjectReference>
<ProjectReference Include="cglib.vcxproj">
<Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\m770\777200a.h" />

View File

@ -33,24 +33,15 @@
<ClCompile Include="..\src\m770\777200.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\m770\777201.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\m770\777202.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib07.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cgsaldac.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\src\cg\cglib03.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MskCompiler Include="..\src\m770\777100a.uml">

View File

@ -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.1778
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "770", "770.vcxproj", "{ECFC8D48-AF18-485E-8DBF-7AAC35C062AA}"
ProjectSection(ProjectDependencies) = postProject
{7B80F974-CE2E-4BD9-855A-44FF139FF288} = {7B80F974-CE2E-4BD9-855A-44FF139FF288}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "771mod", "771mod.vcxproj", "{60DC2528-9102-4E47-BA1B-4316C3F5E938}"
EndProject
@ -19,6 +24,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "777", "777.vcxproj", "{0AC7
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{7B80F974-CE2E-4BD9-855A-44FF139FF288}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -61,8 +68,15 @@ 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
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.ActiveCfg = Debug|Win32
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.Build.0 = Debug|Win32
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.ActiveCfg = Release|Win32
{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CE270B1F-2BC9-415E-BC19-6C86D3DCCF35}
EndGlobalSection
EndGlobal

3
cd/test/cg1111.txt Normal file
View File

@ -0,0 +1,3 @@
cg2.exe
Compilata prima nota

98
cd/test/cg1111a.ini Normal file
View File

@ -0,0 +1,98 @@
[Main]
Demo=0
[cg2]
File(51) = cg2.exe|X
Patch = 1111
Versione = 21511200
[cg99]
Kill(0) = bastvet.msk|x
Kill(1) = batbzon.msk|x
Kill(2) = bastesc.msk|x
Kill(3) = batbnot.msk|x
Kill(4) = batblia.msk|x
Kill(5) = bastscc.msk|x
Kill(6) = batbinl.msk|x
Kill(7) = batbcfi.msk|x
Kill(8) = batblbu.msk|x
Kill(9) = bastmsp.msk|x
Kill(10) = bastcfi.rep|x
Kill(11) = bastcam.rep|x
Kill(12) = batblia.msk|x
Kill(13) = bastcco.msk|x
Kill(14) = bastleg.rep|x
Kill(15) = bastntb.rep|x
Kill(16) = batbleg.msk|x
Kill(17) = bastcve.rep|x
Kill(18) = batbver.msk|x
Kill(19) = batbesc.msk|x
Kill(20) = batbind.msk|x
Kill(21) = bastpdb.msk|x
Kill(22) = batbscc.msk|x
Kill(23) = batbcam.msk|x
Kill(24) = batbntb.msk|x
Kill(25) = bastnot.rep|x
Kill(26) = bastcfi.msk|x
Kill(27) = bastreg.msk|x
Kill(28) = bastnot.msk|x
Kill(29) = bastarb.rep|x
Kill(30) = bastpor.rep|x
Kill(31) = bastmsp.rep|x
Kill(32) = bastpor.msk|x
Kill(33) = batbndo.msk|x
Kill(34) = bastzon.msk|x
Kill(35) = bastesc.rep|x
Kill(36) = batbdel.msk|x
Kill(37) = bastndo.rep|x
Kill(38) = batbvet.msk|x
Kill(39) = bastver.rep|x
Kill(40) = bastcve.msk|x
Kill(41) = bastntb.msk|x
Kill(42) = batbpor.msk|x
Kill(43) = bastcam.msk|x
Kill(44) = batbpdb.msk|x
Kill(45) = bastscc.rep|x
Kill(46) = cgtbcon.msk|x
Kill(47) = bastpdb.rep|x
Kill(48) = batbtit.msk|x
Kill(49) = bastndo.msk|x
Kill(50) = bastdpn.msk|x
Kill(51) = batbmsp.msk|x
Kill(52) = bastcco.rep|x
Kill(53) = bastzon.rep|x
Kill(54) = batbarb.msk|x
Kill(55) = bastver.msk|x
Kill(56) = batbins.msk|x
Kill(57) = bastdpn.rep|x
Kill(58) = batbdpn.msk|x
Kill(59) = bastivd.rep|x
Kill(60) = bastleg.msk|x
Kill(61) = batbtra.msk|x
Kill(62) = bastivd.msk|x
Kill(63) = bastreg.rep|x
Kill(64) = batbcve.msk|x
Kill(65) = batbivd.msk|x
Kill(66) = batbcco.msk|x
Kill(67) = bastvet.rep|x
Kill(68) = cg2fppro.msk|x
Kill(69) = batbreg.msk|x
Kill(70) = bastarb.msk|x
[cg]
Data = 03-02-2022
Descrizione = Contabilita' Generale
Dischi = 1
Edit_19 = cg0 -0
Edit_20 = cg0 -1
Edit_26 = cg0 -4
Edit_5 = cg0 -5
Moduli = ba
OEM =
Patch = 1111
PostProcess = bainst -0 CG
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/cg1111a1.zip Normal file

Binary file not shown.

5
cd/test/ve1110.txt Normal file
View File

@ -0,0 +1,5 @@
ve1800a.msk
ve18001.rep
ve1.exe
Modulo Stampa fido clienti corretto e aggiornato

131
cd/test/ve1110a.ini Normal file
View File

@ -0,0 +1,131 @@
[Main]
Demo=0
[ve1]
File(44) = ve1.exe|X
File(59) = ve18001.rep|X
File(60) = ve1800a.msk|X
Patch = 1110
Versione = 21511200
[ve99]
Kill(0) = batbcld.msk|x
Kill(1) = bastspp.rep|x
Kill(2) = bastimb.msk|x
Kill(3) = bastgmc.rep|x
Kill(4) = basttri.msk|x
Kill(5) = baststd.msk|x
Kill(6) = bastctr.rep|x
Kill(7) = batbcra.msk|x
Kill(8) = batbpro.msk|x
Kill(9) = bastcra.rep|x
Kill(10) = batbtip.msk|x
Kill(11) = batbgca.msk|x
Kill(12) = bastgca.msk|x
Kill(13) = baststd.rep|x
Kill(14) = bastnum.rep|x
Kill(15) = batbspt.msk|x
Kill(16) = ve7100a.msk|x
Kill(17) = batbcaa.msk|x
Kill(18) = bastasf.rep|x
Kill(19) = bastfrd.rep|x
Kill(20) = bastprs.rep|x
Kill(21) = ve7400a.msk|x
Kill(22) = batbgsa.msk|x
Kill(23) = batbtri.msk|x
Kill(24) = basteld.rep|x
Kill(25) = bastabe.msk|x
Kill(26) = batbabe.msk|x
Kill(27) = batbfca.msk|x
Kill(28) = ve7300a.msk|x
Kill(29) = batbfsa.msk|x
Kill(30) = batbfrd.msk|x
Kill(31) = bastnum.msk|x
Kill(32) = batbubi.msk|x
Kill(33) = batbfrm.msk|x
Kill(34) = bastrfc.msk|x
Kill(35) = bastums.rep|x
Kill(36) = batbspp.msk|x
Kill(37) = bastcra.msk|x
Kill(38) = ve7200a.msk|x
Kill(39) = bastgmc.msk|x
Kill(40) = batbums.msk|x
Kill(41) = bastfca.rep|x
Kill(42) = batbfid.msk|x
Kill(43) = batbfrr.msk|x
Kill(44) = bastfrr.msk|x
Kill(45) = ve7300a.frm|x
Kill(46) = bastrfc.rep|x
Kill(47) = basttri.rep|x
Kill(48) = ve7400a.ini|x
Kill(49) = bastctr.msk|x
Kill(50) = ve7.exe|x
Kill(51) = basttip.rep|x
Kill(52) = bastgca.rep|x
Kill(53) = bastgcg.msk|x
Kill(54) = basttag.msk|x
Kill(55) = bastimb.rep|x
Kill(56) = batbstd.msk|x
Kill(57) = ve7600a.msk|x
Kill(58) = bastfrr.rep|x
Kill(59) = bastasf.msk|x
Kill(60) = batbprs.msk|x
Kill(61) = bastrfa.msk|x
Kill(62) = bastubi.rep|x
Kill(63) = bastabe.rep|x
Kill(64) = bastcaa.msk|x
Kill(65) = batbmre.msk|x
Kill(66) = batbasf.msk|x
Kill(67) = batbrfc.msk|x
Kill(68) = batbgcg.msk|x
Kill(69) = bastcau.msk|x
Kill(70) = batbtag.msk|x
Kill(71) = batbcau.msk|x
Kill(72) = bastcau.rep|x
Kill(73) = batbrfa.msk|x
Kill(74) = ve7200a.frm|x
Kill(75) = bastrfa.rep|x
Kill(76) = bastfrm.rep|x
Kill(77) = bastbnp.msk|x
Kill(78) = ve7700a.msk|x
Kill(79) = ve7701a.ini|x
Kill(80) = bastums.msk|x
Kill(81) = batbctr.msk|x
Kill(82) = bastcaa.rep|x
Kill(83) = batbprv.msk|x
Kill(84) = bastubi.msk|x
Kill(85) = bastprs.msk|x
Kill(86) = basteld.msk|x
Kill(87) = batbnum.msk|x
Kill(88) = bastfrd.msk|x
Kill(89) = bastspp.msk|x
Kill(90) = efstbnp.rep|x
Kill(91) = efstbnp.msk|x
Kill(92) = batbgmc.msk|x
Kill(93) = eftbbnp.msk|x
Kill(94) = basttag.rep|x
Kill(95) = batbeld.msk|x
Kill(96) = basttip.msk|x
Kill(97) = batbbnp.msk|x
Kill(98) = batbacr.msk|x
Kill(99) = batbimb.msk|x
Kill(100) = bastfca.msk|x
Kill(101) = bastfrm.msk|x
Kill(102) = bastbnp.rep|x
Kill(103) = ve7400conf.ini|x
Kill(104) = bastgcg.rep|x
Kill(105) = ve7500a.msk|x
[ve]
Data = 11-01-2022
Descrizione = Vendite
Dischi = 1
Moduli = ba,cg0, cg9,pr9,mg9,sv9,in9,ef9
OEM =
Patch = 1110
PostProcess = bainst -0 VE
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ve1110a1.zip Normal file

Binary file not shown.

View File

@ -21,12 +21,12 @@
#define F_NUMDOCEXT 130
#define F_RITFATT 231
#define F_PROKEY 232
#define F_COLFPPRO 233
#define F_DATACOMPCR 234
#define F_COLFPPRO 233
#define F_DATACOMPCR 234
#define F_CLIFO 128
#define F_CODCLIFOR 151
#define F_RAGSOCCF 152
#define F_RAGSOCCF 152
#define F_STATOPAIV 153
#define F_PIVA 154
#define F_COFI 155
@ -91,10 +91,10 @@
#define F_REVCHARGE 184
#define F_MOVCOLL 185
#define F_GOCOLL 186
#define F_IDDOCSDI 187
#define F_DATADOCSDI 188
#define F_IDDOCSDI 187
#define F_DATADOCSDI 188
#define F_SHEETCG 190
#define F_SHEETCG 190
#define F_SHEETIVA 191

View File

@ -4069,7 +4069,7 @@ void TPrimanota_application::insert_part_scad(TConfig& ini)
}
} while (rec.move_next());
num_doc_rif() = part;
_num_doc_rif_partite = part;
}
}
@ -4537,9 +4537,3 @@ bool& is_f1()
static bool is_f1 = false;
return is_f1;
}
TString& num_doc_rif()
{
static TString num_doc_rif_partite = -1;
return num_doc_rif_partite;
}

View File

@ -95,6 +95,7 @@ class TPrimanota_application : public TRelation_application
int _last_date;
bool _f1_ini;
bool _f1_liq;
TString _num_doc_rif_partite;
friend class TPro_msk;
static bool showpartite_handler(TMask_field& f, KEY k);
@ -401,6 +402,7 @@ public:
TImporto imposte_split_pay() const;
const TString& num_doc_rif() const { return _num_doc_rif_partite; }
TPrimanota_application();
virtual ~TPrimanota_application() { }

View File

@ -200,7 +200,7 @@ const TString& TAnagrafica::cognome() const
const TString& TAnagrafica::nome() const
{
CHECK(fisica(), "Non chiedere nome giuridico!");
//CHECK(fisica(), "Non chiedere nome giuridico!");
TString& c = get_tmp_string();
c = _ragsoc.mid(30, 20);
return c.trim();

View File

@ -116,6 +116,7 @@ END
BOOLEAN F_PROVVISORIO
BEGIN
PROMPT 1 17 "Provvisorio"
FLAG "H"
END
ENDPAGE

View File

@ -127,7 +127,7 @@ void TPAR_mask::fill()
TPaf_record paf0100f("PAF0100F");
TSheet_field& regs = sfield(F_REGS);
TString query;
const bool definitivo = get_bool(F_DEFINITIVO);
const bool diagn = get_bool(F_DIAGN);
enable(DLG_OK, filter_selected.empty() || filter_selected == "E" || filter_selected == "X");
enable(DLG_PRINT, true);
@ -135,7 +135,7 @@ void TPAR_mask::fill()
enable(DLG_FINDREC, filter_selected == "D");
enable(DLG_KEY, _enable_chiave_fixer && filter_selected.empty());
regs.enable_column(S_ONLYGEN, !definitivo); // che regola si usa ??
regs.enable_column(S_ONLYGEN, diagn); // che regola si usa ??
/*
VECCHIA QUERY
@ -238,7 +238,7 @@ void TPAR_mask::fill()
split = is_split_payment(mov);
}
}
if (!definitivo)
if (diagn)
regs.set_row_cell(S_ONLYGEN, false, r);
}
@ -409,8 +409,8 @@ void TPAR_mask::export_paf()
int ndocs = 0;
TSheet_field& sht = sfield(F_REGS);
const TString &tipo_doc_sdi = get(F_TIPO_SDI);
const bool definitivo = get_bool(F_DEFINITIVO);
TReg_fp elab(tipo_doc_sdi,definitivo);
const bool diagn = get_bool(F_DIAGN);
TReg_fp elab(tipo_doc_sdi, !diagn);
TReport_book book;
//elab.set_cache_insert(true);
@ -442,12 +442,13 @@ void TPAR_mask::export_paf()
if (!yesno_box(msg))
break;
}
if (!definitivo)
if (diagn)
{
TReport mov_rep;
TProgram_report mov_rep;
mov_rep.load("fp0700a");
mov_rep.set_var("#NUM", nreg);
mov_rep.recordset()->set_var("#NUM", nreg);
book.add(mov_rep);
}
}
@ -463,7 +464,7 @@ void TPAR_mask::export_paf()
}
}
elab.show_log();
if (!definitivo)
if (diagn)
book.preview();
}
}
@ -740,7 +741,10 @@ public:
void Treg2Paf::main_loop()
{
while (TPAR_mask().run() == K_ENTER) {}
TPAR_mask m;
m.set(F_DIAGN, true);
while (m.run() == K_ENTER) {}
}
bool Treg2Paf::create()

View File

@ -4,9 +4,9 @@
#define F_CAUSALI_TIPO 404
#define F_TIPO_SDI 405
#define F_REGS 406
#define F_DEFINITIVO 407
#define F_DIAGN 407
#define START_MASK F_DATAINI
#define END_MASK F_DEFINITIVO
#define END_MASK F_DIAGN
#define DLG_KEY 501

View File

@ -98,9 +98,9 @@ BEGIN
ITEM "TD20|TD20 Autofattura"
END
BOOLEAN F_DEFINITIVO
BOOLEAN F_DIAGN
BEGIN
PROMPT 1 15 "Definitivo"
PROMPT 1 15 "Esporta in stato diagnosticato"
END
STRING DLG_PROFILE 50
@ -119,7 +119,7 @@ BEGIN
ITEM "Anno"
ITEM "Num.\nReg.@7"
ITEM "Data\nReg.@10"
ITEM "Num.\nDoc.@7"
ITEM "Num.\nDoc.@7"
ITEM "Data\nDoc.@10"
ITEM "Cliente"
ITEM "Ragione Sociale@50"
@ -169,7 +169,7 @@ BEGIN
INPUT DESCR S_DESCR
DISPLAY "Descrizione @50" DESCR
DISPLAY "Cod." CODCAUS
DISPLAY "Documento" TIPODOC
DISPLAY "Documento" TIPODOC
DISPLAY "Registro" REG
DISPLAY "Tipo movimento" TIPOMOV
DISPLAY "Regime IVA" REGSPIVA

View File

@ -513,7 +513,7 @@ private:
TPaf_container _paf_container;
int _count_r_conai;
bool _nascondi_sconti_righe_fatt;
bool _provvisorio;
bool _diagn;
TFP_nota_piede_f _riga_npf;
bool _has_cust;
bool _tracciati_2021;
@ -565,7 +565,9 @@ protected:
bool get_bank_appoggio(const TDocumento& doc, TString& iban, TString& abi, TString& cab, TString& istituto) const;
const TString& descrizione(const TRiga_documento& rdoc);
const TRectype& cco(const TRectype& doc) const; // Contratto/Convenzione/Offerta
const char * stato_paf() const { return _provvisorio ? "X" : "D"; }
const char * stato_paf();
//const char * stato_paf() const { return _provvisorio ? "X" : "D"; }
const TString & natura(const char* codiva) const;
static const char* get_esigibilita_iva(const TDocumentoEsteso& doc);
@ -693,7 +695,8 @@ protected:
void set_qta_prezzo(TPaf_record& paf1800f, const TMovimento_contabile& mov, int n_row) const;
void add_ritenuta(const TMovimento_contabile & mov, int n_row, TPaf_record& paf0700f) const;
bool add_riepilogo_iva(const TMovimento_contabile mov, int n_riga);
const char * stato_paf() const { return _definitivo ? "D" : "X"; }
const char * stato_paf() const { return _definitivo && !get_no_export_pronto() ? "P" : "D"; }
const TFirm& TReg_fp::get_firm(){return prefix().firm();}

View File

@ -1328,6 +1328,19 @@ const TRectype& TDoc_fp::cco(const TRectype& doc) const
return tabmod.curr();
}
const char* TDoc_fp::stato_paf() {
if (get_no_export_pronto())
{
_diagn = true;
return "D";
}
else
{
_diagn = false;
return "P";
}
}
bool TDoc_fp::show_log()
{
TReport_book b;
@ -1338,15 +1351,45 @@ bool TDoc_fp::show_log()
return _log.preview();
}
int TDoc_fp::commit()
//DA CORREGGERE PER EVITARE DI CONVERTIRE TUTTE DA STATO D A P
int TDoc_fp::commit()
{
int r = 0;
if (_to_commit)
{
// Controllo stato diagnosticato
if (get_no_export_pronto())
{
_log.log(2, "Le fatture sono state esportate in stato diagnosticato");
}
else
{
_log.log(2, "Le fatture sono state esportate correttamente in stato pronto");
}
if (r >= 0 && fp_db().sq_commit())
{
r += 2;
}
else
{
r = -1;
_log.log(2, fp_db().sq_get_token_text_error(1));
//_log.log(2, "UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'");
}
}
_to_commit = false;
return r;
/*
int r = 0;
if (_to_commit)
{
// Controllo stato diagnosticato
if (!get_no_export_pronto())
{
if (fp_db().sq_set_exec("UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'"))
if (fp_db().sq_set_exec("UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'AND "))
{
r += 1;
_log.log(2, "Le fatture sono state esportate correttamente in stato pronto");
@ -1374,12 +1417,15 @@ int TDoc_fp::commit()
}
_to_commit = false;
return r;
*/
}
int TDoc_fp::force_commit()
{
_to_commit = true;
return commit();
}
const TString & TDoc_fp::natura(const char* codiva) const
{
const TCodiceIVA iva(codiva);
@ -2732,7 +2778,7 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
pafw300f.set("PW_NUMERO", doc.numero());
pafw300f.set("PW_DATA", doc.data());
if (!cached_tipodoc(doc.get(DOC_TIPODOC)).invio_xml() || doc.noinvioxml() || _provvisorio)
if (!cached_tipodoc(doc.get(DOC_TIPODOC)).invio_xml() || doc.noinvioxml() || _diagn)
{
pafw300f.set("PW_CODSDI", "**********");
}
@ -2799,7 +2845,7 @@ TRectype& TDoc_fp::key_to_doc(const TDoc_key& key)
_doc_rec->put(DOC_NDOC, key.ndoc());
return *_doc_rec;
}
TDoc_fp::TDoc_fp(bool provvisorio) : _doc_rec(nullptr), _log(nullptr), _cache_insert(false) , _provvisorio(provvisorio)
TDoc_fp::TDoc_fp(bool provvisorio) : _doc_rec(nullptr), _log(nullptr), _cache_insert(false) , _diagn(provvisorio)
{
_ditta.init(LF_NDITTE, prefix().get_codditta());
_cofi = get_cofi_tras();
@ -2847,9 +2893,9 @@ TDoc_fp::~TDoc_fp()
| $$ | $$ \ $$| $$_____/| $$ | $$
| $$ | $$ | $$| $$$$$$$| $$$$$$$
|__/ |__/ |__/ \_______/ \____ $$
/$$ \ $$
| $$$$$$/
\______/
/$$ \ $$
| $$$$$$/
\______/
*/
bool TReg_fp::insert(TPaf_record& p)
@ -2998,7 +3044,11 @@ bool TReg_fp::initialize(const TMovimento_contabile& mov)
// Controllo se il documento almeno in stato di stampa
_is_pa = mov.clifo().get_int("ALLEG") == 7;
_coddest = _ditta.coddest();
if (_ditta.coddest().empty())
_coddest = "0000000";
else
_coddest = _ditta.coddest();
_pec = _ditta.pec();
_enapec = _coddest == "0000000" && _pec.full();
_privato = _coddest.len() != 6;
@ -3017,32 +3067,16 @@ int TReg_fp::commit()
if (_to_commit)
{
// Controllo stato diagnosticato
if (!get_no_export_pronto())
{
if (fp_db().sq_set_exec("UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'"))
{
r += 1;
_log.log(2, "Le fatture sono state esportate correttamente in stato pronto");
}
else
{
r = -1;
_log.log(2, fp_db().sq_get_token_text_error(1));
}
}
else
{
if (get_no_export_pronto() || !_definitivo)
_log.log(2, "Le fatture sono state esportate in stato diagnosticato");
}
else
_log.log(2, "Le fatture sono state esportate correttamente in stato pronto");
if (r >= 0 && fp_db().sq_commit())
{
r += 2;
}
else
{
r = -1;
_log.log(2, fp_db().sq_get_token_text_error(1));
_log.log(2, "UPDATE PAF0100F SET P1_GESTIONE = 'P' WHERE P1_GESTIONE = 'D'");
}
}
_to_commit = false;
@ -3196,8 +3230,14 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
paf0200f.set("P2_FISCIVACOD", fornitore.partita_IVA());
}
paf0200f.set("P2_CODFISCALE", fornitore.codice_fiscale()); //
const bool df = _ditta.fisica();
if (_ditta.fisica())
{
TString forn_n = fornitore.nome();
TString forn_c = fornitore.cognome();
paf0200f.set("P2_ANANOME", fornitore.nome()); //
paf0200f.set("P2_ANACOGNOME", fornitore.cognome()); //
}
@ -3213,7 +3253,7 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
paf0200f.set("P2_SEDENRCIVICO", fornitore.civico_residenza().left(8)); //
paf0200f.set("P2_SEDECOMUNE", fornitore.comune_residenza()); //
paf0200f.set("P2_SEDENAZ", fornitore.stato_residenza_ISO()); //
paf0200f.set("P2_GESTIONE", stato_paf());
//paf0200f.set("P2_GESTIONE", stato_paf());
// I clienti esteri possono avere CAP alfanumerici, li tolgo
if (fornitore.stato_residenza_ISO() != "IT")

View File

@ -21,10 +21,6 @@
#include "771100.h"
#include "77lib.h"
#include "../ba/ba4200.h"
#include "../ba/ba4300.h" // per il f_coddittah
#include "../ba/ba4500.h"
#include <comuni.h>
#include <anagr.h>
#include <nditte.h>

View File

@ -6,6 +6,12 @@ ENDPAGE
PAGE "Lista documenti" -1 -1 60 21
GROUPBOX DLG_NULL 74 5
BEGIN
PROMPT 1 2 "@bCliente"
GROUP 1
END
NUMBER F_CODFR 6
BEGIN
PROMPT 2 3 "Da codice "
@ -75,32 +81,43 @@ BEGIN
CHECKTYPE SEARCH
END
GROUPBOX DLG_NULL 74 5
BEGIN
PROMPT 1 7 "@bData Operazione"
GROUP 2
END
DATE F_DADATA
BEGIN
PROMPT 2 7 "Da data limite operazione "
PROMPT 2 8 "Da data limite operazione "
FLAGS "H"
END
DATE F_ADATA
BEGIN
PROMPT 3 9 "A data limite operazione "
PROMPT 2 9 "A data limite operazione "
MESSAGE COPY,F_DATASCAD
END
DATE F_DATASCAD
BEGIN
PROMPT 2 11 "Data limite scaduto "
PROMPT 2 10 "Data limite scaduto "
END
NUMBER F_GIORNIRISK 3
GROUPBOX DLG_NULL 74 3
BEGIN
PROMPT 2 13 "Giorni calcolo rischio "
GROUP 1
PROMPT 1 12 "@bParametri Configurazione"
GROUP 3
END
BOOLEAN F_CONFIDO
BEGIN
PROMPT 2 15 "Includi clienti con fido 0 "
PROMPT 44 13 "Includi clienti con fido 0 "
END
NUMBER F_GIORNIRISK 3
BEGIN
PROMPT 2 13 "Giorni calcolo rischio"
END
STRING F_REPORT 50