Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00
This commit is contained in:
commit
eea8980d70
15
cd/test/cg0996.txt
Normal file
15
cd/test/cg0996.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
cg0.exe
|
||||||
|
cg2.exe
|
||||||
|
cg4.exe
|
||||||
|
|
||||||
|
- Sistemato enum tipo sospensione (lista progressivi liquidazione stampa registri apertura esercizio iva apertura conti ricostruzione saldi)
|
||||||
|
- Sistemanto enum tiporeg
|
||||||
|
- Sistemato enum tiposal ( conferma movimeni provvisori
|
||||||
|
- Aggiuta cache di registri
|
||||||
|
|
||||||
|
- Sistemato enum tipo sospensione (lista progressivi liquidazione stampa registri apertura esercizio iva apertura conti ricostruzione saldi)
|
||||||
|
- Sistemanto enum tiporeg
|
||||||
|
- Sistemato enum tiposal ( conferma movimeni provvisori
|
||||||
|
- Aggiuta cache di registri
|
||||||
|
- Una fattura con pgamenti antecedenti alla fattura stessa e flag di liquidazione nel periodo precedente non veniva liquidato ne nel mese
|
||||||
|
corrente ne nel mese precedente
|
108
cd/test/cg0996a.ini
Normal file
108
cd/test/cg0996a.ini
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[cg0]
|
||||||
|
File(0) = cg0.exe|X
|
||||||
|
Patch = 0996
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[cg2]
|
||||||
|
File(51) = cg2.exe|X
|
||||||
|
Patch = 0996
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[cg4]
|
||||||
|
File(84) = cg4.exe|X
|
||||||
|
Patch = 0996
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[cg99]
|
||||||
|
Kill(0) = bastreg.rep|x
|
||||||
|
Kill(1) = bastesc.rep|x
|
||||||
|
Kill(2) = bastzon.rep|x
|
||||||
|
Kill(3) = bastarb.msk|x
|
||||||
|
Kill(4) = batbtit.msk|x
|
||||||
|
Kill(5) = bastcfi.rep|x
|
||||||
|
Kill(6) = bastivd.msk|x
|
||||||
|
Kill(7) = bastcve.rep|x
|
||||||
|
Kill(8) = batbdpn.msk|x
|
||||||
|
Kill(9) = cg2fppro.msk|x
|
||||||
|
Kill(10) = bastnot.rep|x
|
||||||
|
Kill(11) = bastreg.msk|x
|
||||||
|
Kill(12) = batbnot.msk|x
|
||||||
|
Kill(13) = bastcco.msk|x
|
||||||
|
Kill(14) = batbver.msk|x
|
||||||
|
Kill(15) = batbcve.msk|x
|
||||||
|
Kill(16) = batbleg.msk|x
|
||||||
|
Kill(17) = bastcam.rep|x
|
||||||
|
Kill(18) = batbinl.msk|x
|
||||||
|
Kill(19) = batbzon.msk|x
|
||||||
|
Kill(20) = batbind.msk|x
|
||||||
|
Kill(21) = bastvet.rep|x
|
||||||
|
Kill(22) = bastpdb.msk|x
|
||||||
|
Kill(23) = bastvet.msk|x
|
||||||
|
Kill(24) = bastcco.rep|x
|
||||||
|
Kill(25) = bastdpn.rep|x
|
||||||
|
Kill(26) = batbpor.msk|x
|
||||||
|
Kill(27) = batblbu.msk|x
|
||||||
|
Kill(28) = bastmsp.msk|x
|
||||||
|
Kill(29) = bastarb.rep|x
|
||||||
|
Kill(30) = bastntb.rep|x
|
||||||
|
Kill(31) = bastzon.msk|x
|
||||||
|
Kill(32) = bastesc.msk|x
|
||||||
|
Kill(33) = batbscc.msk|x
|
||||||
|
Kill(34) = bastscc.rep|x
|
||||||
|
Kill(35) = batbins.msk|x
|
||||||
|
Kill(36) = batbpdb.msk|x
|
||||||
|
Kill(37) = batbivd.msk|x
|
||||||
|
Kill(38) = batblia.msk|x
|
||||||
|
Kill(39) = bastver.rep|x
|
||||||
|
Kill(40) = batbreg.msk|x
|
||||||
|
Kill(41) = bastntb.msk|x
|
||||||
|
Kill(42) = batbcco.msk|x
|
||||||
|
Kill(43) = bastpor.rep|x
|
||||||
|
Kill(44) = bastver.msk|x
|
||||||
|
Kill(45) = batbcfi.msk|x
|
||||||
|
Kill(46) = batbarb.msk|x
|
||||||
|
Kill(47) = batbndo.msk|x
|
||||||
|
Kill(48) = bastmsp.rep|x
|
||||||
|
Kill(49) = bastndo.msk|x
|
||||||
|
Kill(50) = bastndo.rep|x
|
||||||
|
Kill(51) = batbmsp.msk|x
|
||||||
|
Kill(52) = batbtra.msk|x
|
||||||
|
Kill(53) = bastcve.msk|x
|
||||||
|
Kill(54) = bastivd.rep|x
|
||||||
|
Kill(55) = batbcam.msk|x
|
||||||
|
Kill(56) = bastscc.msk|x
|
||||||
|
Kill(57) = bastcam.msk|x
|
||||||
|
Kill(58) = bastnot.msk|x
|
||||||
|
Kill(59) = batblia.msk|x
|
||||||
|
Kill(60) = bastpdb.rep|x
|
||||||
|
Kill(61) = bastleg.msk|x
|
||||||
|
Kill(62) = batbntb.msk|x
|
||||||
|
Kill(63) = bastdpn.msk|x
|
||||||
|
Kill(64) = batbdel.msk|x
|
||||||
|
Kill(65) = batbesc.msk|x
|
||||||
|
Kill(66) = bastpor.msk|x
|
||||||
|
Kill(67) = bastcfi.msk|x
|
||||||
|
Kill(68) = cgtbcon.msk|x
|
||||||
|
Kill(69) = bastleg.rep|x
|
||||||
|
Kill(70) = batbvet.msk|x
|
||||||
|
|
||||||
|
[cg]
|
||||||
|
Data = 15-09-2020
|
||||||
|
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 = 0996
|
||||||
|
PostProcess = bainst -0 CG
|
||||||
|
PreProcess =
|
||||||
|
Prezzo(1) =
|
||||||
|
Prezzo(2) =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/cg0996a1.zip
Normal file
BIN
cd/test/cg0996a1.zip
Normal file
Binary file not shown.
6
cd/test/f90996.txt
Normal file
6
cd/test/f90996.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
f90.exe
|
||||||
|
f90200a.msk
|
||||||
|
|
||||||
|
- Aggiornamento codici per nuovo tracciato in vigore dall'1 Ottobre: TipoDocSDI TipoRitenute Pagamenti.
|
||||||
|
- Aggiunta possib. di eliminare pacchetti se in errore web o sost anche in definit.
|
||||||
|
- Ricarimento cat. doc. a ogni giro.
|
20
cd/test/f90996a.ini
Normal file
20
cd/test/f90996a.ini
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[f90]
|
||||||
|
File(0) = f90.exe|X
|
||||||
|
File(5) = f90200a.msk|X
|
||||||
|
Patch = 0996
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[f9]
|
||||||
|
Data = 16-09-2020
|
||||||
|
Descrizione = Archiviazione Sostitutiva
|
||||||
|
Dischi = 1
|
||||||
|
Moduli = f9
|
||||||
|
OEM =
|
||||||
|
Patch = 996
|
||||||
|
PostProcess =
|
||||||
|
PreProcess =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/f90996a1.zip
Normal file
BIN
cd/test/f90996a1.zip
Normal file
Binary file not shown.
@ -410,15 +410,15 @@ void TMonitor_mask::delete_pack(const bool all) const
|
|||||||
TString query;
|
TString query;
|
||||||
const TString& codsoc(F9CONF.get_ambiente());
|
const TString& codsoc(F9CONF.get_ambiente());
|
||||||
query << "BEGIN\n"
|
query << "BEGIN\n"
|
||||||
" DECLARE @stato CHAR(2);\n\n"
|
" DECLARE @flag_prov CHAR(1), @stato CHAR(2);\n\n"
|
||||||
" SELECT @stato = " DRD_STATO "\n"
|
" SELECT @flag_prov = " DRD_FLAG_PD ", @stato = " DRD_STATO "\n"
|
||||||
" FROM " F9_DRD "\n"
|
" FROM " F9_DRD "\n"
|
||||||
" WHERE " DRD_ID_EST " = '" << id_estr << "';\n\n"
|
" WHERE " DRD_ID_EST " = '" << id_estr << "';\n\n"
|
||||||
" IF(@stato = '" D_GEST_ERR "' OR @stato = '" IN_DIAGN "') BEGIN\n"
|
" IF (@flag_prov = 'P' OR @stato = '" D_GEST_ERR "' OR @stato = '" IN_DIAGN "' OR @stato = '" D_WA_ERR "' OR @stato = '" D_ERR_SOS "') BEGIN\n"
|
||||||
" DELETE FROM " F9_ERR " WHERE " ERR_CODSOC " = '" << codsoc << "' AND " ERR_IDESTR " = '" << id_estr << "';\n"
|
" DELETE FROM " F9_ERR " WHERE " ERR_CODSOC " = '" << codsoc << "' AND " ERR_IDESTR " = '" << id_estr << "';\n"
|
||||||
" END\n"
|
" END\n"
|
||||||
" ELSE BEGIN\n"
|
" ELSE BEGIN\n"
|
||||||
" SELECT @stato AS STATO;\n"
|
" SELECT @flag_prov AS FLAG, @stato AS STATO;\n"
|
||||||
" END\n"
|
" END\n"
|
||||||
"END";
|
"END";
|
||||||
fp_db().sq_set_exec(query);
|
fp_db().sq_set_exec(query);
|
||||||
@ -428,7 +428,7 @@ void TMonitor_mask::delete_pack(const bool all) const
|
|||||||
" SELECT @flag_prov = " DRD_FLAG_PD ", @stato = " DRD_STATO "\n"
|
" SELECT @flag_prov = " DRD_FLAG_PD ", @stato = " DRD_STATO "\n"
|
||||||
" FROM " F9_DRD "\n"
|
" FROM " F9_DRD "\n"
|
||||||
" WHERE " DRD_ID_EST " = '" << id_estr << "';\n\n"
|
" WHERE " DRD_ID_EST " = '" << id_estr << "';\n\n"
|
||||||
" IF (@flag_prov = 'P' OR @stato = '" D_GEST_ERR "' OR @stato = '" IN_DIAGN "') BEGIN\n"
|
" IF (@flag_prov = 'P' OR @stato = '" D_GEST_ERR "' OR @stato = '" IN_DIAGN "' OR @stato = '" D_WA_ERR "' OR @stato = '" D_ERR_SOS "') BEGIN\n"
|
||||||
" DELETE FROM " F9_DRD " WHERE " DRD_CODSOC " = '" << codsoc << "' AND " DRD_ID_EST " = '" << id_estr << "';\n"
|
" DELETE FROM " F9_DRD " WHERE " DRD_CODSOC " = '" << codsoc << "' AND " DRD_ID_EST " = '" << id_estr << "';\n"
|
||||||
" DELETE FROM " F9_IVA " WHERE " IVA_CODSOC " = '" << codsoc << "' AND " IVA_IDLAN " = '" << id_estr << "';\n"
|
" DELETE FROM " F9_IVA " WHERE " IVA_CODSOC " = '" << codsoc << "' AND " IVA_IDLAN " = '" << id_estr << "';\n"
|
||||||
" DELETE FROM " F9_MOVESTR " WHERE " MES_CODSOC " = '" << codsoc << "' AND " MES_IDESTR " = '" << id_estr << "';\n"
|
" DELETE FROM " F9_MOVESTR " WHERE " MES_CODSOC " = '" << codsoc << "' AND " MES_IDESTR " = '" << id_estr << "';\n"
|
||||||
@ -436,9 +436,10 @@ void TMonitor_mask::delete_pack(const bool all) const
|
|||||||
" SELECT @flag_prov AS FLAG, @stato AS STATO;\n"
|
" SELECT @flag_prov AS FLAG, @stato AS STATO;\n"
|
||||||
"END";
|
"END";
|
||||||
fp_db().sq_set_exec(query);
|
fp_db().sq_set_exec(query);
|
||||||
if (fp_db().sq_get("FLAG") != "P" && fp_db().sq_get("STATO") != "02" && !all)
|
TString stato = fp_db().sq_get("STATO");
|
||||||
|
if (fp_db().sq_get("FLAG") != "P" && stato != D_GEST_ERR && stato != IN_DIAGN && stato != D_WA_ERR && stato != D_ERR_SOS && !all)
|
||||||
{
|
{
|
||||||
warning_box("E' possibile eliminare solo un'estrazione provvisoria o in stato di errore diagnostica gestionale.");
|
warning_box("E' possibile eliminare solo un'estrazione provvisoria\no in uno degli stati di errore se definitiva (02 - 05 - 08).");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fp_db().sq_commit();
|
fp_db().sq_commit();
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
class TF9_categorie_doc_msk : public TAutomask
|
class TF9_categorie_doc_msk : public TAutomask
|
||||||
{
|
{
|
||||||
std::shared_ptr<TArray_sheet> _annessi_sheet;
|
std::shared_ptr<TArray_sheet> _annessi_sheet;
|
||||||
TRecord_categorie _categorie_doc;
|
TCategorie_doc _categorie_doc;
|
||||||
bool _mod_precaricate;
|
bool _mod_precaricate;
|
||||||
|
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||||
|
@ -27,7 +27,6 @@ class TImport_msk : public TAutomask
|
|||||||
{
|
{
|
||||||
friend class TGestione_doc_cartacei_f9_msk;
|
friend class TGestione_doc_cartacei_f9_msk;
|
||||||
|
|
||||||
std::shared_ptr<TArray_sheet> _catdocs;
|
|
||||||
map<TString, unique_ptr<TArray_sheet>> _annessi;
|
map<TString, unique_ptr<TArray_sheet>> _annessi;
|
||||||
|
|
||||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
bool on_field_event(TOperable_field& o, TField_event e, long jolly) override;
|
||||||
@ -36,7 +35,7 @@ class TImport_msk : public TAutomask
|
|||||||
static bool catannpadre_handler(TMask_field& field, KEY key);
|
static bool catannpadre_handler(TMask_field& field, KEY key);
|
||||||
static bool ok_handler(TMask_field& field, KEY key);
|
static bool ok_handler(TMask_field& field, KEY key);
|
||||||
|
|
||||||
const char* select_catdoc();
|
static const char* select_catdoc();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_fields(const TString& impaddress, const TString& impnumreg, bool isannesso = false, const TString& catannpadre = "",
|
void set_fields(const TString& impaddress, const TString& impnumreg, bool isannesso = false, const TString& catannpadre = "",
|
||||||
@ -59,7 +58,7 @@ bool TImport_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
case F_IMPNUMREG:
|
case F_IMPNUMREG:
|
||||||
if(e == fe_modify)
|
if(e == fe_modify)
|
||||||
{
|
{
|
||||||
const std::shared_ptr<TCategorie_doc::classe_doc> c = categorie_doc().mov2cat(o.get_int());
|
const std::shared_ptr<TCategorie_doc::classe_doc> c = TCategorie_doc().mov2cat(o.get_int());
|
||||||
if (c != nullptr)
|
if (c != nullptr)
|
||||||
{
|
{
|
||||||
set(F_CATANNPADRE, c->catdoc);
|
set(F_CATANNPADRE, c->catdoc);
|
||||||
@ -82,12 +81,13 @@ bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
|||||||
static const char* msg_notexist = "Non esistono tipologie di annessi per questa categoria documentale.";
|
static const char* msg_notexist = "Non esistono tipologie di annessi per questa categoria documentale.";
|
||||||
static const char* msg_inspadre = "Questa registrazione non e' riconosciuta in nessuna categoria documentale.\nImpossible inserire un annesso.\n"
|
static const char* msg_inspadre = "Questa registrazione non e' riconosciuta in nessuna categoria documentale.\nImpossible inserire un annesso.\n"
|
||||||
"Si prega di inserire prima una cat. documentale che comprenda questo tipo di registrazione\naggiungendo anche eventuali tipologie di annessi.";
|
"Si prega di inserire prima una cat. documentale che comprenda questo tipo di registrazione\naggiungendo anche eventuali tipologie di annessi.";
|
||||||
|
TCategorie_doc cd;
|
||||||
TImport_msk& msk = (TImport_msk&)field.mask();
|
TImport_msk& msk = (TImport_msk&)field.mask();
|
||||||
if (key == K_TAB && field.dirty() && field.full())
|
if (key == K_TAB && field.dirty() && field.full())
|
||||||
{
|
{
|
||||||
if (msk.get(F_CATANNPADRE).full())
|
if (msk.get(F_CATANNPADRE).full())
|
||||||
{
|
{
|
||||||
const TString_array names_ann = categorie_doc().get_array_ann(msk.get(F_CATANNPADRE));
|
const TString_array names_ann = cd.get_array_ann(msk.get(F_CATANNPADRE));
|
||||||
if (names_ann.items() > 0)
|
if (names_ann.items() > 0)
|
||||||
{
|
{
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
@ -115,7 +115,7 @@ bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
|||||||
{
|
{
|
||||||
if (msk.get(F_CATANNPADRE).full())
|
if (msk.get(F_CATANNPADRE).full())
|
||||||
{
|
{
|
||||||
TArray_sheet* annessi = categorie_doc().get_sheet_ann(msk.get(F_CATANNPADRE)).get();
|
TArray_sheet* annessi = cd.get_sheet_ann(msk.get(F_CATANNPADRE)).get();
|
||||||
|
|
||||||
if (annessi && annessi->items() > 0)
|
if (annessi && annessi->items() > 0)
|
||||||
{
|
{
|
||||||
@ -123,7 +123,7 @@ bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
|||||||
{
|
{
|
||||||
const char* s = annessi->row(annessi->selected()).get(0);
|
const char* s = annessi->row(annessi->selected()).get(0);
|
||||||
TCategorie_doc::annesso annesso;
|
TCategorie_doc::annesso annesso;
|
||||||
if (categorie_doc().get_ann(s, annesso))
|
if (cd.get_ann(s, annesso))
|
||||||
{
|
{
|
||||||
if (annesso.opcee != "RC")
|
if (annesso.opcee != "RC")
|
||||||
msk.set(F_CATDOCANN, annesso.catdoc);
|
msk.set(F_CATDOCANN, annesso.catdoc);
|
||||||
@ -145,10 +145,11 @@ bool TImport_msk::catdocann_handler(TMask_field& field, KEY key)
|
|||||||
|
|
||||||
bool TImport_msk::catannpadre_handler(TMask_field& field, KEY key)
|
bool TImport_msk::catannpadre_handler(TMask_field& field, KEY key)
|
||||||
{
|
{
|
||||||
|
TCategorie_doc cd;
|
||||||
TImport_msk& msk = (TImport_msk&)field.mask();
|
TImport_msk& msk = (TImport_msk&)field.mask();
|
||||||
if (key == K_TAB && field.dirty() && field.full())
|
if (key == K_TAB && field.dirty() && field.full())
|
||||||
{
|
{
|
||||||
std::set<TString>& name_cats = categorie_doc().get_name_catdocs();
|
std::set<TString>& name_cats = cd.get_name_catdocs();
|
||||||
|
|
||||||
const bool ok = name_cats.find(field.get()) != name_cats.end();
|
const bool ok = name_cats.find(field.get()) != name_cats.end();
|
||||||
if (!ok)
|
if (!ok)
|
||||||
@ -159,10 +160,9 @@ bool TImport_msk::catannpadre_handler(TMask_field& field, KEY key)
|
|||||||
}
|
}
|
||||||
if (key == K_F9)
|
if (key == K_F9)
|
||||||
{
|
{
|
||||||
field.set(msk.select_catdoc());
|
field.set(select_catdoc());
|
||||||
msk.set(F_CATDOCANN, "");
|
msk.set(F_CATDOCANN, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,10 +174,9 @@ bool TImport_msk::ok_handler(TMask_field& field, KEY key)
|
|||||||
|
|
||||||
const char* TImport_msk::select_catdoc()
|
const char* TImport_msk::select_catdoc()
|
||||||
{
|
{
|
||||||
if(_catdocs == nullptr)
|
auto catdocs = TCategorie_doc().get_sheet_catdocs();
|
||||||
_catdocs = categorie_doc().get_sheet_catdocs();
|
if (catdocs->run() == K_ENTER)
|
||||||
if (_catdocs->run() == K_ENTER)
|
return catdocs->row().get(0);
|
||||||
return _catdocs->row().get(0);
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,8 @@ void TF9_test_app::main_loop()
|
|||||||
//TEstrazione::fill_id(clifo, statopaiv, idfisc, paiv, codfisc);
|
//TEstrazione::fill_id(clifo, statopaiv, idfisc, paiv, codfisc);
|
||||||
|
|
||||||
TCategorie_doc::annesso annesso;
|
TCategorie_doc::annesso annesso;
|
||||||
if(categorie_doc().get_ann("INTREVC", annesso))
|
TCategorie_doc categorie_doc;
|
||||||
|
if(categorie_doc.get_ann("INTREVC", annesso))
|
||||||
TEstrazione::make_prosp_int_revc(153480, annesso);
|
TEstrazione::make_prosp_int_revc(153480, annesso);
|
||||||
|
|
||||||
TString s = TEstrai_mask::get_numdoc_exp_fp(105396);
|
TString s = TEstrai_mask::get_numdoc_exp_fp(105396);
|
||||||
|
@ -220,14 +220,6 @@ public:
|
|||||||
TRecord_categorie(type table = catdocs);
|
TRecord_categorie(type table = catdocs);
|
||||||
};
|
};
|
||||||
|
|
||||||
inline TCategorie_doc& categorie_doc()
|
|
||||||
{
|
|
||||||
static unique_ptr<TCategorie_doc> cd = nullptr;
|
|
||||||
if (cd == nullptr)
|
|
||||||
cd = make_unique<TCategorie_doc>();
|
|
||||||
return *cd;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct movimento_t
|
struct movimento_t
|
||||||
{
|
{
|
||||||
enum err_mov
|
enum err_mov
|
||||||
@ -330,13 +322,13 @@ struct movimento_t
|
|||||||
|
|
||||||
class TEstrazione : public TObject
|
class TEstrazione : public TObject
|
||||||
{
|
{
|
||||||
drd _head;
|
drd _head;
|
||||||
vector<movimento_t> _movs;
|
vector<movimento_t> _movs;
|
||||||
ofstream* _error_sql;
|
unique_ptr<ofstream> _error_sql;
|
||||||
bool _escluso;
|
bool _escluso;
|
||||||
const TString _descr;
|
const TString _descr;
|
||||||
bool _has_cartacei;
|
bool _has_cartacei;
|
||||||
TFilename _spotlite_path;
|
TFilename _spotlite_path;
|
||||||
|
|
||||||
/** Aggiorna stato estrazione. Utilizzato ad esempio dopo la diagnostica per riportare
|
/** Aggiorna stato estrazione. Utilizzato ad esempio dopo la diagnostica per riportare
|
||||||
* il nuovo stato sul db.
|
* il nuovo stato sul db.
|
||||||
@ -388,6 +380,8 @@ private:
|
|||||||
static bool pura_iva(const TLocalisamfile& mov);
|
static bool pura_iva(const TLocalisamfile& mov);
|
||||||
void write_errorsql_log(const TString& query) const;
|
void write_errorsql_log(const TString& query) const;
|
||||||
|
|
||||||
|
static TCategorie_doc& categorie_doc(bool reload = false);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void add_mov(const movimento_t& movimento);
|
void add_mov(const movimento_t& movimento);
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "mov.h"
|
#include "mov.h"
|
||||||
#include "../fp/fplib.h"
|
#include "../fp/fplib.h"
|
||||||
#include "annessif9.h"
|
#include "annessif9.h"
|
||||||
#include "modaut.h"
|
|
||||||
#include "dongle.h"
|
#include "dongle.h"
|
||||||
#include "execp.h"
|
#include "execp.h"
|
||||||
|
|
||||||
@ -61,8 +60,7 @@ void TEstrazione::check_annessi(movimento_t& mov_i, const int numreg)
|
|||||||
bool TEstrazione::check_annessi_oblig(const TString& catdoc, const int numreg, _Out_ TToken_string& ann_nexist)
|
bool TEstrazione::check_annessi_oblig(const TString& catdoc, const int numreg, _Out_ TToken_string& ann_nexist)
|
||||||
{
|
{
|
||||||
ann_nexist.destroy(-1);
|
ann_nexist.destroy(-1);
|
||||||
TCategorie_doc categorie;
|
const TString_array lista_cat_annessi = categorie_doc().get_array_ann(catdoc); // Lista cat annessi
|
||||||
const TString_array lista_cat_annessi = categorie.get_array_ann(catdoc); // Lista cat annessi
|
|
||||||
TF9_doccart file_cart;
|
TF9_doccart file_cart;
|
||||||
std::vector<annesso_t> list_file_ann; // Lista file annessi
|
std::vector<annesso_t> list_file_ann; // Lista file annessi
|
||||||
file_cart.mov2listann_vect(TString() << numreg, list_file_ann);
|
file_cart.mov2listann_vect(TString() << numreg, list_file_ann);
|
||||||
@ -70,7 +68,7 @@ bool TEstrazione::check_annessi_oblig(const TString& catdoc, const int numreg, _
|
|||||||
FOR_EACH_ARRAY_ITEM(lista_cat_annessi, nr, ann)
|
FOR_EACH_ARRAY_ITEM(lista_cat_annessi, nr, ann)
|
||||||
{
|
{
|
||||||
TCategorie_doc::annesso annesso;
|
TCategorie_doc::annesso annesso;
|
||||||
const bool ok_cat = categorie.get_ann(*(TToken_string*)ann, annesso);
|
const bool ok_cat = categorie_doc().get_ann(*(TToken_string*)ann, annesso);
|
||||||
// Ignoro il flag obbligatorio per il prospetto di reverse charge
|
// Ignoro il flag obbligatorio per il prospetto di reverse charge
|
||||||
if (ok_cat && annesso.obblig && annesso.opcee != "RC")
|
if (ok_cat && annesso.obblig && annesso.opcee != "RC")
|
||||||
{
|
{
|
||||||
@ -586,6 +584,15 @@ void TEstrazione::write_errorsql_log(const TString& query) const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TCategorie_doc& TEstrazione::categorie_doc(const bool reload)
|
||||||
|
{
|
||||||
|
static TCategorie_doc* _doc_cats = nullptr;
|
||||||
|
if (_doc_cats == nullptr)
|
||||||
|
_doc_cats = new TCategorie_doc();
|
||||||
|
else if (reload)
|
||||||
|
_doc_cats->reload();
|
||||||
|
return *_doc_cats;
|
||||||
|
}
|
||||||
|
|
||||||
// Public methods /////////////////////////////////////////////////////////////////////////////////////////////
|
// Public methods /////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -615,6 +622,7 @@ bool TEstrazione::update_drd_stato_estr() const
|
|||||||
|
|
||||||
const char* TEstrazione::diagnostica_mov()
|
const char* TEstrazione::diagnostica_mov()
|
||||||
{
|
{
|
||||||
|
categorie_doc(true);
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
const TipoIVA tipo = get_tipoiva();
|
const TipoIVA tipo = get_tipoiva();
|
||||||
_stats.total = _movs.size();
|
_stats.total = _movs.size();
|
||||||
@ -995,12 +1003,11 @@ bool TEstrazione::estrazione_iva(bool escluso)
|
|||||||
if(!it->annessi.empty())
|
if(!it->annessi.empty())
|
||||||
{
|
{
|
||||||
vector<annesso_t>& ann = it->annessi;
|
vector<annesso_t>& ann = it->annessi;
|
||||||
TCategorie_doc cd;
|
size_t i = 0;
|
||||||
size_t i = 0;
|
const size_t size = ann.size();
|
||||||
size_t size = ann.size();
|
|
||||||
iva_query.add(IVA_CLASAN1, ann[i].catdocann, 10);
|
iva_query.add(IVA_CLASAN1, ann[i].catdocann, 10);
|
||||||
iva_query.add(IVA_NOMF1, ann[i++].filename, 100);
|
iva_query.add(IVA_NOMF1, ann[i++].filename, 100);
|
||||||
// HOW DID MY LIFE COME TO THIS?....
|
// HOW DID MY LIFE COME TO THIS?...
|
||||||
if (size > i)
|
if (size > i)
|
||||||
{
|
{
|
||||||
iva_query.add(IVA_CLASAN2, ann[i].catdocann, 10);
|
iva_query.add(IVA_CLASAN2, ann[i].catdocann, 10);
|
||||||
@ -1115,7 +1122,7 @@ TEstrazione::TEstrazione(const TString& ambiente, const bool flag_prov, const ch
|
|||||||
_head.addr_cart = addrcart;
|
_head.addr_cart = addrcart;
|
||||||
|
|
||||||
_escluso = escluso;
|
_escluso = escluso;
|
||||||
_error_sql = new ofstream;
|
_error_sql = make_unique<ofstream>();
|
||||||
_error_sql->open("f9_TEstrazione_error_sql.txt");
|
_error_sql->open("f9_TEstrazione_error_sql.txt");
|
||||||
|
|
||||||
// Svuoto log.
|
// Svuoto log.
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#ifndef __ANNESSIF9_H_
|
#ifndef __ANNESSIF9_H_
|
||||||
#define __ANNESSIF9_H_
|
#define __ANNESSIF9_H_
|
||||||
|
|
||||||
#define F9A_NUMREG "NUMREG"
|
#define F9A_NUMREG "NUMREG"
|
||||||
#define F9A_FILENAME "FILENAME"
|
#define F9A_FILENAME "FILENAME"
|
||||||
#define F9A_CATDOCPAD "CATDOCPAD"
|
#define F9A_CATDOCPAD "CATDOCPAD"
|
||||||
#define F9A_CATDOCANN "CATDOCANN"
|
#define F9A_CATDOCANN "CATDOCANN"
|
||||||
#define F9A_LOADDATE "LOADDATE"
|
#define F9A_LOADDATE "LOADDATE"
|
||||||
#define F9A_USER "USER"
|
#define F9A_USER "USER"
|
||||||
|
|
||||||
#endif // __ANNESSIF9_H_
|
#endif // __ANNESSIF9_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user