Correzioni varie

git-svn-id: svn://10.65.10.50/trunk@3761 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1996-10-11 15:03:18 +00:00
parent 8dc7c199a2
commit bd05f22fa1
11 changed files with 129 additions and 114 deletions

View File

@ -6,8 +6,8 @@ JOIN 7 TO 9 INTO CODANAGR=CODANAGR
JOIN 8 TO 6 ALIAS 118 INTO CODANAGR=CODANAGR
JOIN 13 TO 8 ALIAS 113 INTO COM=COMNASC
JOIN 13 TO 6 ALIAS 213 INTO COM=COMRF(COMRES)
JOIN 6 TO 36 ALIAS 216 INTO CODANAGR==RAPPR
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR==CODANAGR
JOIN 6 TO 36 ALIAS 216 INTO TIPOA=="F" CODANAGR==RAPPR
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR==CODANAGR
JOIN 13 TO 218@ ALIAS 313 INTO COM==COMNASC
JOIN 13 TO 216@ ALIAS 413 INTO COM==COMRF(COMRES)
JOIN 10 TO 9 INTO CODDITTA==CODDITTA CODATT==CODATTPREV
@ -353,7 +353,6 @@ STRINGA 34
BEGIN
KEY "CAP SEDE LEGALE"
PROMPT 121 17 ""
FIELD 116@->CAPRF
FIELD 116@->CAPRES
GROUP 2
END
@ -709,7 +708,6 @@ BEGIN
KEY "LUOGO CONSERVAZIONE S.C. - COM"
PROMPT 25 39 ""
FIELD 513@->DENCOM
FIEDL 213@->DENCOM
END
STRINGA 80
@ -717,7 +715,6 @@ BEGIN
KEY "LUOGO CONSERVAZIONE S.C. - PROV"
PROMPT 92 39 ""
FIELD 513@->PROVCOM
FIELD 213@->PROVCOM
END
STRINGA 81

View File

@ -591,7 +591,7 @@ END
NUMERO 827
BEGIN
KEY "NUMERO ISCRIZIONE ALBO"
PROMPT 122 18 ""
PROMPT 126 18 ""
FIELD 104@->NISCRAA
PICTURE "#####"
END

View File

