Aggiunta stampa del quadro A1

git-svn-id: svn://10.65.10.50/trunk@3180 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-07-11 12:35:26 +00:00
parent d3ccbe4673
commit c6f64c536f
3 changed files with 1742 additions and 466 deletions

File diff suppressed because it is too large Load Diff

458
m770/77qa1.frm Executable file
View File

@ -0,0 +1,458 @@
USE 56
JOIN 45 INTO CODDITTA=CODDITTA CODDIP=CODDIP
JOIN %CAF ALIAS 104 INTO CODTAB=CODCAAF
JOIN 9 INTO CODDITTA=CODDITTA
JOIN 6 TO 9 ALIAS 106 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 106@ ALIAS 108 INTO CODANAGR=CODANAGR
JOIN 13 TO 108@ ALIAS 113 INTO COM==COMNASC
JOIN 13 TO 106@ ALIAS 213 INTO COM==COMRF(COMRES)
END
DESCRIPTION
BEGIN
56->* "Quadro A1 770"
45->* "Anagrafica dei dipendenti"
104@->* "Tabella CAAF"
9->* "Ditte"
106@->* "Anagrafica persone fisiche e giuridiche (ditta)"
108@->* "Anagrafica persone fisiche (ditta)"
113@->* "Comuni DITTA (nascita)"
213@->* "Comuni DITTA (residenza)"
END
GENERAL
BEGIN
OFFSET 0 0
FONT "Courier New"
SIZE 11
CARATTERE "X"
INIZIO_POS 3 2
FINE_POS 131
GRID "+++++++++-|"
END
SECTION HEADER FIRST 22
LISTA 1
BEGIN
KEY "Tipo anagrafica"
FLAGS "H"
FIELD 106@->TIPOA
ITEM "F|Fisica" MESSAGE SHOW,1@|HIDE,2@
ITEM "G|Giuridica" MESSAGE SHOW,2@|HIDE,1@
END
STRINGA 2
BEGIN
KEY "CODICE FISCALE"
PROMPT 3 13 ""
FIELD 106@->COFI
END
STRINGA 3
BEGIN
KEY "RAGIONE SOCIALE"
PROMPT 40 13 ""
GROUP 2
FIELD 106@->RAGSOC
END
STRINGA 4
BEGIN
KEY "COGNOME"
PROMPT 40 13 ""
GROUP 1
FIELD 106@->RAGSOC[1,30]
END
STRINGA 5
BEGIN
KEY "NOME"
PROMPT 17 15 ""
GROUP 1
FIELD 106@->RAGSOC[31,50]
END
STRINGA 6
BEGIN
KEY "SESSO"
PROMPT 59 15 ""
GROUP 1
FIELD 108@->SESSO
END
STRINGA 7
BEGIN
KEY "DATA DI NASCITA"
PROMPT 64 15 ""
GROUP 1
FIELD 108@->DATANASC
END
STRINGA 8
BEGIN
KEY "COMUNE DI NASCITA"
PROMPT 86 15 ""
GROUP 1
FIELD 113@->DENCOM
END
STRINGA 9
BEGIN
KEY "PROV. DI NASCITA"
PROMPT 128 15 ""
GROUP 1
FIELD 113@->PROVCOM
END
STRINGA 10
BEGIN
KEY "COMUNE DI RES.FISCALE"
PROMPT 17 17 ""
FIELD 213@->DENCOM
END
STRINGA 11
BEGIN
KEY "PROV DI RES.FISCALE"
PROMPT 59 17 ""
FIELD 213@->PROVCOM
END
STRINGA 12
BEGIN
KEY "VIA di RES."
PROMPT 68 17 ""
FIELD 106@->INDRF
END
STRINGA 15
BEGIN
KEY "NUM. CIVICO di RES."
PROMPT 104 17 ""
FIELD 106@->CIVRF
END
STRINGA 16
BEGIN
KEY "CAP"
PROMPT 125 17 ""
FIELD 106@->CAPRF
END
STRINGA 13
BEGIN
KEY "CODICE FISCALE DEL SOGGETTO DICHIARANTE"
PROMPT 87 20 ""
END
NUMERO 14
BEGIN
KEY "NUM. FOGLIO"
PROMPT 125 20 ""
END
END
SECTION BODY ODD 10
STRINGA 1
BEGIN
KEY "COD.FIS"
PROMPT 11 1 ""
FIELD 45->CODFI
END
STRINGA 2
BEGIN
KEY "COGNOME"
PROMPT 43 1 ""
FIELD 45->COGNOME
END
STRINGA 3
BEGIN
KEY "NOME"
PROMPT 80 1 ""
FIELD 45->NOME
END
DATA 4
BEGIN
KEY "DATA NASCITA"
PROMPT 114 1 ""
FIELD 45->DATANA
FORMAT "1444-"
END
STRINGA 5
BEGIN
KEY "SESSO"
PROMPT 128 1 ""
FIELD 45->SESSO
END
STRINGA 6
BEGIN
KEY "COMUNE DI NASCITA"
PROMPT 11 3 ""
FIELD 45->COMUNENA
END
STRINGA 7
BEGIN
KEY "PROV DI NASCITA"
PROMPT 51 3 ""
FIELD 45->PROVNA
END
NUMERO 8
BEGIN
KEY "MESE DI RIFERIMENTO"
PROMPT 11 5 ""
FIELD 56->MESERIF
END
NUMERO 9
BEGIN
KEY "IMPOSTA RIMBORSATA"
PROMPT 23 5 ""
PICTURE "###.###.###^^^"
FIELD 56->IMPRIMB9
MESSAGE ADD,FL->9
END
NUMERO 10
BEGIN
KEY "IMPOSTA VERSATA"
PROMPT 42 5 ""
PICTURE "###.###.###^^^"
FIELD 56->IMPVERS10
MESSAGE ADD,FL->10
END
NUMERO 11
BEGIN
KEY "INTERESSI"
PROMPT 61 5 ""
PICTURE "###.###.###^^^"
FIELD 56->INTER11
MESSAGE ADD,FL->11
END
NUMERO 12
BEGIN
KEY "IMPOSTA VERSATA"
PROMPT 79 5 ""
PICTURE "###.###.###^^^"
FIELD 56->IMPVERS12
MESSAGE ADD,FL->12
END
NUMERO 13
BEGIN
KEY "INTERESSI"
PROMPT 98 5 ""
PICTURE "###.###.###^^^"
FIELD 56->INTER13
MESSAGE ADD,FL->13
END
NUMERO 14
BEGIN
KEY "SOPRATTASSA SU IRPEF"
PROMPT 117 5 ""
PICTURE "###.###.###^^^"
FIELD 56->STASSA14
MESSAGE ADD,FL->14
END
NUMERO 15
BEGIN
KEY "CONTRIBUTO A RIMBORSO"
PROMPT 11 7 ""
PICTURE "###.###.###^^^"
FIELD 56->CONTRIMB15
MESSAGE ADD,FL->15
END
NUMERO 16
BEGIN
KEY "CONTRIBUTO VERSATO"
PROMPT 28 7 ""
PICTURE "###.###.###^^^"
FIELD 56->CONTVERS16
MESSAGE ADD,FL->16
END
NUMERO 17
BEGIN
KEY "INTERESSI"
PROMPT 47 7 ""
PICTURE "###.###.###^^^"
FIELD 56->INTER17
MESSAGE ADD,FL->17
END
NUMERO 18
BEGIN
KEY "CONTRIBUTO VERSATO"
PROMPT 66 7 ""
PICTURE "###.###.###^^^"
FIELD 56->CONTVER18
MESSAGE ADD,FL->18
END
NUMERO 19
BEGIN
KEY "INTERESSI"
PROMPT 84 7 ""
PICTURE "###.###.###^^^"
FIELD 56->INTER19
MESSAGE ADD,FL->19
END
NUMERO 20
BEGIN
KEY "SOPRATTASSA SU IRPEF"
PROMPT 102 7 ""
PICTURE "###.###.###^^^"
FIELD 56->STASSA20
MESSAGE ADD,FL->20
END
STRINGA 21
BEGIN
KEY "CONGUAGLI NON EFFETTUATI"
PROMPT 118 7 ""
FIELD 56->CONNEFF21
END
STRINGA 22
BEGIN
KEY "TIPO CONGUAGLIO"
PROMPT 125 7 ""
FIELD 56->TIPOCONG22
END
STRINGA 23
BEGIN
KEY "CODICE FISCALE CAAF"
PROMPT 11 9 ""
FIELD 104@->S1
END
STRINGA 24
BEGIN
KEY "DENOMINAZIONE CAAF"
PROMPT 42 9 ""
FIELD 104@->S0
END
NUMERO 25
BEGIN
KEY "NUMERO ISCRIZIONE ALBO"
PROMPT 98 9 ""
FIELD 104@->I1
END
DATA 26
BEGIN
KEY "DATA RICEZIONE MOD.730-5"
PROMPT 112 9 ""
FORMAT "1444-"
PICTURE "## ^ ##^^^^^"
FIELD 56->DATARIC26
END
END
SECTION FOOTER LAST 4
NUMERO 9
BEGIN
KEY "IMPOSTA RIMBORSATA"
PROMPT 23 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 10
BEGIN
KEY "IMPOSTA VERSATA"
PROMPT 42 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 11
BEGIN
KEY "INTERESSI"
PROMPT 61 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 12
BEGIN
KEY "IMPOSTA VERSATA"
PROMPT 79 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 13
BEGIN
KEY "INTERESSI"
PROMPT 98 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 14
BEGIN
KEY "SOPRATTASSA SU IRPEF"
PROMPT 117 1 ""
PICTURE "###.###.###^^^"
END
NUMERO 15
BEGIN
KEY "CONTRIBUTO A RIMBORSO"
PROMPT 11 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 16
BEGIN
KEY "CONTRIBUTO VERSATO"
PROMPT 28 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 17
BEGIN
KEY "INTERESSI"
PROMPT 47 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 18
BEGIN
KEY "CONTRIBUTO VERSATO"
PROMPT 66 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 19
BEGIN
KEY "INTERESSI"
PROMPT 84 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 20
BEGIN
KEY "SOPRATTASSA SU IRPEF"
PROMPT 102 3 ""
PICTURE "###.###.###^^^"
END
END
END

