Merge branch 'R_10_00' of http://10.65.20.17:7990/scm/campo/campo into R_10_00

This commit is contained in:
Sirio Builder 2018-07-31 17:24:13 +02:00
commit e759597072
17 changed files with 1781 additions and 3493 deletions

View File

@ -97,13 +97,6 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\debug/tf0.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe" sign /a /s MY /n "Sirio Informatica e Sistemi SPA" /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v "$(TargetPath)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
@ -147,13 +140,6 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\..\release/tf0.bsc</OutputFile>
</Bscmake>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe" sign /a /s MY /n "Sirio Informatica e Sistemi SPA" /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v "$(TargetPath)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuildStep Include="..\LIB\AgaLib.lib">
@ -196,19 +182,18 @@
<ClCompile Include="..\src\fe\felib.cpp" />
<ClCompile Include="..\src\fp\fp0.cpp" />
<ClCompile Include="..\src\fp\fp0100.cpp" />
<ClCompile Include="..\src\fp\fp0200.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\src\fp\fp0300.cpp" />
<ClCompile Include="..\src\tf\tfutility.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\fp\fp0.h" />
<ClInclude Include="..\src\fp\fp0100a.h" />
<ClInclude Include="..\src\fp\fp0200a.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\src\fp\fp0200a.h" />
<ClInclude Include="..\src\fp\fp0200b.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\src\fp\fp0300a.h" />
<ClInclude Include="..\src\tf\tfutility.h" />

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{72a9ea2f-8fbe-4546-96f3-21a4de35bf0e}</UniqueIdentifier>
</Filter>
<Filter Include="Sources">
<UniqueIdentifier>{afa0f493-bfe6-4bd2-add2-3256306ed9c5}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\src\fp\fplib01.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\fp\fplib01.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,8 +0,0 @@
fp0.exe
fp0100a.msk
fp0300a.msk
- Aggiunto filtro codice numerazione
- Sistemata configurazione per gestione allegati
- Aggiunto esportazione documento come pdf nell'xml
- Aggiunta funzione che gestisce gli allegati

View File

@ -1,21 +0,0 @@
[Main]
Demo=0
[fp1]
File(0) = fp0.exe|X
File(1) = fp0100a.msk|X
File(3) = fp0300a.msk|X
Patch = 0614
Versione = 21511200
[fp]
Data = 31-07-2018
Descrizione = Fattura Elettronica
Dischi = 1
Moduli = cg,ve
OEM =
Patch = 614
PostProcess =
PreProcess =
Versione = 21511200

Binary file not shown.

View File

@ -1,5 +0,0 @@
ve1.exe
cg0200a.msk
cg0.exe
Aggiunta nuova stampa che salva su file la fattura senza anteprima per fatturazione elettronica

View File

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

Binary file not shown.

View File

@ -14,6 +14,8 @@
class TParametri_mask : public TAutomask
{
private:
void load_all();
protected:
void tipi_import();
static TMask& get_tmp_msk(const char* title);
@ -22,18 +24,38 @@ protected:
public:
TParametri_mask(const char* n);
void save_all() const;
};
TParametri_mask::TParametri_mask(const char * n) : TAutomask(n)
{
load_all();
}
void TParametri_mask::save_all() const
{
ini_set_string(CONFIG_DITTA, "fp", "ip", get(F_INDIRIZZO));
ini_set_string(CONFIG_DITTA, "fp", "db", get(F_DATABASE));
ini_set_string(CONFIG_DITTA, "fp", "usr", get(F_USER));
ini_set_string(CONFIG_DITTA, "fp", "psw", encode(get(F_PASSWORD)));
ini_set_string(CONFIG_DITTA, "fp", "flddest", get(F_FLDDEST));
ini_set_string(CONFIG_DITTA, "fp", "fldusrdest", get(F_FLDUSRDEST));
ini_set_string(CONFIG_DITTA, "fp", "cofitras", get(F_COFI));
ini_set_bool(CONFIG_DITTA, "fp", "gestioneallegati", get(F_ESPORTAALLEG));
ini_set_bool(CONFIG_DITTA, "fp", "allegafatt", get(F_ESPORTADOC));
}
void TParametri_mask::load_all()
{
set(F_INDIRIZZO, ini_get_string(CONFIG_DITTA, "fp", "ip"));
set(F_DATABASE, ini_get_string(CONFIG_DITTA, "fp", "db"));
set(F_USER, ini_get_string(CONFIG_DITTA, "fp", "usr"));
set(F_PASSWORD, decode(ini_get_string(CONFIG_DITTA, "fp", "psw") ));
set(F_PASSWORD, decode(ini_get_string(CONFIG_DITTA, "fp", "psw")));
set(F_FLDDEST, ini_get_string(CONFIG_DITTA, "fp", "flddest"));
set(F_FLDUSRDEST, ini_get_string(CONFIG_DITTA, "fp", "fldusrdest"));
set(F_COFI, ini_get_string(CONFIG_DITTA, "fp", "cofitras"));
set(F_ESPORTAALLEG, ini_get_bool(CONFIG_DITTA, "fp", "gestioneallegati"));
set(F_ESPORTADOC, ini_get_bool(CONFIG_DITTA, "fp", "allegafatt"));
}
void TParametri_mask::tipi_import()
@ -173,6 +195,20 @@ bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jo
}
}
break;
case F_ESPORTAALLEG:
{
const bool esporta = get_bool(F_ESPORTAALLEG);
field(F_FLDDEST).check_type(esporta ? CHECK_REQUIRED : CHECK_NONE);
field(F_FLDUSRDEST).check_type(esporta ? CHECK_REQUIRED : CHECK_NONE);
field(F_ESPORTADOC).enable(esporta);
if (e == fe_modify && !esporta)
{
set(F_FLDDEST, "");
set(F_FLDUSRDEST, "");
set(F_ESPORTADOC, "");
}
}
break;
default:
break;
}
@ -210,13 +246,7 @@ void TParametri_ditta::main_loop()
SSimple_query s(ad, usr, psw, TSDB_MSSQL);
if (s.sq_is_connect())
{
ini_set_string(CONFIG_DITTA, "fp", "ip", ip);
ini_set_string(CONFIG_DITTA, "fp", "db", db);
ini_set_string(CONFIG_DITTA, "fp", "usr", usr);
ini_set_string(CONFIG_DITTA, "fp", "psw", encode(psw));
ini_set_string(CONFIG_DITTA, "fp", "flddest", pm.get(F_FLDDEST));
ini_set_string(CONFIG_DITTA, "fp", "fldusrdest", pm.get(F_FLDUSRDEST));
pm.save_all();
message_box("Dati salvati correttamente!");
}
else

