Patch level :2.0 nopatch
Files correlati :cm0 cm0200a.frm cm0200a.msk Ricompilazione Demo : [ ] Commento :aggiunta la possibilita' di stampare i totali per gruppo/conto/sottoconto git-svn-id: svn://10.65.10.50/trunk@11762 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
37c2c33a12
commit
caaddad3d2
@ -171,7 +171,7 @@ class TSchedacdc : public TSkeleton_application
|
|||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
TTotalis _t_sottoc, _t_fsc, _t_cms;
|
TTotalis _t_sottoc, _t_fsc, _t_cms;
|
||||||
TString _currcms, _currfsc, _oldcms, _oldfsc;
|
TString _currcms, _currfsc, _oldcms, _oldfsc;
|
||||||
bool _saltopagina, _headercms, _headerfsc, _headersottoc;
|
bool _saltopagina, _print_tot_sottoc, _headercms, _headerfsc, _headersottoc;
|
||||||
int _currgruppo, _currconto, _oldgruppo, _oldconto;
|
int _currgruppo, _currconto, _oldgruppo, _oldconto;
|
||||||
long _currsottoc, _oldsottoc;
|
long _currsottoc, _oldsottoc;
|
||||||
|
|
||||||
@ -183,6 +183,7 @@ protected:
|
|||||||
void print_movimento(TSorted_cursor& cur);
|
void print_movimento(TSorted_cursor& cur);
|
||||||
void print_header_mov() { print_specialsection('H', even_page); };
|
void print_header_mov() { print_specialsection('H', even_page); };
|
||||||
void print_header_sottoc();
|
void print_header_sottoc();
|
||||||
|
void print_footer_sottoc();
|
||||||
void print_footer_cms();
|
void print_footer_cms();
|
||||||
void print_header_cms();
|
void print_header_cms();
|
||||||
void print_footer_fsc();
|
void print_footer_fsc();
|
||||||
@ -275,6 +276,32 @@ void TSchedacdc::print_movimento(TSorted_cursor& cur)
|
|||||||
print_body();
|
print_body();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TSchedacdc::print_footer_sottoc()
|
||||||
|
{
|
||||||
|
if (_print_tot_sottoc)
|
||||||
|
{
|
||||||
|
TString tmp;
|
||||||
|
tmp.format(FR("CONTO %d %d %ld"), _oldgruppo, _oldconto, _oldsottoc);
|
||||||
|
_form->find_field('F', first_page, FR_CODICE).set(tmp);
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_DARE).set("");
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_AVERE).set("");
|
||||||
|
char sezione = _t_sottoc._tot_periodo.sezione();
|
||||||
|
real valore = _t_sottoc._tot_periodo.valore();
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_SALDO).set(valore.string());
|
||||||
|
if ( sezione == 'D')
|
||||||
|
{
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_DARE).set(valore.string());
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_SEGNO).set("D");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_AVERE).set(valore.string());
|
||||||
|
_form->find_field('F', first_page, FR_TOTALE_SEGNO).set("A");
|
||||||
|
}
|
||||||
|
print_specialsection('F', first_page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TSchedacdc::print_footer_cms()
|
void TSchedacdc::print_footer_cms()
|
||||||
{
|
{
|
||||||
if (!_t_cms._tot_periodo.is_zero())
|
if (!_t_cms._tot_periodo.is_zero())
|
||||||
@ -458,6 +485,7 @@ void TSchedacdc::main_loop()
|
|||||||
while (_mask->run() == K_ENTER)
|
while (_mask->run() == K_ENTER)
|
||||||
{
|
{
|
||||||
_saltopagina = _mask->get_bool(F_SALTOPAGINA); // salto pagina a fine commessa
|
_saltopagina = _mask->get_bool(F_SALTOPAGINA); // salto pagina a fine commessa
|
||||||
|
_print_tot_sottoc = _mask->get_bool(F_TOT_GCS); //stampa totali sottoconti
|
||||||
_codes = _mask->get_int(F_ANNO); // esercizio
|
_codes = _mask->get_int(F_ANNO); // esercizio
|
||||||
_dataini = _mask->get_date(F_DATAINI); // data iniziale
|
_dataini = _mask->get_date(F_DATAINI); // data iniziale
|
||||||
_datafin = _mask->get_date(F_DATAFIN); // data finale
|
_datafin = _mask->get_date(F_DATAFIN); // data finale
|
||||||
@ -558,6 +586,8 @@ void TSchedacdc::main_loop()
|
|||||||
TImporto importo(rmovrec.get_char(RMV_SEZIONE), rmovrec.get_real(RMV_IMPORTO));
|
TImporto importo(rmovrec.get_char(RMV_SEZIONE), rmovrec.get_real(RMV_IMPORTO));
|
||||||
if ((_oldcms != _currcms) || (_oldfsc != _currfsc) || (_oldgruppo != _currgruppo) || (_oldconto != _currconto) || (_oldsottoc != _currsottoc))
|
if ((_oldcms != _currcms) || (_oldfsc != _currfsc) || (_oldgruppo != _currgruppo) || (_oldconto != _currconto) || (_oldsottoc != _currsottoc))
|
||||||
{
|
{
|
||||||
|
if (_oldgruppo > 0)
|
||||||
|
print_footer_sottoc();
|
||||||
_oldgruppo = _currgruppo;
|
_oldgruppo = _currgruppo;
|
||||||
_oldconto = _currconto;
|
_oldconto = _currconto;
|
||||||
_oldsottoc = _currsottoc;
|
_oldsottoc = _currsottoc;
|
||||||
@ -577,6 +607,7 @@ void TSchedacdc::main_loop()
|
|||||||
}
|
}
|
||||||
if (num > 0)
|
if (num > 0)
|
||||||
{
|
{
|
||||||
|
print_footer_sottoc();
|
||||||
if (ctrlfsc)
|
if (ctrlfsc)
|
||||||
print_footer_fsc();
|
print_footer_fsc();
|
||||||
print_footer_cms();
|
print_footer_cms();
|
||||||
|
@ -129,7 +129,7 @@ SECTION HEADER EVEN 3
|
|||||||
STRINGA -1
|
STRINGA -1
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "Intestazione stampa"
|
KEY "Intestazione stampa"
|
||||||
PROMPT 1 1 "------------------------------------------------------------------------------------------------------------------------------------"
|
PROMPT 1 1 "____________________________________________________________________________________________________________________________________"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGA -1
|
STRINGA -1
|
||||||
@ -189,7 +189,7 @@ END
|
|||||||
STRINGA -1
|
STRINGA -1
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "Intestazione stampa"
|
KEY "Intestazione stampa"
|
||||||
PROMPT 1 3 "------------------------------------------------------------------------------------------------------------------------------------"
|
PROMPT 1 3 "____________________________________________________________________________________________________________________________________"
|
||||||
END
|
END
|
||||||
|
|
||||||
END // section header even
|
END // section header even
|
||||||
@ -315,7 +315,7 @@ SECTION FOOTER FIRST 1
|
|||||||
STRINGA FR_CODICE 50
|
STRINGA FR_CODICE 50
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "Codice commessa o fase"
|
KEY "Codice commessa o fase"
|
||||||
PROMPT 1 1 "TOTALI "
|
PROMPT 1 1 "TOTALE "
|
||||||
END
|
END
|
||||||
|
|
||||||
VALUTA FR_TOTALE_DARE 14
|
VALUTA FR_TOTALE_DARE 14
|
||||||
|
@ -18,3 +18,4 @@
|
|||||||
#define F_SOTTOCFIN 116
|
#define F_SOTTOCFIN 116
|
||||||
#define F_DESCRFIN 117
|
#define F_DESCRFIN 117
|
||||||
#define F_SALTOPAGINA 118
|
#define F_SALTOPAGINA 118
|
||||||
|
#define F_TOT_GCS 119
|
||||||
|
@ -220,6 +220,11 @@ BEGIN
|
|||||||
PROMPT 2 15 "Salto pagina a fine commessa"
|
PROMPT 2 15 "Salto pagina a fine commessa"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_TOT_GCS
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 16 "Stampa totali per Gruppo/Conto/Sottoconto"
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user