Corrette stampe dei quadri B e H

git-svn-id: svn://10.65.10.50/trunk@3759 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-10-11 14:24:28 +00:00
parent 1ec5595d26
commit 00b955bd64
6 changed files with 355 additions and 332 deletions

View File

@ -356,6 +356,7 @@ BEGIN
PROMPT 22 7 "" PROMPT 22 7 ""
PICTURE "###.###.###^^^" PICTURE "###.###.###^^^"
FIELD ABBATT FIELD ABBATT
MESSAGE ADD,FL->23
END END
NUMERO 24 NUMERO 24
@ -424,7 +425,7 @@ END
NUMERO 31 NUMERO 31
BEGIN BEGIN
KEY "ALIQUOTA" KEY "ALIQUOTA"
PROMPT 28 9 "" PROMPT 27 9 ""
PICTURE "##@,@@" PICTURE "##@,@@"
FIELD ALIQUOTA FIELD ALIQUOTA
END END
@ -449,7 +450,7 @@ NUMERO 34
BEGIN BEGIN
KEY "IMPONIBILE T.F.R." KEY "IMPONIBILE T.F.R."
PROMPT 57 9 "" PROMPT 57 9 ""
PICTURE "#.###.###.###^^^" PICTURE "###.###.###^^^"
FIELD IMPTFR FIELD IMPTFR
MESSAGE ADD,FL->34 MESSAGE ADD,FL->34
END END
@ -561,6 +562,13 @@ BEGIN
PICTURE "#.###.###.###^^^" PICTURE "#.###.###.###^^^"
END END
NUMERO 23
BEGIN
KEY "ABBATTIMENTO"
PROMPT 22 3 ""
PICTURE "###.###.###^^^"
END
NUMERO 24 NUMERO 24
BEGIN BEGIN
KEY "AMMONTARE NETTO" KEY "AMMONTARE NETTO"

View File

