Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00

This commit is contained in:
Alessandro Bonazzi 2020-06-23 21:22:38 +02:00
commit 2e52af5fc6
14 changed files with 100 additions and 62 deletions

View File

@ -69,14 +69,13 @@
<ClCompile> <ClCompile>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\src\include;..\src\xvaga;..\src\xi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\src\include;..\src\xvaga;..\src\xi;..\src\xvtdb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
@ -129,9 +128,9 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -116,7 +116,7 @@
<ClCompile> <ClCompile>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>Default</InlineFunctionExpansion> <InlineFunctionExpansion>Default</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\src\xvtdb\;..\src\cg;..\src\include;..\src\xvaga;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\src\xvtdb\;..\src\cg;..\src\include;..\src\xvaga;..\src\f1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -232,6 +232,7 @@
</SqlCompiler> </SqlCompiler>
<SqlCompiler Include="..\src\f9\sql\f90104.sql"> <SqlCompiler Include="..\src\f9\sql\f90104.sql">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</SqlCompiler> </SqlCompiler>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

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

@ -0,0 +1,3 @@
ba8.exe
Corretta classe record sqlite: i datatype erano sempre sbagliati perche' presi dalla prima riga del set e quasi sempre i campi erano considerati real per i TVariant solitamente dovuto a un guessing di campi vuoti.

31
cd/test/ba0972a.ini Normal file
View File

@ -0,0 +1,31 @@
[Main]
Demo=0
[ba8]
File(503) = ba8.exe|X
Patch = 0972
Versione = 21511200
[ba99]
Kill(0) = batbsce.txt|x
Kill(1) = wxmsw240.dll|x
Kill(2) = bastcms.rep|x
Kill(3) = bastcms.msk|x
Kill(4) = bastfsc.msk|x
Kill(5) = bastfsc.rep|x
Kill(6) = bastuue.msk|x
Kill(7) = bastuue.rep|x
[ba]
Data = 23-06-2020
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 0972
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0972a1.zip Normal file

Binary file not shown.

View File

@ -1,12 +1,12 @@
f90200a.msk
f90.exe f90.exe
f90100a.msk f90100a.msk
f90100d.msk
fpmenu.men
f90100b.msk f90100b.msk
f90100c.msk f90100c.msk
f90100d.msk
f90200a.msk
f90300a.msk f90300a.msk
f90300b.msk f90300b.msk
fpmenu.men
f9prospintegr.rep f9prospintegr.rep
sql\f90\f90104.sql sql\f90\f90104.sql

View File

@ -3,21 +3,21 @@ Demo=0
[f90] [f90]
File(0) = f90.exe|X File(0) = f90.exe|X
File(1) = f90100a.msk|X File(2) = f90100a.msk|X
File(2) = f90100b.msk|X File(3) = f90100b.msk|X
File(3) = f90100c.msk|X File(4) = f90100c.msk|X
File(4) = f90100d.msk|X File(5) = f90100d.msk|X
File(5) = fpmenu.men|X File(6) = f90200a.msk|X
File(9) = f90200a.msk|X File(7) = f90300a.msk|X
File(10) = f90300a.msk|X File(8) = f90300b.msk|X
File(11) = f90300b.msk|X File(9) = f9prospintegr.rep|X
File(12) = f9prospintegr.rep|X File(10) = fpmenu.men|X
File(13) = sql\f90\f90104.sql|X File(13) = sql\f90\f90104.sql|X
Patch = 0968 Patch = 968
Versione = 21511200 Versione = 21511200
[f9] [f9]
Data = 17-06-2020 Data = 23-06-2020
Descrizione = Archiviazione Sostitutiva Descrizione = Archiviazione Sostitutiva
Dischi = 1 Dischi = 1
Moduli = fp,cg Moduli = fp,cg

Binary file not shown.

View File