View File

@ -4,6 +4,9 @@
#define F_PASSWORD 104
#define F_FLDDEST 105
#define F_FLDUSRDEST 106
#define F_COFI 107
#define F_ESPORTAALLEG 108
#define F_ESPORTADOC 109
#define F_SETPATCH 201
#define F_ENPTYTABLE 202

View File

@ -3,17 +3,21 @@
TOOLBAR "topbar" 0 0 0 2
#include <stdbar.h>
/*
BUTTON DLG_ELABORA 2 2
BEGIN
PROMPT 1 1 "Imp. Tipi Doc"
PICTURE TOOL_ELABORA
FLAGS "HD"
END
*/
ENDPAGE
PAGE "Configurazione FP" 0 2 0 0
GROUPBOX DLG_NULL 78 10
GROUPBOX DLG_NULL 78 8
BEGIN
PROMPT 1 1 "@BDatabase"
END
@ -47,19 +51,44 @@ BEGIN
CHECKTYPE REQUIRED
END
GROUPBOX DLG_NULL 78 3
BEGIN
PROMPT 1 7 "@BTrasmittente"
END
STRING F_COFI 16
BEGIN
PROMPT 2 8 "Codice fiscale trasmittente "
CHECKTYPE REQUIRED
END
GROUPBOX DLG_NULL 78 6
BEGIN
PROMPT 1 10 "@BConfigurazione Allegati"
END
BOOLEAN F_ESPORTAALLEG
BEGIN
PROMPT 2 11 "Abilita esportazione allegati"
END
BOOLEAN F_ESPORTADOC
BEGIN
PROMPT 2 12 "Allega pdf documento nell'XML"
FLAGS "D"
END
STRING F_FLDDEST 300 50
BEGIN
PROMPT 2 6 "Destinazione Server "
CHECKTYPE REQUIRED
FLAGS "M"
PROMPT 2 13 "Destinazione Server "
FLAGS ""
END
STRING F_FLDUSRDEST 300 50
BEGIN
PROMPT 2 7 "Destinazione User "
PROMPT 2 14 "Destinazione User "
DSELECT
CHECKTYPE REQUIRED
FLAGS "M"
FLAGS ""
END
ENDPAGE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,10 @@
#define F_DATAINI 301
#define F_DATAEND 302
#define F_FATTSEL 303
#define F_COFI 304
#define F_DACODNUM 304
#define F_DATIPODOC 305
#define F_ATIPODOC 306
#define F_ACODNUM 306
#define F_ATIPODOC 307
#define END_MASK 399
#define F_DOCS 201

View File

