Modifiche alla stampa effetti. Corretta la stampa delle righe.

Tolto il pulsante di annulla e lo zero-filled sui clienti.


git-svn-id: svn://10.65.10.50/trunk@4549 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-06-07 11:12:15 +00:00
parent 0006611125
commit b9da9dfe87
2 changed files with 28 additions and 24 deletions

View File

@ -22,7 +22,7 @@ class TPrint_effetti_app : public TPrintapp
TPrintrow _pr;
TString _ban, _cli, _val, _data_stampa, _ban_prec;
TDate _scad_prec;
TRectype* _rec_prec;
//TRectype* _rec_prec;
int _cur_1, _cur_2, _cur_3, _cur_4, _interline;
long _dist_prec, _cliente_prec;
char _tipo_prec;
@ -33,6 +33,7 @@ public:
virtual bool preprocess_print(int file, int counter);
virtual print_action postprocess_print(int file, int counter);
virtual void preprocess_header();
virtual print_action postprocess_page(int file, int counter);
void header_scadenza();
void header_banca();
void header_distinta();
@ -62,7 +63,7 @@ public:
TPrint_effetti_app::TPrint_effetti_app():TPrintapp(), _ban(11), _ban_prec(11), _cli(60), _val(3), _data_stampa(10)
{
_rel = NULL;
_rec_prec = NULL;
//_rec_prec = NULL;
_interline = 1;
}
@ -359,6 +360,12 @@ print_action TPrint_effetti_app::postprocess_print(int file, int counter)
return NEXT_PAGE;
}
print_action TPrint_effetti_app::postprocess_page(int file, int counter)
{
reset_print();
return NEXT_PAGE;
}
// setta, secondo il tipo di stampa scelto, la pagina logica
void TPrint_effetti_app::set_page(int file, int counter)
{
@ -501,7 +508,7 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
if (_prima_volta)
{
_prima_volta = FALSE;
_rec_prec = &rec;
//_rec_prec = &rec;
switch(_pr_type)
{
case st_scadenza:
@ -528,12 +535,12 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
break;
}
}
else
//else
{
// se effetto raggruppato stampo la lista delle fatture a cui si
// riferisce (dalla seconda poichè la prima viene sempre stampata
// nella pagina logica)
TEffetto effetto = *_rec_prec;
TEffetto effetto(rec);// = *_rec_prec;
long num = effetto.numero();
// prendo dall'effetto tutti i dati relativi alle fatture, che
// vengono inseriti nella Token_String nell'ordine
@ -543,6 +550,7 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
if (elem > 3)
{
TString descfatt;
int j=3;
for (int i = 3; i < elem; i+=3)
{
descfatt = dati->get(i+1);// prendo la data della fattura
@ -553,9 +561,10 @@ bool TPrint_effetti_app::preprocess_page(int file, int counter)
_pr.put(descfatt, 111);
if (_pr_type == st_banca || _pr_type == st_distinta )
_pr.put(descfatt, 114);
printer().print(_pr);
//printer().print(_pr);
set_row(j++,_pr);
_pr.reset();
}
_pr.reset();
}
}
// a seconda del tipo di stampa che devo effettuare svolgo i controlli per la "rottura stampa"
@ -769,9 +778,9 @@ bool TPrint_effetti_app::set_print(int)
cod_from = mask.get(F_DABAN);
cod_to = mask.get(F_ABAN);
if (cod_from.empty())
cod_from = "00000"; // per selezionare tutte
cod_from = "00000"; // per selezionare tutte
if (cod_to.empty()) // le banche di presentazione
cod_to = "99999";
cod_to = "99999";
filter = "";
filter << "(CODABIP>=" << cod_from << ")&&(CODABIP<=" << cod_to << ")";
select_cursor(_cur_2);
@ -784,7 +793,7 @@ bool TPrint_effetti_app::set_print(int)
cod_from = mask.get(F_DADIST);
cod_to = mask.get(F_ADIST);
if (cod_from.empty())
cod_from = "00000000"; // per selezionare tutte
cod_from = "00000000"; // per selezionare tutte
if (cod_to.empty()) // le distinte
cod_to = "99999999";
filter = "";
@ -798,14 +807,16 @@ bool TPrint_effetti_app::set_print(int)
case st_cliente:
cod_from = mask.get(F_DA_DATA4);
cod_to = mask.get(F_A_DATA4);
from.put(EFF_CODCF,cod_from);
to.put(EFF_CODCF,cod_to);
from.put(EFF_DATASCAD,cod_from);
to.put(EFF_DATASCAD,cod_to);
cod_from = mask.get(F_DACLI);
cod_to = mask.get(F_ACLI);
if (cod_from.empty())
cod_from = "000000"; // per selezionare tutti
cod_from = "000000"; // per selezionare tutti
if (cod_to.empty()) // i clienti
cod_to = "999999";
from.put(EFF_CODCF,cod_from);
to.put(EFF_CODCF,cod_to);
filter = "";
filter << "(CODCF>=" << cod_from << ")&&(CODCF<=" << cod_to << ")" ;
select_cursor(_cur_4);
@ -851,8 +862,8 @@ bool TPrint_effetti_app::user_destroy()
{
if (_rel)
delete _rel;
if (_rec_prec)
delete _rec_prec;
//if (_rec_prec)
// delete _rec_prec;
return TRUE;
}

View File

@ -211,7 +211,6 @@ END
NUMBER F_DACLI 6
BEGIN
PROMPT 2 8 "Dal Cliente "
FLAGS "RZ"
GROUP 4
USE LF_CLIFO
INPUT TIPOCF "C"
@ -225,7 +224,6 @@ END
NUMBER F_ACLI 6
BEGIN
PROMPT 30 8 "Al Cliente "
FLAGS "RZ"
GROUP 4
USE LF_CLIFO
INPUT TIPOCF "C"
@ -252,17 +250,12 @@ END
BUTTON DLG_OK 9 2
BEGIN
PROMPT -13 -1 ""
END
BUTTON DLG_CANCEL 9 2
BEGIN
PROMPT -23 -1 ""
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 9 2
BEGIN
PROMPT -33 -1 ""
PROMPT -22 -1 ""
END
ENDPAGE