@ -8,7 +8,7 @@ JOIN 13 TO 6 ALIAS 213 INTO COM=COMRF(COMRES)
JOIN 6 TO 61 ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
JOIN 13 TO 218@ ALIAS 313 INTO COM=COMNASC
JOIN 13 TO 216@ ALIAS 413 INTO STATO=STATORES COM=COMRES
JOIN 13 TO 216@ ALIAS 413 INTO COM=COMRES
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END
@ -50,14 +50,14 @@ END
STRINGA 1
BEGIN
KEY "CODICE FISCALE"
PROMPT 3 9 ""
PROMPT 3 10 ""
FIELD 116@->COFI
END
STRINGA 2
BEGIN
KEY "RAGIONE SOCIALE"
PROMPT 39 9 ""
PROMPT 39 10 ""
FIELD 116@->RAGSOC
GROUP 2
END
@ -65,7 +65,7 @@ END
STRINGA 3
BEGIN
KEY "COGNOME"
PROMPT 39 9 ""
PROMPT 39 10 ""
FIELD 116@->RAGSOC[1,30]
GROUP 1
END
@ -73,7 +73,7 @@ END
STRINGA 4
BEGIN
KEY "NOME"
PROMPT 17 11 ""
PROMPT 17 12 ""
FIELD 116@->RAGSOC[31,50]
GROUP 1
END
@ -81,7 +81,7 @@ END
STRINGA 5
BEGIN
KEY "SESSO"
PROMPT 59 11 ""
PROMPT 59 12 ""
FIELD 118@->SESSO
GROUP 1
END
@ -89,7 +89,7 @@ END
STRINGA 6
BEGIN
KEY "DATA DI NASCITA"
PROMPT 67 11 ""
PROMPT 63 12 ""
FIELD 118@->DATANASC
GROUP 1
END
@ -97,7 +97,7 @@ END
STRINGA 7
BEGIN
KEY "COMUNE DI NASCITA"
PROMPT 83 11 ""
PROMPT 83 12 ""
FIELD 113@->DENCOM
GROUP 1
END
@ -105,7 +105,7 @@ END
STRINGA 8
BEGIN
KEY "PROV. DI NASCITA"
PROMPT 125 11 ""
PROMPT 125 12 ""
FIELD 113@->PROVCOM
GROUP 1
END
@ -113,21 +113,21 @@ END
STRINGA 10
BEGIN
KEY "COMUNE DI RES.FISCALE"
PROMPT 17 13 ""
PROMPT 17 14 ""
FIELD 213@->DENCOM
END
STRINGA 11
BEGIN
KEY "PROV DI RES.FISCALE"
PROMPT 59 13 ""
PROMPT 59 14 ""
FIELD 213@->PROVCOM
END
STRINGA 12
BEGIN
KEY "VIA di RES."
PROMPT 67 13 ""
PROMPT 67 14 ""
FIELD 116@->INDRF
FIELD 116@->INDRES
FLAGS "H"
@ -137,7 +137,7 @@ END
STRINGA 15
BEGIN
KEY "NUM. CIVICO di RES."
PROMPT 103 13 ""
PROMPT 103 14 ""
FIELD 116@->CIVRF
FIELD 116@->CIVRES
FLAGS "H"
@ -147,13 +147,13 @@ END
STRINGA 17
BEGIN
KEY "VIA + NUM CIV. DI RES."
PROMPT 67 13 ""
PROMPT 67 14 ""
END
STRINGA 16
BEGIN
KEY "CAP"
PROMPT 124 13 ""
PROMPT 124 14 ""
FIELD 116@->CAPRF
FIELD 116@->CAPRES
END
@ -161,13 +161,13 @@ END
STRINGA 13
BEGIN
KEY "CODICE FISCALE DICHIARANTE"
PROMPT 105 16 ""
PROMPT 105 17 ""
END
NUMBER 14
BEGIN
KEY "NUM. FOGLIO"
PROMPT 125 19 ""
PROMPT 125 20 ""
END
END
@ -329,7 +329,7 @@ BEGIN
PROMPT 91 5 ""
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->17
// FIELD 61->IMPONIBILE
FIELD 61->IMPONIBILE
END
NUMBER 18
@ -338,7 +338,7 @@ BEGIN
PROMPT 105 5 ""
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->18
// FIELD 61->RITENUTE
FIELD 61->RITENUTE
END
NUMBER 19
@ -347,7 +347,7 @@ BEGIN
PROMPT 120 5 ""
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->19
// FIELD 61->NETTO
FIELD 61->NETTO
END
END
@ -395,12 +395,5 @@ BEGIN
PROMPT 120 1 ""
PICTURE "###.###.###^^^"
END
STRINGA 2
BEGIN
KEY "FIRMA"
PROMPT 83 5 ""
FIELD 116@->RAGSOC
END
END

View File