@ -21,7 +21,7 @@ BEGIN
CHECKTYPE REQUIRED
END
RADIOBUTTON F_FATTSEL 25
RADIOBUTTON F_FATTSEL 100
BEGIN
PROMPT 1 1 "Fatture da visualizzare"
ITEM "|Da inviare"
@ -30,17 +30,28 @@ BEGIN
ITEM "X|XML Generato"
ITEM "E|In errore"
ITEM "N|Accettate"
FLAGS "Z"
END
STRING F_COFI 16
STRING F_DACODNUM 4
BEGIN
PROMPT 30 1 "Codice fiscale trasmittente "
CHECKTYPE REQUIRED
PROMPT 1 4 "Da Numerazione"
FIELD CODNUM
HELP "Codice numerazione"
USE %NUM
INPUT CODTAB F_DACODNUM
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_DACODNUM CODTAB
CHECKTYPE FORCED
FLAG "UPA"
WARNING "Numerazione assente"
KEY 1 2
END
STRING F_DATIPODOC 4
BEGIN
PROMPT 30 2 "Da tipo doc "
PROMPT 30 4 "Da tipo doc "
FIELD TIPODOC
HELP "Codice tipo documento"
USE %TIP
@ -54,9 +65,25 @@ BEGIN
FLAG "UP"
END
STRING F_ACODNUM 4
BEGIN
PROMPT 1 5 "A Numerazione "
FIELD CODNUM
HELP "Codice numerazione"
USE %NUM
INPUT CODTAB F_ACODNUM
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_ACODNUM CODTAB
CHECKTYPE FORCED
FLAG "UPA"
WARNING "Numerazione assente"
KEY 1 2
END
STRING F_ATIPODOC 4
BEGIN
PROMPT 30 3 "A tipo doc "
PROMPT 30 5 "A tipo doc "
FIELD TIPODOC
HELP "Codice tipo documento"
USE %TIP

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,125 @@
#include <utility.h>
#include <config.h>
#include "../ve/velib05.h"
#include "../fe/felib.h"
#include <reputils.h>
#include <vector>
#define SQL_FLD "sql/"
// Ritorna la connessione al DB paf secondo i parametri impostati nel programma di configurazione
SSimple_query& db();
// Controlla il livello di patch installato e aggiorna le tabelle se necessario
bool check_tables();
// Genera la chiave per i paf
bool chiave_paf(const TDocumento& doc, TString& hfatt, TString& bfatt);
bool chiave_paf(const TRectype& doc, TString& hfatt, TString& bfatt);
// Contenitore di campi di un record di database MSSQLServer
class TPaf_record : public TObject
{
TString8 _table;
TToken_string _key;
TAssoc_array _fields;
protected:
void copy(const TPaf_record& rec)
{
_table = rec._table;
_key = rec._key;
_fields = rec._fields;
}
const TString& var2str(const TString& fld, const TVariant& var) const;
const TVariant& get(const char* fld) const;
public:
void reset() { _fields.destroy(); }
void set(const char* fld, const TVariant& var);
void set(const char* fld, long var);
void set(const char* fld, const char* var);
void set(const char* fld, const real& var);
void set(const char* fld, const TString& var);
void set(const char* fld, const TDate& var);
void set(const char* fld, bool var);
const TString sq_get(const char* fld) const;
TString& insert_string();
bool insert();
TString& remove_string();
bool remove();
bool search();
bool search(const char* k1, const char* k2, const char* k3 = NULL);
virtual TObject* dup() const { return new TPaf_record(*this); }
virtual bool ok() const { return _table.not_empty(); }
TPaf_record& operator=(const TPaf_record& rec)
{
copy(rec);
return *this;
}
TPaf_record(const TPaf_record& rec) { copy(rec); }
TPaf_record(const char* table);
};
// Gestione PAF
class TDoc_fp
{
private:
TAnagrafica _ditta;
TString16 _cofi;
TFilename _dbname;
TLog_report* _log;
TString _logpaf;
bool _gestioneallegati;
bool _allegafattura;
TString _def_fld;
TString _def_usr_fld;
bool _to_commit;
bool _cache_insert;
vector<TString> _query;
int parse_line(const TString& line, TString& var, TString& val) const;
bool create_table(TScanner& paf, const TString& table);
const TRectype* find_parent_row(const TRectype& rdoc) const;
int find_ancestors(const TRiga_documento& rdoc, TArray& ancestors) const;
bool insert(TPaf_record& p);
bool remove(TPaf_record& p);
bool save_paf();
protected:
bool parse_sconto(const TString& formula, TToken_string& sconti) const;
static bool get_bnp_iban(const TString& abi, const TString& cab, int prg, TString& iban);
bool get_bank(const TDocumento& doc, TString& iban, TString& abi, TString& cab, TString& istituto) const;
const char* descrizione(const TRiga_documento& rdoc) const;
const TRectype& cco(const TRectype& doc) const; // Contratto/Convenzione/Offerta
void log(int severity, const char* msg);
const char* natura(const TString& codiva) const;
static void set_IVA(const TString& codiva, TPaf_record& paf);
static void set_IVA(const TRiga_documento& rdoc, TPaf_record& paf);
bool add_row_art(const TString codice_tipo, const TString& codice_valore, TPaf_record& paf);
bool add_row_alleg(TFilename& file, long& nprogr, TPaf_record& paf);
public:
bool doc_to_paf(TDocumentoEsteso& doc);
bool doc_to_paf(const TRectype& rec);
bool doc_to_paf(const TDoc_key& key);
bool doc_to_paf(const TFilename& ini);
// Mostra il log a fine esecuzione
bool show_log();
const int commit();
void set_cache_insert(const bool v) { _cache_insert = v; }
TDoc_fp();
~TDoc_fp();
};
#endif // __FPLIB01_H