Patch level :12.00 1350
Files correlati : ve0.exe Commento: Aggiunta regitrazione di preventivo all'esportazione sintetica in excel
This commit is contained in:
parent
eb688d517c
commit
e41b4ba5df
@ -2004,24 +2004,17 @@ class TCSV_rendiconto_ca_recordset : public TCSV_recordset
|
||||
TString4 _contsep;
|
||||
|
||||
public: //da libreria
|
||||
virtual const TVariant& get(unsigned int column_name) const;
|
||||
virtual const TVariant& get_var(const char* name) const override;
|
||||
|
||||
TCSV_rendiconto_ca_recordset(const TString& contsep) : TCSV_recordset("CSV(\"\t\")"), _contsep(contsep) {}
|
||||
~TCSV_rendiconto_ca_recordset() {}
|
||||
};
|
||||
|
||||
const TVariant& TCSV_rendiconto_ca_recordset::get(unsigned int column_name) const
|
||||
const TVariant& TCSV_rendiconto_ca_recordset::get_var(const char* name) const
|
||||
{
|
||||
|
||||
if (column_name == 100)
|
||||
{
|
||||
const TString fld(column_name);
|
||||
|
||||
if (fld == "#CONTSEP")
|
||||
if (strcmp(name, "#CONTSEP") == 0)
|
||||
return get_tmp_var() = _contsep;
|
||||
|
||||
}
|
||||
return TCSV_recordset::get(column_name);
|
||||
TCSV_recordset::get_var(name);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
@ -2031,12 +2024,12 @@ class TPrint_rendiconto_ca_rep : public TAnal_report
|
||||
{
|
||||
|
||||
protected:
|
||||
virtual bool set_recordset(const TString& sql);
|
||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||
virtual void set_dbase_fixed_fields(bool on = true);
|
||||
virtual bool set_recordset(const TString& sql) override;
|
||||
virtual bool get_usr_val(const TString& name, TVariant& var) const override;
|
||||
virtual void set_dbase_fixed_fields(bool on = true) override;
|
||||
|
||||
public:
|
||||
virtual const char * get_excel_disabled_field() { return "H0.201|H0.202|H0.203|H0.204|H0.205|H0.206|H0.207"; }
|
||||
virtual const char * get_excel_disabled_field() override { return "H0.201|H0.202|H0.203|H0.204|H0.205|H0.206|H0.207"; }
|
||||
void set_filter(const TPrint_rendiconto_ca_mask& msk, int cms_row, const int recset_key, TLog_report& log);
|
||||
};
|
||||
|
||||
@ -2177,7 +2170,7 @@ void TPrint_rendiconto_ca::incrementa(TToken_string& riga, const int col, const
|
||||
void TPrint_rendiconto_ca::esporta_csv_row(ostream& file_to_date, const int first_level, const TString& cod_cms_cdc,
|
||||
const real importi[5][4], real importi_totali[5][4])
|
||||
{
|
||||
const int posizione_importi = first_level == LF_COMMESSE ? 5 : 2;
|
||||
const int posizione_importi = first_level == LF_COMMESSE ? 6 : 2;
|
||||
//crea una token string su cui mettere i valori dei record letti dal file .dbf
|
||||
TToken_string riga(512, '\t');
|
||||
|
||||
@ -2193,6 +2186,7 @@ void TPrint_rendiconto_ca::esporta_csv_row(ostream& file_to_date, const int firs
|
||||
riga.add(rec.get(COMMESSE_DATAINIZIO));
|
||||
riga.add(rec.get(COMMESSE_DATAFINE));
|
||||
riga.add(rec.get(COMMESSE_DATAPROR));
|
||||
riga.add(rec.get(COMMESSE_RIFER));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2641,7 +2635,7 @@ void TPrint_rendiconto_ca::execute_print(TReport_book & book, TAutomask & mask,
|
||||
|
||||
ofstream file_to_date(datefilename);
|
||||
|
||||
const int posizione_importi = first_level == LF_COMMESSE ? 5 : 2;
|
||||
const int posizione_importi = first_level == LF_COMMESSE ? 6 : 2;
|
||||
|
||||
//intestazione primaria
|
||||
TToken_string intestazione_1(512, '\t');
|
||||
@ -2653,6 +2647,7 @@ void TPrint_rendiconto_ca::execute_print(TReport_book & book, TAutomask & mask,
|
||||
intestazione_1.add("Data inizio");
|
||||
intestazione_1.add("Data fine");
|
||||
intestazione_1.add("Data proroga");
|
||||
intestazione_1.add("Reg.preventivo");
|
||||
recset_key = 2; //chiave del recordset per commessa
|
||||
}
|
||||
else //cdc-commessa
|
||||
@ -2807,9 +2802,14 @@ void TPrint_rendiconto_ca::execute_print(TReport_book & book, TAutomask & mask,
|
||||
TCSV_rendiconto_ca_recordset * xls_dest = new TCSV_rendiconto_ca_recordset(mask.get(F_CONTSEP));
|
||||
TString val;
|
||||
|
||||
xls_dest->set_var("#CONTSEP", mask.get(F_CONTSEP));
|
||||
xls_source.load_file(printfilename);
|
||||
int codes = anno == 0 ? (datafin.ok() ? datafin.year() : dataini.year()) : anno;
|
||||
|
||||
const TEsercizio & e = esc.esercizio(anno == 0 ? (datafin.ok() ? datafin.year() : dataini.year()) : anno);
|
||||
if (anno == 0)
|
||||
codes = today.year();
|
||||
|
||||
const TEsercizio & e = esc.esercizio(codes);
|
||||
const int ncols = xls_source.columns();
|
||||
|
||||
for (bool ok = xls_source.move_first(); ok; ok = xls_source.move_next())
|
||||
|
@ -25,6 +25,7 @@
|
||||
<field x="47.5" y="5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Data Inizio" />
|
||||
<field x="59" y="5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Data Fine" />
|
||||
<field x="71" y="5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Data Proroga" />
|
||||
<field x="81" y="5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Reg.Preventivo" />
|
||||
<field border="1" x="1" y="6.25" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="193" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||
<field x="1" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="121" pattern="1" hide_zero="" text="Commessa" />
|
||||
<field x="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="201" pattern="1" hide_zero="" text="">
|
||||
@ -39,14 +40,14 @@
|
||||
<field x="82" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="204" pattern="1" hide_zero="" text="">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="167.5" y="1.25" deactivated="" type="Testo" valign="center" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="205" pattern="1" hide_zero="" text="Contabilit&#E0; separata">
|
||||
<field x="166" y="1.25" deactivated="" type="Testo" valign="center" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="205" pattern="1" hide_zero="" text="Contabilit&#E0; separata">
|
||||
<font face="Arial" size="10" />
|
||||
<modules>NP</modules>
|
||||
</field>
|
||||
<field x="188.5" y="1.25" deactivated="" type="Stringa" valign="center" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="206" pattern="1" hide_zero="" text="">
|
||||
<font face="Courier New" size="10" />
|
||||
<font face="Arial" size="10" />
|
||||
<modules>NP</modules>
|
||||
<source>100</source>
|
||||
<source>#CONTSEP</source>
|
||||
</field>
|
||||
<field x="186" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="207" pattern="1" hide_zero="" text="Pag.">
|
||||
<font italic="1" face="Arial Narrow" size="7" />
|
||||
@ -75,59 +76,59 @@ SHOW
|
||||
THEN</postscript>
|
||||
</field>
|
||||
<field x="48" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>M</source>
|
||||
<source>N</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
|
||||
</field>
|
||||
<field x="58.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>N</source>
|
||||
<source>O</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.104</postscript>
|
||||
</field>
|
||||
<field x="69" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>O</source>
|
||||
<source>P</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.106</postscript>
|
||||
</field>
|
||||
<field x="80" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>P</source>
|
||||
<source>Q</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.108</postscript>
|
||||
</field>
|
||||
<field x="90" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>Q</source>
|
||||
<source>R</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.110</postscript>
|
||||
</field>
|
||||
<field x="100" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>R</source>
|
||||
<source>S</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.112</postscript>
|
||||
</field>
|
||||
<field x="110" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>T</source>
|
||||
<source>U</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.114</postscript>
|
||||
</field>
|
||||
<field x="121" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>F</source>
|
||||
<source>G</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
|
||||
</field>
|
||||
<field x="131.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>G</source>
|
||||
<source>H</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.103</postscript>
|
||||
</field>
|
||||
<field x="142" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>H</source>
|
||||
<source>I</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.105</postscript>
|
||||
</field>
|
||||
<field x="153" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>I</source>
|
||||
<source>J</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.107</postscript>
|
||||
</field>
|
||||
<field x="163" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>J</source>
|
||||
<source>K</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.109</postscript>
|
||||
</field>
|
||||
<field x="173" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>K</source>
|
||||
<source>L</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.111</postscript>
|
||||
</field>
|
||||
<field x="183" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>L</source>
|
||||
<source>M</source>
|
||||
<postscript description="B1.0 POSTSCRIPT">MESSAGE ADD,F1.113</postscript>
|
||||
</field>
|
||||
<field x="48" y="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
@ -139,6 +140,9 @@ THEN</postscript>
|
||||
<field x="69" y="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>E</source>
|
||||
</field>
|
||||
<field x="84" y="1" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||
<source>F</source>
|
||||
</field>
|
||||
<field x="12" deactivated="" type="Stringa" hidden="" link="" dynamic_height="1" shade_offset="" width="25" codval="" height="2" id="102" pattern="1" hide_zero="" text="">
|
||||
<source>B</source>
|
||||
</field>
|
||||
|
Loading…
x
Reference in New Issue
Block a user