@ -8,8 +8,8 @@ JOIN 13 TO 6 ALIAS 213 INTO COM=COMRF(COMRES)
JOIN 6 TO 62 ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
JOIN 13 TO 218@ ALIAS 313 INTO COM=COMNASC
JOIN 13 TO 216@ ALIAS 413 INTO STATO=STATORES COM=COMRES
JOIN 13 TO 216@ ALIAS 513 INTO STATO=""(STATORES) COM=COMRF(COMRES)
JOIN 13 TO 216@ ALIAS 413 INTO COM=COMRES
JOIN 13 TO 216@ ALIAS 513 INTO COM=COMRF(COMRES)
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END
@ -37,7 +37,7 @@ BEGIN
FI 131
END
SECTION HEADER FIRST 20
SECTION HEADER FIRST 19
LISTA 9
BEGIN
@ -348,14 +348,14 @@ END
STRING 15
BEGIN
KEY "DESCR. CAUSALE"
PROMPT 12 7 ""
FIELD 14@->S2
PROMPT 11 7 ""
FIELD 14@->S0[1,20]
END
NUMBER 16
BEGIN
KEY "TOTALE"
PROMPT 26 7 ""
PROMPT 42 7 ""
// FIELD 62->TOTALE
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->16
@ -364,7 +364,7 @@ END
NUMBER 17
BEGIN
KEY "SOMME NON SOGGETTE A RITENUTA"
PROMPT 47 7 ""
PROMPT 61 7 ""
// FIELD 62->SOMME
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->17
@ -373,7 +373,7 @@ END
NUMBER 18
BEGIN
KEY "IMPONIBILE"
PROMPT 67 7 ""
PROMPT 82 7 ""
// FIELD 62->IMPONIBILE
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->18
@ -382,7 +382,7 @@ END
STRING 19
BEGIN
KEY "ALIQUOTA"
PROMPT 84 7 ""
PROMPT 93 7 ""
FIELD 62->PERC
PICTURE "###@@"
END
@ -390,7 +390,7 @@ END
NUMBER 20
BEGIN
KEY "IMPORTO"
PROMPT 100 7 ""
PROMPT 106 7 ""
// FIELD 62->IMPORTO
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->20
@ -399,7 +399,7 @@ END
NUMBER 21
BEGIN
KEY "NETTO"
PROMPT 120 7 ""
PROMPT 126 7 ""
// FIELD 62->NETTO
PICTURE "###.###.###^^^"
MESSAGE ADD,FL->21
@ -407,33 +407,33 @@ END
END
SECTION FOOTER LAST 5
SECTION FOOTER LAST 1
NUMBER 16
BEGIN
KEY "TOTALE TOTALE"
PROMPT 26 1 ""
PROMPT 36 1 ""
PICTURE "###.###.###^^^"
END
NUMBER 17
BEGIN
KEY "TOTALE SOMME NON SOGGETTE"
PROMPT 47 1 ""
PROMPT 55 1 ""
PICTURE "###.###.###^^^"
END
NUMBER 18
BEGIN
KEY "TOTALE IMPONIBILE"
PROMPT 67 1 ""
PROMPT 75 1 ""
PICTURE "###.###.###^^^"
END
NUMBER 20
BEGIN
KEY "TOTALE IMPORTO"
PROMPT 100 1 ""
PROMPT 101 1 ""
PICTURE "###.###.###^^^"
END
@ -444,12 +444,4 @@ BEGIN
PICTURE "###.###.###^^^"
END
STRINGA 2
BEGIN
KEY "FIRMA"
PROMPT 83 5 ""
FIELD 116@->RAGSOC
GROUP 2
END
END

View File

@ -8,8 +8,8 @@ JOIN 13 TO 6 ALIAS 213 INTO COM=COMRF(COMRES)
JOIN 6 TO 63 ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
JOIN 13 TO 218@ ALIAS 313 INTO COM=COMNASC
JOIN 13 TO 216@ ALIAS 413 INTO STATO=STATORES COM=COMRES
JOIN 13 TO 216@ ALIAS 513 INTO STATO=""(STATORES) COM=COMRF(COMRES)
JOIN 13 TO 216@ ALIAS 413 INTO COM=COMRES
JOIN 13 TO 216@ ALIAS 513 INTO COM=COMRF(COMRES)
JOIN %STA TO 216@ ALIAS 24 INTO CODTAB=STATORES
END

View File

@ -45,7 +45,7 @@ END
NUMBER 14
BEGIN
KEY "NUM. FOGLIO"
PROMPT 123 5 ""
PROMPT 123 6 ""
END
END

View File

@ -1,6 +1,6 @@
USE 42
JOIN 37 INTO CODDITTA=CODDITTA
JOIN 9 INTO CODDITTA=CODDITTA
JOIN 37 INTO CODDITTA==CODDITTA
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
@ -23,7 +23,7 @@ BEGIN
FI 131
END
SECTION HEADER FIRST 10
SECTION HEADER FIRST 14
NUMERO 18
BEGIN

View File

