Patch level :
Files correlati : cg3.exe cg3600a.msk Ricompilazione Demo : [ ] Commento : Corretta gestione descrizioni in visualizzazione mastrini. Grazie ancora ad A.B. qualcosa! git-svn-id: svn://10.65.10.50/branches/R_10_00@22418 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c70d24c617
commit
f16ea19fd5
@ -1612,7 +1612,7 @@ class TMastrini_grid : public TGrid_field
|
||||
TColor_mask _colmsk;
|
||||
COLOR _mas_back, _mas_fore;
|
||||
COLOR _con_back, _con_fore;
|
||||
bool _primanoting;
|
||||
bool _primanoting, _contsep;
|
||||
|
||||
protected: // TGrid_field
|
||||
virtual bool on_record(long rec);
|
||||
@ -1638,13 +1638,14 @@ public:
|
||||
void save_colors();
|
||||
void load_colors();
|
||||
void set_colors();
|
||||
void set_contsep(bool cs) { _contsep = cs; }
|
||||
|
||||
TMastrini_grid(TMask* m);
|
||||
virtual ~TMastrini_grid() { }
|
||||
};
|
||||
|
||||
TMastrini_grid::TMastrini_grid(TMask* m)
|
||||
: TGrid_field(m), _causali(LF_CAUSALI, CAU_DESCR), _primanoting(false)
|
||||
: TGrid_field(m), _causali(LF_CAUSALI, CAU_DESCR), _primanoting(false), _contsep(false)
|
||||
{
|
||||
load_colors();
|
||||
}
|
||||
@ -1734,40 +1735,38 @@ void TMastrini_grid::cell_request(long rec, short id, TGrid_cell& cell)
|
||||
}
|
||||
break;
|
||||
case 104: // Descrizione
|
||||
if (riga.tipo() == riga_mastrino)
|
||||
{
|
||||
const TRectype& rmov = _mastrino.riga(rec);
|
||||
TString descr(rmov.get(RMV_DESCR));
|
||||
const TRectype& mov = _mastrino.testata(rec);
|
||||
|
||||
if (cell.empty())
|
||||
TString descr = rmov.get(RMV_DESCR);
|
||||
if (riga.tipo() == riga_mastrino)
|
||||
{
|
||||
if (descr.empty())
|
||||
{
|
||||
const TRectype& mov = _mastrino.testata(rec);
|
||||
descr = mov.get(MOV_DESCR);
|
||||
if (cell.empty())
|
||||
if (descr.empty())
|
||||
{
|
||||
TBill uncle(rmov,true);
|
||||
|
||||
descr = uncle.descrizione();
|
||||
}
|
||||
}
|
||||
if (app().query_mask().get_bool(F_ST_CONTSEP))
|
||||
descr << "\n" << cache().get("&NPENT", mov.get(MOV_CONTSEP), "S0");
|
||||
cell.set(descr);
|
||||
}
|
||||
else
|
||||
{
|
||||
const TRectype& rmov = _mastrino.riga(rec);
|
||||
const TRectype& mov = _mastrino.testata(rec);
|
||||
TString descr(rmov.get(MOV_DESCR));
|
||||
|
||||
// Bug 0001748: ignora descrizioni generate da contabilizzazione
|
||||
if (cell.empty() || descr == _mastrino.conto().descrizione())
|
||||
if (descr.empty() || descr == _mastrino.conto().descrizione())
|
||||
{
|
||||
const TBill conto(rmov);
|
||||
descr = conto.descrizione();
|
||||
}
|
||||
if (app().query_mask().get_bool(F_ST_CONTSEP))
|
||||
descr << "\n" << cache().get("&NPENT", mov.get(MOV_CONTSEP), "S0");
|
||||
}
|
||||
if (_contsep)
|
||||
{
|
||||
const TString16 cs = mov.get(MOV_CONTSEP);
|
||||
if (cs.full())
|
||||
descr << "\n" << cache().get("&NPENT", cs, "S0");
|
||||
}
|
||||
cell.set(descr);
|
||||
}
|
||||
break;
|
||||
@ -2501,8 +2500,9 @@ void TQuery_mask::do_query()
|
||||
const bool provv = get_bool(F_PROVVIS);
|
||||
|
||||
conto.set(*_gm, F_GRUPPO, F_CONTO, F_SOTTOCONTO, 0, F_DESSOTTOC);
|
||||
TMastrini_grid & gf = _gm->grid();
|
||||
TMastrini_grid& gf = _gm->grid();
|
||||
|
||||
gf.set_contsep(get_bool(F_ST_CONTSEP));
|
||||
gf.read(conto, annoes, da_data, a_data, da_caus, a_caus, provv);
|
||||
gf.select(get_bool(F_END) ? gf.items() -1 : 0);
|
||||
|
||||
|
@ -243,7 +243,7 @@ END
|
||||
|
||||
BOOLEAN F_END
|
||||
BEGIN
|
||||
PROMPT 40 12 "Vai in fondo al mastrino"
|
||||
PROMPT 40 12 "Posizionamento in fondo al mastrino"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 5
|
||||
@ -308,7 +308,7 @@ END
|
||||
|
||||
BOOLEAN F_ST_CONTSEP
|
||||
BEGIN
|
||||
PROMPT 2 17 "Visualizza contabilità separata"
|
||||
PROMPT 2 17 "Visualizzare contabilità separata"
|
||||
MODULE NP
|
||||
END
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user