Patch level : 10.0 no patch

Files correlati     : pd6342.exe
Ricompilazione Demo : [ ]
Commento            :


Saldi per commessa e conto Haiblliita


git-svn-id: svn://10.65.10.50/branches/R_10_00@21101 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2010-11-03 23:10:12 +00:00
parent 0101ff1bf1
commit 17851f127a

View File

@ -62,23 +62,28 @@ class TBilancio_recset : public TCSV_recordset
public: public:
TBit_array & tot_rows() { return _tot_rows;} TBit_array & tot_rows() { return _tot_rows;}
TBit_array & tot_gen() { return _tot_gen;} TBit_array & tot_gen() { return _tot_gen;}
virtual bool get_attr(int column, TAttributes & attr) const; virtual bool get_attr(int column, TAttributes & attr, bool header = false) const;
TBilancio_recset(const TMask & m); TBilancio_recset(const TMask & m);
}; };
bool TBilancio_recset::get_attr(int column, TAttributes & attr) const bool TBilancio_recset::get_attr(int column, TAttributes & attr, bool header) const
{ {
const TRecnotype rowno = current_row(); const TRecnotype rowno = current_row();
if (rowno == 0L && column > 1) if ((rowno == 0L || header))
{ {
if ((unsigned int) column >= columns() - 1) if (column > 1)
attr.set_background(COLOR_RED); {
if ((unsigned int) column >= columns() - 1)
attr.set_background(COLOR_RED);
else
attr.set_background(header_back[_group[column - 2] % 6]);
attr.set_foreground(COLOR_WHITE);
return true;
}
else else
attr.set_background(header_back[_group[column - 2] % 6]); return false;
attr.set_foreground(COLOR_WHITE);
return true;
} }
else else
if (_tot_rows[rowno] || _tot_rows_ind[rowno]) if (_tot_rows[rowno] || _tot_rows_ind[rowno])
@ -184,6 +189,7 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n")
} }
_group[i] = group; _group[i] = group;
colname = cmskey; colname = cmskey;
colname.replace('|', '-');
create_column(colname, _realfld); create_column(colname, _realfld);
} }
create_column("Totale", _realfld); create_column("Totale", _realfld);
@ -191,8 +197,6 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n")
TRecnotype sheet_row = new_rec(""); TRecnotype sheet_row = new_rec("");
TString descr; TString descr;
set(0, "Conto");
set(1, "Descrizione");
for (int c = 0; c < ncols; c++) for (int c = 0; c < ncols; c++)
{ {
cmskey = colkeys.row(c); cmskey = colkeys.row(c);
@ -201,10 +205,10 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n")
descr.cut(0); descr.cut(0);
descr << cache().get(LF_COMMESSE, cms, COMMESSE_DESCRIZ); descr << cache().get(LF_COMMESSE, cms, COMMESSE_DESCRIZ);
descr << " - " << cache().get(LF_FASI, cmskey, FASI_DESCRIZ); descr << "-" << cache().get(LF_FASI, cmskey, FASI_DESCRIZ);
set(c + 2, descr); set(c + 2, descr);
} }
set(ncols + 2, "Totale "); set(ncols + 2, " ");
long start_rec = -1; long start_rec = -1;
int nrows = rowkeys.items(); int nrows = rowkeys.items();