Patch level : 12.0 nopatch
Files correlati : fp, m77 Commento: Modifiche Integrazioni + aggiornamento m77 per compilazione
This commit is contained in:
parent
65c5357e1d
commit
2135c756a2
@ -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">
|
||||
|
@ -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">
|
||||
|
@ -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" />
|
||||
|
@ -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">
|
||||
|
@ -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
|
||||
|
@ -116,6 +116,7 @@ END
|
||||
BOOLEAN F_PROVVISORIO
|
||||
BEGIN
|
||||
PROMPT 1 17 "Provvisorio"
|
||||
FLAG "H"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
//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();
|
||||
@ -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;
|
||||
|
||||
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")
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user