View File

@ -57,7 +57,7 @@ typedef enum { STARTDOC, STARTDITTA, STARTPAGE, ENDDOC } ModulaserKey;
// Quadro D
HIDDEN const int QD_FORMLEN_PRIMA = 70; // 72 - 3 (3 e' la posizione della X di posiz.)
HIDDEN const int QD_FORMLEN = 72;
HIDDEN const int POS_DITTA = 91; // Colonna del codice ditta a pie' di modulo
HIDDEN const int POS_DITTA = 120; // Colonna del codice ditta a pie' di modulo
HIDDEN const int QD_PAGINE = 4;
HIDDEN const int QD_RIGHE_PRIMA = 5;
HIDDEN const int QD_RIGHE_SECONDA = 7;
@ -67,7 +67,7 @@ HIDDEN const int HEADER_SECONDA = 7;
HIDDEN const int HEADER_TERZA = 8; // Sarebbero 9 col righello...
HIDDEN const int HEADER_QUARTA = 14; // 15 col righello...
typedef enum { PRIMA=1, SECONDA, TERZA, QUARTA } PagineQD;
typedef enum { PRIMA=1, SECONDA, TERZA, QUARTA } PaginaQuadro;
typedef enum { fisiche, nofisiche } TipoPagina;
///////////////////////////////////////////////////////////////////////////////////////////
@ -91,9 +91,9 @@ class TDicForm : public TForm
protected:
long _Items; // numero di record che hanno passato il filtro
PagineQD _PaginaCorrente;
PaginaQuadro _PaginaCorrente;
void set_curr_page(PagineQD pagina) { _PaginaCorrente = pagina; }
void set_curr_page(PaginaQuadro pagina) { _PaginaCorrente = pagina; }
virtual void inc_curr_page();
virtual void next_page(TPrinter& pr);
bool _modulaser; // se stampa per modulaser
@ -117,7 +117,7 @@ class TDicForm : public TForm
virtual void stampa_totali(TPrinter& pr);
virtual void aggiorna_totali(const char tipo);
virtual void set_body(TPrinter& pr, const char tipo);
void StampaPagina(PagineQD PaginaCorrente, const bool StampaTotali, const long Fis, const long NoFis);
void StampaPagina(PaginaQuadro PaginaCorrente, const bool StampaTotali, const long Fis, const long NoFis);
void posiziona();
void fill_page(TPrinter& pr, const int righe);
void jump_to_line(TPrinter& pr, const int riga);
@ -151,7 +151,7 @@ class TDicForm : public TForm
void set_num_foglio(const int foglio) { _num_foglio = foglio; }
int num_foglio() const { return _num_foglio; }
virtual void azzera_totali();
PagineQD curr_page() const { return _PaginaCorrente; }
PaginaQuadro curr_page() const { return _PaginaCorrente; }
TCursor& cur();
void set_progind(TProgind* prog) { _prog = prog; }
@ -581,13 +581,13 @@ bool TDicForm::PaginaPosizionamento() const
void TDicForm::fill_page(TPrinter& pr, const int righe)
{
TPrintrow row;
PagineQD pagina = curr_page();
PaginaQuadro pagina = curr_page();
// form feed
if (righe < 0)
{
const bool PrimaPagina = curr_page() == PRIMA;
int stop = PaginaPosizionamento() ? QD_FORMLEN_PRIMA : QD_FORMLEN;
// const bool PrimaPagina = curr_page() == PRIMA;
const int stop = PaginaPosizionamento() ? QD_FORMLEN_PRIMA : QD_FORMLEN;
for (int i = _RigaCorr; i < stop; i++)
{
if (i == 0)
@ -597,29 +597,34 @@ void TDicForm::fill_page(TPrinter& pr, const int righe)
put_modulaser(row, STARTPAGE, pagina);
}
// Sull'ultima riga metto il codice ditta
if (i == stop-1)
if (i == stop - 2)
{
if (_modulaser && EndJob() && curr_page() == QUARTA)
put_modulaser(row, ENDDOC);
TString16 ditta; ditta << _codditta;
row.put(ditta, POS_DITTA);
pr.print(row);
row.reset();
}
pr.print(row);
else
pr.print(row);
}
_RigaCorr = 0;
return;
}
else // righe > 0
for (int i=0; i < righe; i++)
else // righe > 0
{
if (i == 0 && _modulaser && !_GiaMessoStartPage[pagina])
put_modulaser(row, STARTPAGE, pagina);
else
row.reset();
pr.print(row);
_RigaCorr++;
}
for (int i=0; i < righe; i++)
{
if (i == 0 && _modulaser && !_GiaMessoStartPage[pagina])
put_modulaser(row, STARTPAGE, pagina);
else
row.reset();
pr.print(row);
_RigaCorr++;
}
}
}
void TDicForm::jump_to_line(TPrinter& pr, const int lin)
@ -631,7 +636,7 @@ void TDicForm::jump_to_line(TPrinter& pr, const int lin)
void TDicForm::stampa_totali(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
TPrint_section& foot = section('B', even_page);
const char* pic = "############";
bool stampa = FALSE;
@ -727,7 +732,7 @@ const int NUM_RIGHE = 8;
void TDicForm::stampa_testata(TPrinter& pr)
{
TPrint_section& head = section('H', 1);
TPrint_section& head = section('H', first_page);
const word r = head.height()-1;
TPrintrow& head_row = head.row(r-1);
@ -776,7 +781,7 @@ void TDicForm::stampa_testata(TPrinter& pr)
void TDicForm::next_page(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
if (PagCorr >= TERZA)
stampa_totali(pr);
fill_page(pr, -1); // formfeed "adattato"
@ -1005,7 +1010,7 @@ void TQuadroG::inc_curr_page()
void TQuadroG::next_page(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
fill_page(pr, -1);
inc_curr_page();
}
@ -1269,7 +1274,7 @@ class TDistintaG : public TQuadroG
void TDistintaG::next_page(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
// if (PagCorr == SECONDA)
stampa_totali(pr);
fill_page(pr, -1); // formfeed "adattato"
@ -1306,7 +1311,7 @@ void TDistintaG::aggiorna_totali(const char tipo)
void TDistintaG::stampa_totali(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
TPrint_section& foot = section('B', even_page);
const word righe = foot.height();
const char* pic = "############";
@ -2845,7 +2850,7 @@ void TQuadroF::aggiorna_totali(char tipoprosp, TRectype& r)
void TQuadroF::next_page(TPrinter& pr)
{
PagineQD PagCorr = curr_page();
PaginaQuadro PagCorr = curr_page();
// if (PagCorr = SECONDA) stampa_totali(pr);
fill_page(pr, -1); // formfeed "adattato"
inc_curr_page();
@ -3297,23 +3302,45 @@ protected:
virtual void azzera_totali();
virtual void aggiorna_totali(const char) { }
virtual int elementi_pagina(PaginaQuadro p) const;
virtual int prima_riga(PaginaQuadro p) const;
virtual int riga_totali() const;
void stampa_corpo(TPrinter& pr);
void stampa_totali(TPrinter& pr);
public:
TQuadroA(const char* form, const char* quadro) : TDicForm(form, quadro) {}
virtual ~TQuadroA() {}
};
void TQuadroA::azzera_totali()
{
TPrint_section& totali = section('F', odd_page);
TPrint_section& totali = section('F', last_page);
totali.reset();
}
void TQuadroA::stampa_corpo(TPrinter& pr)
{
TPrint_section& body = section('B', odd_page);
body.reset();
body.update();
const int body_righe = body.height();
for (int i = 0; i < body_righe; i++)
{
pr.print(body.row(i));
_RigaCorr++;
}
if (usa_progind())
progind()->addstatus(1);
}
void TQuadroA::stampa_totali(TPrinter& pr)
{
TPrint_section& totali = section('F', odd_page);
TPrint_section& totali = section('F', last_page);
totali.update();
for (int i = 0; i < totali.items(); i++)
{
@ -3328,6 +3355,22 @@ void TQuadroA::next_page(TPrinter& pr)
inc_curr_page();
}
int TQuadroA::elementi_pagina(PaginaQuadro p) const
{
const int n[4] = { 1, 4, 4, 2 };
return n[p];
}
int TQuadroA::prima_riga(PaginaQuadro p) const
{
return p == PRIMA ? 45 : 5;
}
int TQuadroA::riga_totali() const
{
return 45;
}
bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis)
{
TCursor& cur = *cursor();
@ -3338,7 +3381,7 @@ bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis
pr.formlen(QA_FORMLEN);
int percipienti = 0; // Numero di percipienti stampati in questa pagina
int elementi = 0; // Numero di elementi stampati in questa pagina
bool stampato_ultimo = FALSE;
bool stampati_totali = FALSE;
@ -3352,56 +3395,63 @@ bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis
if (_modulaser)
ClearFlagModulaser();
if (elementi == 0)
{
stampa_testata(pr);
jump_to_line(pr, prima_riga(PRIMA));
}
if (!stampato_ultimo)
{
if (cur.pos() == 0)
stampa_testata(pr);
jump_to_line(pr, 44);
set_body(pr, 'F');
stampa_corpo(pr);
stampato_ultimo = stampero_ultimo;
}
next_page(pr);
percipienti = 0;
elementi++;
if (elementi >= elementi_pagina(PRIMA))
{
next_page(pr);
elementi = 0;
}
break;
case SECONDA:
case TERZA:
if (!stampato_ultimo)
{
if (percipienti == 0)
jump_to_line(pr, 4);
set_body(pr, 'F');
if (elementi == 0)
jump_to_line(pr, prima_riga(_PaginaCorrente));
stampa_corpo(pr);
stampato_ultimo = stampero_ultimo;
}
percipienti++;
if (percipienti == 3)
elementi++;
if (elementi >= elementi_pagina(_PaginaCorrente))
{
next_page(pr);
percipienti = 0;
elementi = 0;
}
break;
case QUARTA:
if (!stampato_ultimo)
{
if (percipienti == 0)
jump_to_line(pr, 4);
if (elementi == 0)
jump_to_line(pr, prima_riga(QUARTA));
set_body(pr, 'F');
stampa_corpo(pr);
stampato_ultimo = stampero_ultimo;
}
percipienti++;
elementi++;
if (percipienti == 2)
if (elementi >= elementi_pagina(QUARTA))
{
if (stampato_ultimo)
{
jump_to_line(pr, 39);
jump_to_line(pr, riga_totali());
stampa_totali(pr);
stampati_totali = TRUE;
}
next_page(pr);
percipienti = 0;
elementi = 0;
}
break;
default:
@ -3413,12 +3463,11 @@ bool TQuadroA::print(const long codditta, const long NumFis, const long NumNoFis
return TRUE;
}
class TStampaQuadroA : public TStampaQuadro
{
private:
protected:
TQuadroA* _form;
TRelation* _rel;
// TRelation* _rel;
TSorted_cursor* _cur;
protected:
@ -3430,13 +3479,15 @@ protected:
virtual TCursor* get_cursor() const { return _cur; }
public:
TStampaQuadroA(char livel) : TStampaQuadro("A", livel) { }
TStampaQuadroA(const char* quadro, char livel) : TStampaQuadro(quadro, livel) { }
virtual ~TStampaQuadroA() { }
};
bool TStampaQuadroA::user_create()
{
_form = new TQuadroA("77QA", quadro());
/*
_rel = new TRelation(LF_QUAA);
_rel->add(LF_NDITTE, "CODDITTA=CODDITTA", 1, LF_QUAA);
_rel->add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR", 1, LF_NDITTE, 106);
@ -3445,10 +3496,11 @@ bool TStampaQuadroA::user_create()
_rel->add(LF_COMUNI, "COM==COMRF(COMRES)", 1, LF_ANAG, 213);
_rel->add(LF_DIPEND, "CODDITTA=CODDITTA|CODDIP=CODDIP");
_rel->add("%CAF", "CODTAB=CODCAAF", 1, LF_QUAA, 104);
*/
TString sortkey(80);
sortkey.format("CODDITTA|%d->COGNOME|%d->NOME|CODDIP", LF_DIPEND, LF_DIPEND);
_cur = new TSorted_cursor(_rel, sortkey);
_cur = new TSorted_cursor(_form->TForm::relation(), sortkey);
return TRUE;
}
@ -3456,12 +3508,65 @@ bool TStampaQuadroA::user_create()
bool TStampaQuadroA::user_destroy()
{
delete _cur;
delete _rel;
// delete _rel;
delete _form;
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////////
// Quadro A1
/////////////////////////////////////////////////////////////////////////////////
class TQuadroA1 : public TQuadroA
{
protected:
virtual int elementi_pagina(PaginaQuadro p) const;
virtual int prima_riga(PaginaQuadro p) const;
virtual int riga_totali() const;
public:
TQuadroA1(const char* form, const char* quadro) : TQuadroA(form, quadro) { }
virtual ~TQuadroA1() { }
};
int TQuadroA1::elementi_pagina(PaginaQuadro p) const
{
const int n[4] = { 3, 6, 6, 5 };
return n[p];
}
int TQuadroA1::prima_riga(PaginaQuadro p) const
{
return p == PRIMA ? 32 : 5;
}
int TQuadroA1::riga_totali() const
{
return 55;
}
class TStampaQuadroA1 : public TStampaQuadroA
{
protected:
virtual bool user_create();
public:
TStampaQuadroA1(const char* quadro, char livel) : TStampaQuadroA(quadro, livel) { }
virtual ~TStampaQuadroA1() { }
};
bool TStampaQuadroA1::user_create()
{
_form = new TQuadroA1("77QA1", quadro());
TString sortkey(80);
sortkey.format("CODDITTA|%d->COGNOME|%d->NOME|CODDIP", LF_DIPEND, LF_DIPEND);
_cur = new TSorted_cursor(_form->TForm::relation(), sortkey);
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////////
//
// MAIN
@ -3484,9 +3589,13 @@ int stampa_quadro(int argc, char* argv[])
{
app = new TStampaQuadroD(quadro, livello);
}
else if (quadro == "A")
{
app = new TStampaQuadroA(livello);
else if (quadro[0] == 'A')
{
switch (quadro[1] - '0')
{
case 1: app = new TStampaQuadroA1(quadro, livello); break;
default: app = new TStampaQuadroA(quadro, livello); break;
}
}
else if (quadro == "F")
{