@ -45,11 +45,30 @@ TBase1::~TBase1()
delete c;
}
void TBase1::compatta_depositario()
{
TPrint_section& totali = section('B', first_page);
TForm_item& signature = totali.find_field(78);
const int y = signature.y();
TString spazi(50); spazi.fill(' ');
TString cognome = signature.get();
if (cognome.len() > 30 && cognome[29] == ' ')
{
TString nome = cognome.mid(30, -1);
cognome.cut(30); cognome.trim();
cognome << ' ' << nome;
signature.set(cognome);
}
totali.row(y-1).put(spazi, signature.x()-1);
totali.row(y-1).put(cognome, signature.x()-1);
}
void TBase1::stampa_corpo(TPrinter& pr)
{
TPrint_section& body = section('B', first_page);
body.reset();
body.update();
compatta_depositario();
const int body_righe = body.height();
for (int i = 0; i < body_righe; i++)
{
@ -450,17 +469,8 @@ int TRigheQT::fill(const long codditta,TLocalisamfile& qt)
int TRigaPS::compare(const TSortable& s) const
{
const TRigaPS& rec = (const TRigaPS&)s;
TDate dtDataS = rec.dDataVers();
const int month=_dDv.month();
const int year=_dDv.year();
const int da = year - dtDataS.year();
const int dm = month - dtDataS.month();
if (da==0)
return dm;
else
return da;
return _dDv<rec.dDataVers();
const long diff = _dDv-rec.dDataVers();
return (int)diff;
}
TRigaPS::TRigaPS(const TLocalisamfile& qt)
@ -518,10 +528,9 @@ int TBase4::calcola_firma()
cognome.cut(30); cognome.trim();
cognome << ' ' << nome;
signature.set(cognome);
totali.row(y-1).put(spazi, signature.x()-1);
totali.row(y-1).put(cognome, signature.x()-1);
}
totali.row(y-1).put(spazi, signature.x()-1);
totali.row(y-1).put(cognome, signature.x()-1);
return y;
}
@ -991,9 +1000,9 @@ void TQuadroL::stampa_testata(TPrinter& pr)
hh.reset();
TForm_item& nf=hh.find_field(18);
_num_foglio++;
TString fstr(10); fstr << _num_foglio;
nf.set(fstr);
_num_foglio++;
hh.update();
const int hhr = hh.height();
@ -1023,20 +1032,20 @@ bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL)
while (!finito)
{
body.update();
const int body_righe = body.height();
for (int i = 0; i < body_righe; i++)
{
TPrintrow& rr=body.row(i);
pr.print(rr);
rr.reset();
_RigaCorr++;
}
if (usa_progind())
progind()->addstatus(1);
righe++;
++cur;
eof=cur.pos()==cur.items()-1;
finito = (righe==iRecL-1) || eof;
const int body_righe = body.height();
for (int i = 0; i < body_righe; i++)
{
TPrintrow& rr=body.row(i);
pr.print(rr);
rr.reset();
_RigaCorr++;
}
if (usa_progind())
progind()->addstatus(1);
righe++;
++cur;
eof=cur.pos()==cur.items()-1;
finito = (righe==iRecL) || eof;
}
return eof;
}
@ -1066,6 +1075,7 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
{
TCursor* cur = cursor();
TPrinter& pr = printer();
_num_foglio=0;
if (!InitPrint(codditta))
return FALSE;
@ -1081,25 +1091,28 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
else
cur->setkey(2);
pr.formlen(dic_form_len());
int lOffsetL=_START_AGG_L;
bool finito=FALSE;
while (!finito)
{
jump_to_line(pr, prima_riga(PRIMA));
stampa_testata(pr);
finito=stampa_L(pr,lOffsetL,_REC_PRIMA_AGG_L);
next_page(pr);
if (!finito)
{
lOffsetL+=_REC_PRIMA_AGG_L;
jump_to_line(pr, prima_riga(SECONDA));
finito=stampa_L(pr,lOffsetL,_REC_SECONDA_AGG_L);
}
if (finito)
{
jump_to_line(pr,_RIGA_TOTALI_AGG_L);
stampa_totali_L(pr);
}
jump_to_line(pr, prima_riga(PRIMA));
stampa_testata(pr);
finito=stampa_L(pr,lOffsetL,_REC_PRIMA_AGG_L);
next_page(pr);
_PaginaPosizionamento=FALSE;
pr.formlen(dic_form_len());
if (!finito)
{
lOffsetL+=_REC_PRIMA_AGG_L;
jump_to_line(pr, prima_riga(SECONDA));
finito=stampa_L(pr,lOffsetL,_REC_SECONDA_AGG_L);
}
if (finito)
{
jump_to_line(pr,_RIGA_TOTALI_AGG_L);
stampa_totali_L(pr);
}
next_page(pr);
}
close_print();
@ -1143,9 +1156,9 @@ void TQuadroN::stampa_testata(TPrinter& pr)
hh.reset();
TForm_item& nf=hh.find_field(12);
_num_foglio++;
TString fstr(10); fstr << _num_foglio;
nf.set(fstr);
_num_foglio++;
hh.update();
const int hhr = hh.height();
@ -1428,6 +1441,7 @@ bool TQuadroN::print(const long codditta, const long NumFis, const long NumNoFis
{
TCursor* cur = cursor();
TPrinter& pr = printer();
_num_foglio=0;
_codditta=codditta;
if (!InitPrint(codditta))
return FALSE;

View File

@ -15,6 +15,7 @@ class TBase1 : public TDicForm
bool _bAllegSoci;
long iContaSoci();
protected:
void compatta_depositario();
void stampa_corpo(TPrinter& pr);
void stampa_soci(TPrinter& pr);
bool bAllegSoci() const { return _bAllegSoci; }

View File

@ -1124,10 +1124,10 @@ void TDistintaG::next_page(TPrinter& pr)
{
PaginaQuadro PagCorr = curr_page();
if (PagCorr == PRIMA)
jump_to_line(pr,57);
jump_to_line(pr,58);
else
if (PagCorr == SECONDA)
jump_to_line(pr,51);
jump_to_line(pr,52);
stampa_totali(pr);
TPrint_section& body = section('F', last_page);
body.reset();
@ -1205,7 +1205,9 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
_RigaCorr = 0;
const long items = filtra(codditta);
// Questo modulo non ha MAI il posizionamento
_PaginaPosizionamento=FALSE;
while (!_EndPrintDitta)
{
for (int pagina=1; pagina <= QGD_PAGINE; pagina++, next_page(pr))
@ -1216,6 +1218,8 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
{
if (_modulaser) ClearFlagModulaser();
if (_EndPrintDitta) continue;
for (int righe=0; righe < QGD_RIGHE_PRIMA; righe++)
{
// Stampa intestazione, solo sul primo foglio.
@ -1225,8 +1229,9 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
stampa_testata(pr);
}
_EndPrintDitta=_finite_fis && _finite_nofis;
_EndPrintDitta=(_finite_fis && _finite_nofis) ||
cur->pos() >= cur->items()-1;
if (_finite_fis || StabilitaInesistenzaFis)
break;
@ -1282,6 +1287,7 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
if (_PaginaCorrente == SECONDA)
{
if (_EndPrintDitta) continue;
// Reset del flag di pagina con posiz.
if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE;
for (int righe=0; righe < QGD_RIGHE_SECONDA; righe++)
@ -1293,6 +1299,9 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
if (!righe)
fill_page(pr, HEADER_SECONDA_GD);
_EndPrintDitta=(_finite_fis && _finite_nofis) ||
(StabilitaInesistenzaNoFis && StabilitaInesistenzaFis);
if (_finite_nofis || StabilitaInesistenzaNoFis)
break;
@ -1323,6 +1332,9 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
// Gestisce i casi in cui non ci sono percipienti nella distinta..
if (items==0) _EndPrintDitta=TRUE;
_EndPrintDitta=(_finite_fis && _finite_nofis) ||
cur->pos() >= cur->items()-1;
if (StabilitaInesistenzaNoFis)
break;
@ -4030,6 +4042,10 @@ int stampa_quadro(int argc, char* argv[])
{
app = new TStampaQuadroAggL(quadro, livello);
}
else if (quadro == "N")
{
app = new TStampaQuadroAggN(quadro, livello);
}
if (app != NULL)
{

View File

@ -100,6 +100,8 @@ typedef enum { fisiche, nofisiche } TipoPagina;
const char* get_ragsoc_anagr(char tipo, long codanagr);
const int FIRMADIC=2;
class TDicForm : public TForm
{
private:
@ -129,7 +131,7 @@ class TDicForm : public TForm
long _codditta, _codditta_dic; // cod.ditta e cod.ditta dichiarante
int _RigaCorr; // contatore riga corrente
TString16 _quadro; // codice quadro in stampa
void firma_dichiarante();
void stampa_testata(TPrinter& pr);
virtual bool ultima_pagina() const { return _PaginaCorrente==QUARTA; }
virtual void stampa_totali(TPrinter& pr);