Corrette stampe dei quadri A?
git-svn-id: svn://10.65.10.50/trunk@3629 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d588908f71
commit
feaeb40e8b
@ -24,8 +24,8 @@ END
|
|||||||
GENERAL
|
GENERAL
|
||||||
BEGIN
|
BEGIN
|
||||||
OFFSET 0 0
|
OFFSET 0 0
|
||||||
FONT "Roman 17cpi"
|
FONT "Courier New"
|
||||||
SIZE 12
|
SIZE 11
|
||||||
CARATTERE "X"
|
CARATTERE "X"
|
||||||
INIZIO_POS 3 2
|
INIZIO_POS 3 2
|
||||||
FINE_POS 131
|
FINE_POS 131
|
||||||
|
@ -356,7 +356,7 @@ END
|
|||||||
NUMERO 25
|
NUMERO 25
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "NUMERO ISCRIZIONE ALBO"
|
KEY "NUMERO ISCRIZIONE ALBO"
|
||||||
PROMPT 119 9 ""
|
PROMPT 125 9 ""
|
||||||
FIELD 104@->I1
|
FIELD 104@->I1
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -407,21 +407,21 @@ SECTION FOOTER LAST 2
|
|||||||
NUMERO 10
|
NUMERO 10
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "REDDITO CORRISPOSTO"
|
KEY "REDDITO CORRISPOSTO"
|
||||||
PROMPT 43 5 ""
|
PROMPT 43 1 ""
|
||||||
PICTURE "###.###.###.###^^^"
|
PICTURE "###.###.###.###^^^"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMERO 12
|
NUMERO 12
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "REDDITO CORRISPOSTO"
|
KEY "REDDITO CORRISPOSTO"
|
||||||
PROMPT 77 5 ""
|
PROMPT 77 1 ""
|
||||||
PICTURE "###.###.###.###^^^"
|
PICTURE "###.###.###.###^^^"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGA 2
|
STRINGA 2
|
||||||
BEGIN
|
BEGIN
|
||||||
KEY "FIRMA"
|
KEY "FIRMA"
|
||||||
PROMPT 83 8 ""
|
PROMPT 83 4 ""
|
||||||
FIELD 106@->RAGSOC
|
FIELD 106@->RAGSOC
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -81,13 +81,13 @@ bool TDicForm::InitPrint(const long codditta)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool was_open = pr.isopen();
|
const bool was_open = pr.isopen();
|
||||||
|
if (!was_open && !pr.open())
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
set_last_page(FALSE);
|
set_last_page(FALSE);
|
||||||
set_background(1, TRUE);
|
set_background(1, TRUE);
|
||||||
set_curr_page(PRIMA);
|
set_curr_page(PRIMA);
|
||||||
|
|
||||||
if (!was_open && !pr.open())
|
|
||||||
return FALSE;
|
|
||||||
do_events();
|
do_events();
|
||||||
|
|
||||||
_Items = filtra(codditta);
|
_Items = filtra(codditta);
|
||||||
@ -103,7 +103,7 @@ bool TDicForm::InitPrint(const long codditta)
|
|||||||
if (pr.printtype() != screenvis)
|
if (pr.printtype() != screenvis)
|
||||||
{
|
{
|
||||||
TString msg(60);
|
TString msg(60);
|
||||||
msg.format("Elaborazione in corso ditta %ld", codditta);
|
msg.format("Elaborazione della ditta %ld", codditta);
|
||||||
_prog = new TProgind(_Items, msg, FALSE,TRUE);
|
_prog = new TProgind(_Items, msg, FALSE,TRUE);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -508,7 +508,7 @@ bool TDicForm::PaginaPosizionamento() const
|
|||||||
|
|
||||||
int TDicForm::dic_form_len() const
|
int TDicForm::dic_form_len() const
|
||||||
{
|
{
|
||||||
if (curr_page() == PRIMA)
|
if (curr_page() == PRIMA && _PaginaPosizionamento && !_GiaPosizionato)
|
||||||
return QD_FORMLEN_PRIMA;
|
return QD_FORMLEN_PRIMA;
|
||||||
else
|
else
|
||||||
return QD_FORMLEN;
|
return QD_FORMLEN;
|
||||||
@ -524,16 +524,12 @@ void TDicForm::fill_page(TPrinter& pr, const int righe)
|
|||||||
// form feed
|
// form feed
|
||||||
if (righe < 0)
|
if (righe < 0)
|
||||||
{
|
{
|
||||||
// const int stop = PaginaPosizionamento() ? QD_FORMLEN_PRIMA : QD_FORMLEN;
|
|
||||||
const int stop = dic_form_len();
|
const int stop = dic_form_len();
|
||||||
for (int i = _RigaCorr; i < stop; i++)
|
for (int i = _RigaCorr; i < stop; i++)
|
||||||
{
|
{
|
||||||
if (i == 0)
|
if (i == 0 && _modulaser && !_GiaMessoStartPage[pagina])
|
||||||
if (_modulaser)
|
|
||||||
{
|
|
||||||
if (!_GiaMessoStartPage[pagina])
|
|
||||||
put_modulaser(row, STARTPAGE, pagina);
|
put_modulaser(row, STARTPAGE, pagina);
|
||||||
}
|
|
||||||
// Sull'ultima riga metto il codice ditta
|
// Sull'ultima riga metto il codice ditta
|
||||||
if (i == stop - 2)
|
if (i == stop - 2)
|
||||||
{
|
{
|
||||||
@ -543,25 +539,24 @@ void TDicForm::fill_page(TPrinter& pr, const int righe)
|
|||||||
|
|
||||||
TString16 ditta; ditta << _codditta;
|
TString16 ditta; ditta << _codditta;
|
||||||
row.put(ditta, POS_DITTA);
|
row.put(ditta, POS_DITTA);
|
||||||
pr.print(row);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
pr.print(row);
|
pr.print(row);
|
||||||
row.reset();
|
row.reset();
|
||||||
}
|
}
|
||||||
_RigaCorr = 0;
|
_RigaCorr = 0;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else // righe > 0
|
else // righe > 0
|
||||||
{
|
{
|
||||||
for (int i=0; i < righe; i++)
|
for (int i=0; i < righe; i++)
|
||||||
{
|
{
|
||||||
if (i == 0 && _modulaser && !_GiaMessoStartPage[pagina])
|
if (i == 0 && _modulaser && !_GiaMessoStartPage[pagina])
|
||||||
|
{
|
||||||
put_modulaser(row, STARTPAGE, pagina);
|
put_modulaser(row, STARTPAGE, pagina);
|
||||||
else
|
|
||||||
row.reset();
|
|
||||||
pr.print(row);
|
pr.print(row);
|
||||||
row.reset();
|
row.reset();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pr.print(row);
|
||||||
_RigaCorr++;
|
_RigaCorr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -605,7 +600,7 @@ void TDicForm::stampa_testata(TPrinter& pr)
|
|||||||
}
|
}
|
||||||
// Righe da saltare nelle prime pag. dei moduli successivi al primo (che' son
|
// Righe da saltare nelle prime pag. dei moduli successivi al primo (che' son
|
||||||
// senza le righe del posizionamento...)
|
// senza le righe del posizionamento...)
|
||||||
int HEADER_PRIMA_NOPOS = 3;
|
int HEADER_PRIMA_NOPOS = 2;
|
||||||
head.update();
|
head.update();
|
||||||
for (word j = 0; j <= r; j++)
|
for (word j = 0; j <= r; j++)
|
||||||
{
|
{
|
||||||
@ -626,12 +621,10 @@ void TDicForm::stampa_testata(TPrinter& pr)
|
|||||||
if (!PaginaPosizionamento())
|
if (!PaginaPosizionamento())
|
||||||
fill_page(pr, HEADER_PRIMA_NOPOS);
|
fill_page(pr, HEADER_PRIMA_NOPOS);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
pr.print(head.row(j));
|
pr.print(head.row(j));
|
||||||
_RigaCorr++;
|
_RigaCorr++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDicForm::next_page(TPrinter& pr)
|
void TDicForm::next_page(TPrinter& pr)
|
||||||
@ -1558,7 +1551,8 @@ bool TStampaQuadro::print_quadro(const int OffsetDitta, const bool modulaser)
|
|||||||
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di
|
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di
|
||||||
// stampa a video
|
// stampa a video
|
||||||
printer().formlen(QD_FORMLEN);
|
printer().formlen(QD_FORMLEN);
|
||||||
bool ok = printer().open();
|
const bool ok = printer().open();
|
||||||
|
CHECK(ok, "La stampante non si apre");
|
||||||
|
|
||||||
ff->set_cursor(get_cursor());
|
ff->set_cursor(get_cursor());
|
||||||
ff->azzera_totali();
|
ff->azzera_totali();
|
||||||
@ -2680,7 +2674,8 @@ bool TStampaQuadroG::print_quadro(const int OffsetDitta, const bool modulaser)
|
|||||||
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di
|
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di
|
||||||
// stampa a video
|
// stampa a video
|
||||||
printer().formlen(QG_FORMLEN);
|
printer().formlen(QG_FORMLEN);
|
||||||
bool ok = printer().open();
|
const bool ok = printer().open();
|
||||||
|
CHECK(ok, "La stampante non si apre");
|
||||||
|
|
||||||
_form_g->set_cursor(_cur_g);
|
_form_g->set_cursor(_cur_g);
|
||||||
_form_gd->set_cursor(_cur_gd);
|
_form_gd->set_cursor(_cur_gd);
|
||||||
@ -3742,7 +3737,8 @@ bool TStampaBusta::print_quadro(const int OffsetDitta, const bool modulaser)
|
|||||||
|
|
||||||
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di stampa a video
|
// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di stampa a video
|
||||||
printer().formlen(ff->height());
|
printer().formlen(ff->height());
|
||||||
bool ok = printer().open();
|
const bool ok = printer().open();
|
||||||
|
CHECK(ok, "La stampante non si apre");
|
||||||
|
|
||||||
ff->set_modulaser(modulaser);
|
ff->set_modulaser(modulaser);
|
||||||
|
|
||||||
@ -3816,10 +3812,11 @@ int stampa_quadro(int argc, char* argv[])
|
|||||||
default: app = new TStampaQuadroA(quadro, livello); break;
|
default: app = new TStampaQuadroA(quadro, livello); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (quadro[0] == 'B' && quadro[1] != 'a')
|
else if (quadro[0] == 'B')
|
||||||
{
|
{
|
||||||
switch (quadro[1])
|
switch (toupper(quadro[1]))
|
||||||
{
|
{
|
||||||
|
case 'A': app = new TStampaBase(livello); break;
|
||||||
case 'U': app = new TStampaBusta(quadro, livello); break;
|
case 'U': app = new TStampaBusta(quadro, livello); break;
|
||||||
default : app = new TStampaQuadroB(quadro, livello); break;
|
default : app = new TStampaQuadroB(quadro, livello); break;
|
||||||
}
|
}
|
||||||
@ -3836,10 +3833,6 @@ int stampa_quadro(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
app = new TStampaQuadroG1(livello);
|
app = new TStampaQuadroG1(livello);
|
||||||
}
|
}
|
||||||
else if (quadro == "Base")
|
|
||||||
{
|
|
||||||
app = new TStampaBase(livello);
|
|
||||||
}
|
|
||||||
else if (quadro == "H")
|
else if (quadro == "H")
|
||||||
{
|
{
|
||||||
app = new TStampaQuadroH(quadro, livello);
|
app = new TStampaQuadroH(quadro, livello);
|
||||||
|
@ -129,12 +129,12 @@ void TQuadroA::preprocess_corpo(const TRectype& rec)
|
|||||||
TPrint_section& body = section('B', odd_page);
|
TPrint_section& body = section('B', odd_page);
|
||||||
for (int i = 2; i <= 12; i++)
|
for (int i = 2; i <= 12; i++)
|
||||||
{
|
{
|
||||||
TForm_item& f = body.field(i);
|
TForm_item& f = body.find_field(i);
|
||||||
f.enable(rett_con != 'B');
|
f.enable(rett_con != 'B');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stampa solo le date di fine rapporto del 95
|
// Stampa solo le date di fine rapporto del 95
|
||||||
TForm_item& datafr = body.field(16);
|
TForm_item& datafr = body.find_field(16);
|
||||||
const TDate dfr = rec.get("DATAFR");
|
const TDate dfr = rec.get("DATAFR");
|
||||||
datafr.enable(dfr.year() == 1995);
|
datafr.enable(dfr.year() == 1995);
|
||||||
}
|
}
|
||||||
@ -260,8 +260,6 @@ bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis
|
|||||||
stampero_ultimo &= cur.pos() == cur.items()-1;
|
stampero_ultimo &= cur.pos() == cur.items()-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Usato per stampare la VK_ENDDOC in fill_page()
|
|
||||||
_EndPrintDitta=stampato_ultimo;
|
|
||||||
if (!stampato_ultimo)
|
if (!stampato_ultimo)
|
||||||
preprocess_corpo(cur.curr());
|
preprocess_corpo(cur.curr());
|
||||||
|
|
||||||
@ -323,11 +321,14 @@ bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis
|
|||||||
jump_to_line(pr, riga_totali(QUARTA));
|
jump_to_line(pr, riga_totali(QUARTA));
|
||||||
if (stampato_ultimo)
|
if (stampato_ultimo)
|
||||||
{
|
{
|
||||||
stampa_totali(pr);
|
stampa_totali(pr); // Stampa totali e firma
|
||||||
stampati_totali = TRUE;
|
stampati_totali = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
stampa_firma(pr);
|
stampa_firma(pr); // Stampa solo la firma senza i totali
|
||||||
|
|
||||||
|
// Usato per stampare la VK_ENDDOC in fill_page()
|
||||||
|
_EndPrintDitta = TRUE;
|
||||||
|
|
||||||
next_page(pr);
|
next_page(pr);
|
||||||
elementi = 0;
|
elementi = 0;
|
||||||
@ -449,7 +450,7 @@ void TQuadroA2::preprocess_corpo(const TRectype& rec)
|
|||||||
TPrint_section& body = section('B', odd_page);
|
TPrint_section& body = section('B', odd_page);
|
||||||
for (int i = 2; i <= 7; i++)
|
for (int i = 2; i <= 7; i++)
|
||||||
{
|
{
|
||||||
TForm_item& f = body.field(i);
|
TForm_item& f = body.find_field(i);
|
||||||
f.enable(add);
|
f.enable(add);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -527,14 +528,12 @@ void TQuadroH::inc_curr_page()
|
|||||||
if (_PaginaCorrente == PRIMA)
|
if (_PaginaCorrente == PRIMA)
|
||||||
_PaginaCorrente = SECONDA;
|
_PaginaCorrente = SECONDA;
|
||||||
else
|
else
|
||||||
if (_PaginaCorrente == SECONDA)
|
|
||||||
_PaginaCorrente = PRIMA;
|
_PaginaCorrente = PRIMA;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TQuadroH::elementi_pagina(PaginaQuadro p) const
|
int TQuadroH::elementi_pagina(PaginaQuadro p) const
|
||||||
{
|
{
|
||||||
const int n[2] = { 21, 27 };
|
return p == PRIMA ? 21 : 27;
|
||||||
return n[p-PRIMA];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int TQuadroH::prima_riga(PaginaQuadro p) const
|
int TQuadroH::prima_riga(PaginaQuadro p) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user