@ -51,6 +51,7 @@ const TString& recset_get_string(const TRecordset& rec, const char* field, int
int recset_get_int(const TRecordset& rec, const char* field, int zero_filled = -1); int recset_get_int(const TRecordset& rec, const char* field, int zero_filled = -1);
bool recset_get_bool(const TRecordset& rec, const char* field); bool recset_get_bool(const TRecordset& rec, const char* field);
real recset_get_real(const TRecordset& rec, const char* field); real recset_get_real(const TRecordset& rec, const char* field);
TDate recset_get_date(const TRecordset& rec, const char* field);
TMask& descr_msk() TMask& descr_msk()
{ {
@ -113,7 +114,10 @@ real recset_get_real(const TRecordset& rec, const char* field)
return rec.get(rec.find_column(field)).as_real(); return rec.get(rec.find_column(field)).as_real();
} }
TDate recset_get_date(const TRecordset& rec, const char* field)
{
return rec.get(rec.find_column(field)).as_date();
}
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
@ -175,8 +179,8 @@ int TEstrai_mask::estrai()
movimento_t t; movimento_t t;
t.err = false; t.err = false;
t.numreg = recset_get_int(mov, MOV_NUMREG); t.numreg = recset_get_int(mov, MOV_NUMREG);
t.datareg = recset_get_string(mov, MOV_DATAREG); t.datareg = recset_get_date(mov, MOV_DATAREG);
t.datadoc = recset_get_string(mov, MOV_DATADOC); t.datadoc = recset_get_date(mov, MOV_DATADOC);
t.codcaus = recset_get_string(mov, MOV_CODCAUS, 3); t.codcaus = recset_get_string(mov, MOV_CODCAUS, 3);
t.meseliq = recset_get_int(mov, MOV_MESELIQ); t.meseliq = recset_get_int(mov, MOV_MESELIQ);
t.numdoc = recset_get_string(mov, MOV_NUMDOC); t.numdoc = recset_get_string(mov, MOV_NUMDOC);
@ -1210,13 +1214,15 @@ void TF9_app::open_esclusi()
m.add(movs.get_date(MOV_DATADOC)); m.add(movs.get_date(MOV_DATADOC));
m.add(movs.get(MOV_CODCAUS)); m.add(movs.get(MOV_CODCAUS));
m.add(movs.get(MOV_MESELIQ)); m.add(movs.get(MOV_MESELIQ));
m.add(movs.get(MOV_NUMDOC)); TString numdoc; numdoc << movs.get(MOV_NUMDOCEXT);
m.add(numdoc.full() ? numdoc : movs.get(MOV_NUMDOC));
const real imptot = movs.get_real(MOV_TOTDOC) + movs.get_real(MOV_RITFIS) + movs.get_real(MOV_RITSOC); const real imptot = movs.get_real(MOV_TOTDOC) + movs.get_real(MOV_RITFIS) + movs.get_real(MOV_RITSOC);
m.add(imptot); m.add(imptot);
m.add(movs.get_int(MOV_CODCF)); m.add(movs.get_int(MOV_CODCF));
TLocalisamfile clifo(LF_CLIFO); TLocalisamfile clifo(LF_CLIFO);
TString ragsoc; ragsoc = clifo.get(CLI_RAGSOC); clifo.put(CLI_TIPOCF, movs.get(MOV_TIPO));
m.add(ragsoc); clifo.put(CLI_CODCF, movs.get(MOV_CODCF));
m.add(clifo.read() == NOERR ? clifo.get(CLI_RAGSOC) : "");
m.add(TString(movs.get(MOV_REG)) << "/" << movs.get(MOV_PROTIVA)); m.add(TString(movs.get(MOV_REG)) << "/" << movs.get(MOV_PROTIVA));
m.add(movs.get(MOV_DESCR)); m.add(movs.get(MOV_DESCR));
f9_app()._esclusi_vect.insert(f9_app()._esclusi_vect.end(), m); f9_app()._esclusi_vect.insert(f9_app()._esclusi_vect.end(), m);

View File

@ -459,7 +459,9 @@ void TGestione_doc_cartacei_f9_msk::fill()
void TGestione_doc_cartacei_f9_msk::fill_annessi() void TGestione_doc_cartacei_f9_msk::fill_annessi()
{ {
std::set<TString> file_err; std::set<TString> file_err;
TSheet_field& sf = sfield(S_ANNESSI);
sf.hide();
sf.destroy();
TLocalisamfile ann(LF_F9ANNESSI); TLocalisamfile ann(LF_F9ANNESSI);
if(ann.first() == NOERR) if(ann.first() == NOERR)
{ {
@ -469,9 +471,6 @@ void TGestione_doc_cartacei_f9_msk::fill_annessi()
file_err.insert(namefile); file_err.insert(namefile);
TLocalisamfile mov(LF_MOV); TLocalisamfile mov(LF_MOV);
TSheet_field& sf = sfield(S_ANNESSI);
sf.hide();
sf.destroy();
do do
{ {
TToken_string& row = sf.row(-1); TToken_string& row = sf.row(-1);
@ -494,9 +493,9 @@ void TGestione_doc_cartacei_f9_msk::fill_annessi()
_list_ann.insert({ namefile, { numreg, namefile, ann.get(F9A_CATDOCPAD), ann.get(F9A_CATDOCANN), ann.get(F9C_LOADDATE), ann.get(F9C_USER) } }); _list_ann.insert({ namefile, { numreg, namefile, ann.get(F9A_CATDOCPAD), ann.get(F9A_CATDOCANN), ann.get(F9C_LOADDATE), ann.get(F9C_USER) } });
} while (ann.next() == NOERR); } while (ann.next() == NOERR);
}
sf.force_update(); sf.force_update();
sf.show(); sf.show();
}
if (!file_err.empty()) if (!file_err.empty())
{ {
@ -563,9 +562,11 @@ void TGestione_doc_cartacei_f9_msk::fill_docs()
_list_file.insert({ namefile, { namefile, files.get(F9C_LOADDATE), numreg, files.get(F9C_USER) } }); _list_file.insert({ namefile, { namefile, files.get(F9C_LOADDATE), numreg, files.get(F9C_USER) } });
} while (files.next() == NOERR); } while (files.next() == NOERR);
sf.force_update();
} }
sf.force_update();
sf.show(); sf.show();
if (!file_err.empty()) if (!file_err.empty())
{ {
int count = 0; int count = 0;

View File

@ -30,27 +30,34 @@
<field x="8" y="8" type="Testo" width="16" pattern="1" text="Codice Fiscale: "> <field x="8" y="8" type="Testo" width="16" pattern="1" text="Codice Fiscale: ">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field x="27" y="8" type="Stringa" width="28" pattern="1" text="@@#########"> <field x="27" y="8" type="Stringa" width="28" pattern="1">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>CODFISC</source> <source>CODFISC</source>
</field> </field>
<field x="8" y="9" type="Testo" width="16" pattern="1" text="Partita IVA:"> <field x="8" y="9" type="Testo" width="16" pattern="1" text="Partita IVA:">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field x="27" y="9" type="Stringa" width="28" pattern="1" text="@@#########"> <field x="27" y="9" type="Stringa" width="28" pattern="1">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>PARTIVA</source> <source>PARTIVA</source>
</field> </field>
<field x="25" y="13" type="Testo" align="center" width="70" height="2" pattern="1" text="PROSPETTO INTEGRATIVO ACQUISTO"> <field x="25" y="12" type="Testo" align="center" width="70" height="2" pattern="1" text="PROSPETTO INTEGRATIVO ACQUISTO">
<font face="Bookman Old Style" size="14" /> <font face="Bookman Old Style" size="14" />
</field> </field>
<field x="8" y="16" type="Testo" width="26" pattern="1" text="Riferimento documento del"> <field x="8" y="14" type="Testo" width="26" pattern="1" text="Riferimento documento del">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field x="34" y="16" type="Data" width="14" pattern="1"> <field x="34" y="14" type="Data" width="14" pattern="1">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>DATADOC</source> <source>DATADOC</source>
</field> </field>
<field x="49" y="14" type="Testo" width="3" pattern="1" text="n.">
<font face="Arial" size="10" />
</field>
<field x="52" y="14" type="Stringa" width="37" pattern="1">
<font face="Arial" size="10" />
<source>NDOC</source>
</field>
<field x="60" y="16" type="Testo" width="2" pattern="1" text="F"> <field x="60" y="16" type="Testo" width="2" pattern="1" text="F">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
@ -58,13 +65,6 @@
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>CODFORN</source> <source>CODFORN</source>
</field> </field>
<field x="8" y="17" type="Testo" width="3" pattern="1" text="n.">
<font face="Arial" size="10" />
</field>
<field x="11" y="17" type="Stringa" width="37" pattern="1">
<font face="Arial" size="10" />
<source>NDOC</source>
</field>
<field x="60" y="17" type="Stringa" width="40" pattern="1"> <field x="60" y="17" type="Stringa" width="40" pattern="1">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>RAGSOCFORN</source> <source>RAGSOCFORN</source>
@ -88,7 +88,7 @@
<field x="60" y="20" type="Testo" width="11" pattern="1" text="Partita IVA:"> <field x="60" y="20" type="Testo" width="11" pattern="1" text="Partita IVA:">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field x="72" y="20" type="Stringa" width="28" pattern="1" text="@@#########"> <field x="72" y="20" type="Stringa" width="28" pattern="1">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>PARTIVAFORN</source> <source>PARTIVAFORN</source>
</field> </field>
@ -148,10 +148,10 @@
<field x="45" y="29" type="Testo" align="center" width="20" pattern="1" text="IMPONIBILE"> <field x="45" y="29" type="Testo" align="center" width="20" pattern="1" text="IMPONIBILE">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field border="2" x="65" y="29" type="Linea" height="2" pattern="1" />
<field x="65" y="29" type="Testo" align="center" width="20" pattern="1" text="IMPOSTA"> <field x="65" y="29" type="Testo" align="center" width="20" pattern="1" text="IMPOSTA">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field border="2" x="65" y="29" type="Linea" height="2" pattern="1" />
<field x="27" y="30" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@"> <field x="27" y="30" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
<source>TOTALE</source> <source>TOTALE</source>
@ -171,14 +171,14 @@
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field border="2" x="36" y="34" type="Linea" pattern="1" /> <field border="2" x="36" y="34" type="Linea" pattern="1" />
<field border="2" x="45" y="34" type="Linea" pattern="1" />
<field x="45" y="34" type="Testo" align="center" width="20" pattern="1" text="VALORE IVA"> <field x="45" y="34" type="Testo" align="center" width="20" pattern="1" text="VALORE IVA">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field border="2" x="45" y="34" type="Linea" pattern="1" />
<field border="2" x="65" y="34" type="Linea" pattern="1" />
<field x="65" y="34" type="Testo" align="center" width="40" pattern="1" text="CONTO DI CONTROPARTITA"> <field x="65" y="34" type="Testo" align="center" width="40" pattern="1" text="CONTO DI CONTROPARTITA">
<font face="Arial" size="10" /> <font face="Arial" size="10" />
</field> </field>
<field border="2" x="65" y="34" type="Linea" pattern="1" />
</section> </section>
<section type="Head" level="1" pattern="1"> <section type="Head" level="1" pattern="1">
<prescript description="H1 PRESCRIPT">#ATTESTA @ <prescript description="H1 PRESCRIPT">#ATTESTA @

View File

@ -289,8 +289,6 @@ bool TEstrazione::is_integr_rev(const int numreg, _Out_ TString& numreg_rev_vend
{ {
movcoll = mov_rs.get(MOV_NUMREG).as_int(); movcoll = mov_rs.get(MOV_NUMREG).as_int();
curr.put(MOV_MOVCOLL, numreg); curr.put(MOV_MOVCOLL, numreg);
TLocalisamfile& f = TLocalisamfile(LF_MOV);
curr.rewrite(f);
break; break;
} }
} }

View File

@ -432,7 +432,7 @@ int TSQL_recordset::on_get_items(int argc, char** values, char** columns)
info->_width = 1; info->_width = 1;
info->_type = _alfafld; info->_type = _alfafld;
const char* fldtype = columns[argc+i]; /*const char* fldtype = columns[argc+i];
if (fldtype != NULL) if (fldtype != NULL)
{ {
if (xvt_str_same(fldtype, "DATE")) if (xvt_str_same(fldtype, "DATE"))
@ -449,7 +449,7 @@ int TSQL_recordset::on_get_items(int argc, char** values, char** columns)
info->_type = _memofld; info->_type = _memofld;
info->_width = 50; info->_width = 50;
} }
} }*/
_column.add(info); _column.add(info);
} }
} }
@ -471,9 +471,9 @@ int TSQL_recordset::on_get_items(int argc, char** values, char** columns)
{ {
info._type = _datefld; info._type = _datefld;
info._width = 10; info._width = 10;
} else }/* else
if (real::is_real(values[i])) if (real::is_real(values[i]))
info._type = _realfld; info._type = _realfld;*/
} }
} }
} }
@ -502,9 +502,9 @@ TRecnotype TSQL_recordset::items() const
{ {
TString sql; parsed_text(sql); TString sql; parsed_text(sql);
TPerformance_profiler prof("SQL query"); TPerformance_profiler prof("SQL query");
_TheDataBase.exec("PRAGMA show_datatypes=ON;", NULL, NULL); //_TheDataBase.exec("PRAGMA show_datatypes=ON;", NULL, NULL);
_TheDataBase.exec(sql, query_get_items, (TSQL_recordset*)this); _TheDataBase.exec(sql, query_get_items, (TSQL_recordset*)this);
_TheDataBase.exec("PRAGMA show_datatypes=OFF;", NULL, NULL); //_TheDataBase.exec("PRAGMA show_datatypes=OFF;", NULL, NULL);
} }
return _items; return _items;
} }
@ -634,4 +634,3 @@ TSQL_recordset::TSQL_recordset(const char* sql)
{ {
set(sql); set(sql);
} }

View File

@ -671,7 +671,7 @@ public:
void add(int n, int pos = -1); void add(int n, int pos = -1);
// @cmember Aggiunge un reale // @cmember Aggiunge un reale
void add(const real r, int pos = -1); void add(const real r, int pos = -1);
// @cmember Aggiunge un reale // @cmember Aggiunge una data
void add(const TDate d, int pos = -1); void add(const TDate d, int pos = -1);
// @cmember Aggiunge un booleano // @cmember Aggiunge un booleano
void add(bool on, int pos = -1) { add(on ? "X" : ""); } void add(bool on, int pos = -1) { add(on ? "X" : ""); }