@ -111,7 +111,7 @@ void TBase1::stampa_soci(TPrinter& pr)
sComuneNa.cut(28); sComuneNa.cut(28);
sProvNa=c->file(LF_COMUNI).get("PROVCOM"); sProvNa=c->file(LF_COMUNI).get("PROVCOM");
// fut.field(0).set(sRagsoc); // fut.field(0).set(sRagsoc);
sRagsoc:=fut.field(0).get(); sRagsoc=fut.field(0).get();
if (sRagsoc.len() > 30 && sRagsoc[30] != ' ') if (sRagsoc.len() > 30 && sRagsoc[30] != ' ')
{ {
sCognome=sRagsoc.left(30); sCognome=sRagsoc.left(30);

View File

@ -1751,8 +1751,6 @@ void TStampaQuadro::print(const bool modulaser)
class TQuadroD : public TDicForm class TQuadroD : public TDicForm
{ {
enum { QD_FORMLEN = 72 };
real _totale, _somme, _imponibile, _importo, _netto; real _totale, _somme, _imponibile, _importo, _netto;
bool _devo_sommare; bool _devo_sommare;
@ -2242,8 +2240,6 @@ bool TStampaQuadroD::user_destroy()
class TQuadroD1 : public TDicForm class TQuadroD1 : public TDicForm
{ {
enum { QD_FORMLEN = 72 };
real _totale, _quotapro, _speseant, _imponibile, _importo, _netto; real _totale, _quotapro, _speseant, _imponibile, _importo, _netto;
bool _devo_sommare; bool _devo_sommare;

View File

@ -73,25 +73,27 @@ typedef enum { STARTDOC, STARTDITTA, STARTPAGE, ENDDOC } ModulaserKey;
#define QD_STATO_ESTERO 12 #define QD_STATO_ESTERO 12
// Quadro D // Quadro D
HIDDEN const int QD_FORMLEN = 72; #define QD_FORMLEN 72
HIDDEN const int POS_DITTA = 120; // Colonna del codice ditta a pie' di modulo #define POS_DITTA 120
HIDDEN const int QD_PAGINE = 4; #define QD_PAGINE 4
HIDDEN const int QD_RIGHE_PRIMA = 4; #define QD_RIGHE_PRIMA 4
HIDDEN const int QD_RIGHE_SECONDA = 7; #define QD_RIGHE_SECONDA 7
HIDDEN const int QD_RIGHE_TERZA = 7; #define QD_RIGHE_TERZA 7
HIDDEN const int QD_RIGHE_QUARTA = 7; #define QD_RIGHE_QUARTA 7
HIDDEN const int QD1_RIGHE_PRIMA = 6; #define QD1_RIGHE_PRIMA 6
HIDDEN const int QD1_RIGHE_SECONDA = 9; #define QD1_RIGHE_SECONDA 9
HIDDEN const int QD1_RIGHE_TERZA = 9; #define QD1_RIGHE_TERZA 9
HIDDEN const int QD1_RIGHE_QUARTA = 8; #define QD1_RIGHE_QUARTA 8
HIDDEN const int HEADER_SECONDA = 8; #define HEADER_SECONDA 8
HIDDEN const int HEADER_TERZA = 8; // Sarebbero 9 col righello... #define HEADER_TERZA 8
HIDDEN const int HEADER_QUARTA = 13; // 15 col righello... #define HEADER_QUARTA 13
HIDDEN const int HEADER_D1_SECONDA = 8; #define HEADER_D1_SECONDA 8
HIDDEN const int HEADER_D1_TERZA = 8; #define HEADER_D1_TERZA 8
HIDDEN const int HEADER_D1_QUARTA = 14; #define HEADER_D1_QUARTA 14
#define FIRMADIC 2
typedef enum { PRIMA=1, SECONDA, TERZA, QUARTA } PaginaQuadro; typedef enum { PRIMA=1, SECONDA, TERZA, QUARTA } PaginaQuadro;
typedef enum { fisiche, nofisiche } TipoPagina; typedef enum { fisiche, nofisiche } TipoPagina;
@ -172,6 +174,7 @@ class TDicForm : public TForm
virtual void azzera_totali(); virtual void azzera_totali();
PaginaQuadro curr_page() const { return _PaginaCorrente; } PaginaQuadro curr_page() const { return _PaginaCorrente; }
// TCursor& cur(); // TCursor& cur();
void firma_dichiarante();
void set_progind(TProgind* prog) { _prog = prog; } void set_progind(TProgind* prog) { _prog = prog; }
TProgind* progind() { return _prog; } TProgind* progind() { return _prog; }

View File

@ -93,10 +93,12 @@ int TDipendenti::fill(TCursor& cur)
const long coddec = dip(d).codice_deceduto(); const long coddec = dip(d).codice_deceduto();
if (coddec > 0) // E' un erede! if (coddec > 0) // E' un erede!
{ {
const int posdec = find(coddec); int posdec = find(coddec);
if (posdec >= 0 && posdec != d-1) // Il deceduto esiste if (posdec >= 0 && posdec != d-1) // Il deceduto esiste
{ {
TDipendente* dipen = (TDipendente*)_data.remove(d, TRUE); TDipendente* dipen = (TDipendente*)_data.remove(d, TRUE);
if (d < posdec) // Se l'erede precede il defunto ...
posdec--; // ... il defunto avanza di un posto!
dipen->reset_deceduto(); // Non e' piu' un erede dipen->reset_deceduto(); // Non e' piu' un erede
_data.insert(dipen, posdec+1); // Attaccalo dietro al deceduto _data.insert(dipen, posdec+1); // Attaccalo dietro al deceduto
} }
@ -559,6 +561,18 @@ bool TStampaQuadroB::user_create()
// QUADRO H // QUADRO H
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
long TQuadroH::filtra(const long codditta)
{
TString filtr(32);
filtr.format("(CODDITTA=%ld)&&(H1ANNO=1995)", codditta);
cursor()->setfilter(filtr, TRUE);
const long items = cursor()->items();
return items;
}
void TQuadroH::inc_curr_page() void TQuadroH::inc_curr_page()
{ {
if (_PaginaCorrente == PRIMA) if (_PaginaCorrente == PRIMA)
@ -681,7 +695,8 @@ bool TStampaQuadroH::user_create()
_form = new TQuadroH("77QH", quadro()); _form = new TQuadroH("77QH", quadro());
TString sortkey(80); TString sortkey(80);
sortkey.format("CODDITTA|H1ANNO|H1ENTE"); // sortkey.format("CODDITTA|H1ANNO|H1ENTE");
sortkey.format("CODDITTA|H1ENTE"); // Considera solo in 1995
_cur = new TSorted_cursor(_form->TForm::relation(), sortkey); _cur = new TSorted_cursor(_form->TForm::relation(), sortkey);
return TRUE; return TRUE;

View File

@ -223,6 +223,7 @@ protected:
virtual int prima_riga(PaginaQuadro p) const; virtual int prima_riga(PaginaQuadro p) const;
virtual bool print(const long codditta, const long NumFis, const long NumNoFis); virtual bool print(const long codditta, const long NumFis, const long NumNoFis);
virtual void inc_curr_page(); virtual void inc_curr_page();
virtual long filtra(const long codditta);
public: public:
TQuadroH(const char* form, const char* quadro) : TQuadroA(form, quadro) { } TQuadroH(const char* form, const char* quadro) : TQuadroA(form, quadro) { }