diff --git a/src/ca/ca3700.cpp b/src/ca/ca3700.cpp
index 761aac31c..033130dd4 100755
--- a/src/ca/ca3700.cpp
+++ b/src/ca/ca3700.cpp
@@ -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")
- return get_tmp_var() = _contsep;
-
- }
- return TCSV_recordset::get(column_name);
+ if (strcmp(name, "#CONTSEP") == 0)
+ return get_tmp_var() = _contsep;
+ 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');
@@ -2192,7 +2185,8 @@ 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_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())
diff --git a/src/ca/ca3700b.rep b/src/ca/ca3700b.rep
index 6672e8773..ea2e639fb 100644
--- a/src/ca/ca3700b.rep
+++ b/src/ca/ca3700b.rep
@@ -25,6 +25,7 @@
+
@@ -39,14 +40,14 @@
#SYSTEM.DATE
-
+
NP
-
+
NP
- 100
+ #CONTSEP
@@ -75,59 +76,59 @@ SHOW
THEN
- M
+ N
MESSAGE ADD,F1.102
- N
+ O
MESSAGE ADD,F1.104
- O
+ P
MESSAGE ADD,F1.106
- P
+ Q
MESSAGE ADD,F1.108
- Q
+ R
MESSAGE ADD,F1.110
- R
+ S
MESSAGE ADD,F1.112
- T
+ U
MESSAGE ADD,F1.114
- F
+ G
MESSAGE ADD,F1.101
- G
+ H
MESSAGE ADD,F1.103
- H
+ I
MESSAGE ADD,F1.105
- I
+ J
MESSAGE ADD,F1.107
- J
+ K
MESSAGE ADD,F1.109
- K
+ L
MESSAGE ADD,F1.111
- L
+ M
MESSAGE ADD,F1.113
@@ -139,6 +140,9 @@ THEN
E
+
+ F
+
B