From 35cab217727f2c564af26625a420da2bbb292eb1 Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 23 Sep 1996 07:05:55 +0000 Subject: [PATCH] Stampa base git-svn-id: svn://10.65.10.50/trunk@3640 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- m770/771230f.uml | 2 +- m770/771300a.uml | 5 +- m770/774200.cpp | 10 +- m770/77base1.frm | 192 +++-- m770/77base2.frm | 168 ++-- m770/77base3.frm | 9 +- m770/77base4.frm | 148 +--- m770/77stba.cpp | 2002 +++++++++++++++++++++++----------------------- m770/77stba.h | 577 ++++++------- m770/77stq.cpp | 35 +- m770/77stq.h | 3 +- m770/menu_st.uml | 2 +- 12 files changed, 1577 insertions(+), 1576 deletions(-) diff --git a/m770/771230f.uml b/m770/771230f.uml index f64a3ef46..058e95c68 100755 --- a/m770/771230f.uml +++ b/m770/771230f.uml @@ -143,7 +143,7 @@ BEGIN FIELD LF_QUAC->CONTSSN PICTURE "." FLAGS "R" -// MESSAGE K_TAB,F_IMPONIBILE|K_TAB,F_RITENUTE|K_TAB,F_NETTO + MESSAGE K_TAB,F_IMPONIBILE|K_TAB,F_RITENUTE|K_TAB,F_NETTO END TEXT DLG_NULL diff --git a/m770/771300a.uml b/m770/771300a.uml index 8a402ff31..6c0ce59c0 100755 --- a/m770/771300a.uml +++ b/m770/771300a.uml @@ -654,11 +654,12 @@ BEGIN FLAGS "R" END -NUMBER F_C0CRIMPRAS 5 +NUMBER F_C0CRIMPRAS 15 BEGIN PROMPT 41 11 "Cred.imp.pre.assun. " HELP "Credito d'imposta premio d'assunzione" - FIELD LF_BASE->C0CRIMPRAS + FIELD LF_BASE->C0CRIMPRAS + PICTURE "." FLAGS "R" END diff --git a/m770/774200.cpp b/m770/774200.cpp index 6b8ac3c13..56210b19f 100755 --- a/m770/774200.cpp +++ b/m770/774200.cpp @@ -709,12 +709,12 @@ void TRiporti::calcola_riporti_A(TCursor* cur, const long dich) long dipendenti,num_rec; real a0cobb,a0cnet,a0eprev,a0iitra,a0cter,a0timp,a0ilor,a0tdet,a0rter,a0rdat; - real a0erit,a0carr,a0aarr,a0darr,a0rarr,a0cinps,a0ciiaut,a0crimpras; + real a0erit,a0carr,a0aarr,a0darr,a0rarr,a0cinps,a0ciiaut,a0crimpras,a0incdet; a0cobb = ZERO; a0cnet = ZERO; a0eprev = ZERO; a0iitra = ZERO; a0cter = ZERO; a0timp = ZERO; a0ilor = ZERO; a0tdet = ZERO; a0rter = ZERO; a0rdat = ZERO; a0erit = ZERO; a0carr = ZERO; a0aarr = ZERO; a0darr = ZERO; a0rarr = ZERO; - a0cinps = ZERO; a0ciiaut = ZERO; a0crimpras = ZERO; + a0cinps = ZERO; a0ciiaut = ZERO; a0crimpras = a0incdet = ZERO; dipendenti = 0; num_rec = 0; @@ -777,10 +777,11 @@ void TRiporti::calcola_riporti_A(TCursor* cur, const long dich) a0rter += cur->curr().get_real(QUA_AMRIOT); a0rdat += cur->curr().get_real(QUA_AMRIODL); a0erit += cur->curr().get_real(QUA_ECCRITRIMB); - a0carr += cur->curr().get_real(QUA_COBBDIP); + a0carr += cur->curr().get_real("COBBDIP2"); // cas.46 a0aarr += cur->curr().get_real(QUA_AMMIMP); a0darr += cur->curr().get_real(QUA_DETIMPOS); - a0rarr += cur->curr().get_real(QUA_RITESEG); + a0rarr += cur->curr().get_real(QUA_RITESEG); + a0incdet += cur->curr().get_real("INCDETFC"); // cas.38 } } @@ -816,6 +817,7 @@ void TRiporti::calcola_riporti_A(TCursor* cur, const long dich) base.put(BSE_A0AARR, a0aarr); base.put(BSE_A0DARR, a0darr); base.put(BSE_A0RARR, a0rarr); + base.put("A0INCDET", a0incdet); base.rewrite(); TLocalisamfile basebis(LF_BASEBIS); basebis.setkey(1); diff --git a/m770/77base1.frm b/m770/77base1.frm index 7f5ecad69..eaeb4ebbe 100755 --- a/m770/77base1.frm +++ b/m770/77base1.frm @@ -7,11 +7,11 @@ 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 6 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 +JOIN 6 TO 36 ALIAS 216 INTO 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 JOIN 6 TO 10 ALIAS 316 INTO TIPOA=TIPOADS CODANAGR=CODANGRDS JOIN 13 TO 10 ALIAS 513 INTO COM==COMCS END @@ -21,8 +21,9 @@ BEGIN 36->* "Base 770" 37->* "Basebis 770" 9->* "Ditte" - 6->* "LF_ANAG Anagrafica persone fisiche e giuridiche" - 8->* "Anagrafica persone fisiche" + 6->* "LF_ANAG" + 7->* "GIURIDICHE" + 8->* "FISICHE" 10->* "ATTIV" 116@->* "Comuni" 118@->* "Comuni" @@ -60,7 +61,7 @@ END LISTA 3 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 94 1 "" + PROMPT 92 1 "" ITEM "|" ITEM "1|X" ITEM "2|" @@ -72,7 +73,7 @@ END LISTA 4 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 102 1 "" + PROMPT 100 1 "" ITEM "|" ITEM "1|" ITEM "2|X" @@ -84,7 +85,7 @@ END LISTA 5 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 111 1 "" + PROMPT 110 1 "" ITEM "|" ITEM "1|" ITEM "2|" @@ -120,7 +121,8 @@ END LISTA 9 BEGIN KEY "SESSO M" - PROMPT 122 3 "" + PROMPT 120 3 "" + ITEM " | " ITEM "M|X" ITEM "F|" FIELD 118@->SESSO @@ -131,6 +133,7 @@ LISTA 10 BEGIN KEY "SESSO F" PROMPT 130 3 "" + ITEM " | " ITEM "M|" ITEM "F|X" FIELD 118@->SESSO @@ -162,11 +165,15 @@ BEGIN GROUP 1 END -STRINGA 14 +LISTA 14 BEGIN KEY "EVENTI ECCEZIONALI" PROMPT 130 5 "" FIELD 116@->EVECC + ITEM " | " + ITEM "1|X" + ITEM "2| " + ITEM "3|X" GROUP 1 END @@ -181,7 +188,7 @@ END STRINGA 16 BEGIN KEY "PROV DI RES.FISCALE" - PROMPT 102 7 "" + PROMPT 103 7 "" FIELD 213@->PROVCOM GROUP 1 END @@ -210,26 +217,29 @@ BEGIN PROMPT 82 9 "" FIELD 116@->CIVRF FIELD 116@->CIVRES + GROUP 1 END STRINGA 20 BEGIN KEY "TELEFONO - PREFISSO" - PROMPT 100 9 "" + PROMPT 102 9 "" FIELD 116@->PTELRF + GROUP 1 END STRINGA 21 BEGIN KEY "TELEFONO - NUMERO" - PROMPT 112 9 "" + PROMPT 114 9 "" FIELD 116@->TELRF + GROUP 1 END STRINGA 22 BEGIN KEY "GRUPPO 2 - ALTRI SOGGETTI - CODICE FISCALE" - PROMPT 25 12 "" + PROMPT 25 11 "" FIELD 116@->COFI GROUP 2 END @@ -237,7 +247,7 @@ END LISTA 23 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 95 12 "" + PROMPT 93 11 "" ITEM "|" ITEM "1|X" ITEM "2|" @@ -249,7 +259,7 @@ END LISTA 24 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 103 12 "" + PROMPT 101 11 "" ITEM "|" ITEM "1|" ITEM "2|X" @@ -261,7 +271,7 @@ END LISTA 25 BEGIN KEY "REG.A.STATUTO.SPECIALE VA - SA -SI" - PROMPT 112 12 "" + PROMPT 109 11 "" ITEM "|" ITEM "1|" ITEM "2|" @@ -273,7 +283,7 @@ END STRINGA 26 BEGIN KEY "CODICE ATTIVITA" - PROMPT 121 12 "" + PROMPT 121 11 "" FIELD 9->CODATTPREV GROUP 2 END @@ -281,16 +291,20 @@ END STRINGA 27 BEGIN KEY "RAGIONE SOCIALE" - PROMPT 25 14 "" + PROMPT 25 13 "" FIELD 116@->RAGSOC GROUP 2 END -STRINGA 28 +LISTA 28 BEGIN KEY "EVENTI ECCEZIONALI" - PROMPT 128 14 "" + PROMPT 130 13 "" FIELD 116@->EVECC + ITEM " | " + ITEM "1|X" + ITEM "2| " + ITEM "3|X" GROUP 2 END @@ -303,7 +317,7 @@ END STRING 30 BEGIN KEY "COMUNE SEDE LEGALE " - PROMPT 41 16 "" + PROMPT 41 15 "" FIELD 413@->DENCOM GROUP 2 END @@ -311,7 +325,7 @@ END STRING 31 BEGIN KEY "PROV. SEDE LEGALE" - PROMPT 122 16 "" + PROMPT 122 15 "" FIELD 413@->PROVCOM GROUP 2 END @@ -319,9 +333,11 @@ END STRING 32 BEGIN KEY "VIA SEDE LEGALE" - PROMPT 39 19 "" - FIELD 216@->INDRES[1,18] + PROMPT 41 17 "" + FIELD 116@->INDRES[1,18] + MESSAGE COPY,35 FLAGS "H" + GROUP 2 END STRING 33 @@ -329,30 +345,30 @@ BEGIN KEY "NUM.CIV" PROMPT 93 4 "" FLAGS "H" - FIELD 216@->CIVRES - MESSAGE APPEND,12 + FIELD 116@->CIVRES + MESSAGE APPEND,35 END -STRING 34 +STRINGA 34 BEGIN - KEY "VIA SEDE LEGALE" - PROMPT 39 19 "" - GROUP 2 -END - -STRINGA 35 -BEGIN - KEY "CAP" - PROMPT 119 19 "" + KEY "CAP SEDE LEGALE" + PROMPT 121 17 "" FIELD 116@->CAPRF FIELD 116@->CAPRES GROUP 2 END +STRING 35 +BEGIN + KEY "VIA SEDE LEGALE" + PROMPT 41 17 "" + GROUP 2 +END + STRING 36 BEGIN KEY "COMUNE DI RESIDENZA FISCALE" - PROMPT 41 20 "" + PROMPT 41 19 "" FIELD 413@->DENCOM GROUP 2 END @@ -360,7 +376,7 @@ END STRING 37 BEGIN KEY "PROV. RESIDENZA FISCALE" - PROMPT 121 20 "" + PROMPT 122 19 "" FIELD 413@->PROVCOM GROUP 2 END @@ -368,10 +384,10 @@ END STRING 38 BEGIN KEY "VIA RESIDENZA FISCALE" - PROMPT 39 22 "" - FIELD 216@->INDRES[1,18] + PROMPT 39 21 "" + FIELD 116@->INDRF[1,18] FLAGS "H" - MESSAGE COPY,12 + MESSAGE COPY,40 END STRING 39 @@ -379,21 +395,21 @@ BEGIN KEY "NUM.CIV" PROMPT 93 4 "" FLAGS "H" - FIELD 216@->CIVRES - MESSAGE APPEND,12 + FIELD 116@->CIVRF + MESSAGE APPEND,40 END STRING 40 BEGIN KEY "VIA RES FISCALE" - PROMPT 39 22 "" + PROMPT 41 21 "" GROUP 2 END STRINGA 41 BEGIN KEY "CAP" - PROMPT 121 22 "" + PROMPT 122 21 "" FIELD 116@->CAPRF GROUP 2 END @@ -401,23 +417,25 @@ END STRINGA 42 BEGIN KEY "DATA APP.BILANCIO gg-mm-aaa" - PROMPT 29 25 "" + PROMPT 33 23 "" PICTURE "## ^ ##^^###" + FIELD 7->DATAAPPBIL GROUP 2 END STRINGA 43 BEGIN KEY "Termine per APP.BILANCIO gg-mm-aaa" - PROMPT 88 25 "" + PROMPT 93 23 "" PICTURE "## ^ ##^^###" + FIELD 7->DATATAPPBI GROUP 2 END STRINGA 48 BEGIN KEY "STATO" - PROMPT 31 26 "" + PROMPT 31 25 "" FIELD 7->STATOSOC GROUP 2 END @@ -425,30 +443,39 @@ END STRINGA 49 BEGIN KEY "NAT.GIURIDICA" - PROMPT 51 26 "" + PROMPT 53 25 "" FIELD 7->NATGIU GROUP 2 END -STRINGA 50 +LISTAA 50 BEGIN KEY "SITUAZIONE" - PROMPT 75 26 "" + PROMPT 75 25 "" FIELD 7->SITSOC + ITEM " | " + ITEM "1|1" + ITEM "2|2" + ITEM "3|3" + ITEM "4| " + ITEM "5|4" + ITEM "6|5" GROUP 2 END STRINGA 51 BEGIN KEY "TELEFONO - PREF" - PROMPT 99 27 "" + PROMPT 102 25 "" + FIELD 116@->PTELRF GROUP 2 END STRINGA 52 BEGIN KEY "TELEFONO - NUMERO" - PROMPT 110 27 "" + PROMPT 113 25 "" + FIELD 116@->TELRF GROUP 2 END @@ -562,7 +589,7 @@ LISTA 63 BEGIN KEY "RAPP.SESSO" PROMPT 121 31 "" - ITEM " |" + ITEM " | " ITEM "M|X" ITEM "F|" FIELD 218@->SESSO @@ -572,7 +599,7 @@ LISTA 64 BEGIN KEY "RAPP.SESSO" PROMPT 129 31 "" - ITEM " |" + ITEM " | " ITEM "M|" ITEM "F|X" FIELD 218@->SESSO @@ -628,58 +655,75 @@ BEGIN PROMPT 42 37 "" FIELD 216@->INDRF FIELD 216@->INDRES + FLAGS "H" + MESSAGE COPY,75 +END + +STRING 74 +BEGIN + KEY "NUM.CIV" + PROMPT 93 4 "" + FLAGS "H" + FIELD 216@->CIVRF + MESSAGE APPEND,75 END -STRINGA 74 +STRINGA 75 +BEGIN + KEY "IND RES" + PROMPT 42 37 "" +END + +STRINGA 76 BEGIN KEY "TELEFONO PREFISSO" PROMPT 99 37 "" FIELD 216@->PTELRF END -STRINGA 75 +STRINGA 77 BEGIN KEY "TELEFONO NUMERO" - PROMPT 111 37 "" + PROMPT 113 37 "" FIELD 216@->TELRF END -STRINGA 76 +STRINGA 78 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - NOME" PROMPT 25 38 "" FIELD 316@->RAGSOC END -STRINGA 77 +STRINGA 79 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - COM" PROMPT 25 39 "" FIELD 513@->DENCOM END -STRINGA 78 +STRINGA 80 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - PROV" PROMPT 92 39 "" FIELD 513@->PROVCOM END -STRINGA 79 +STRINGA 81 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - VIA" PROMPT 25 40 "" FIELD 10->INDCS END -STRINGA 80 +STRINGA 82 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - CIV" PROMPT 82 40 "" FIELD 10->CIVCS END -STRINGA 81 +STRINGA 83 BEGIN KEY "LUOGO CONSERVAZIONE S.C. - CAP" PROMPT 112 40 "" @@ -693,43 +737,43 @@ SECTION FOOTER FIRST 4 STRINGA 82 BEGIN KEY "AMMIN. 1 NOME" - PROMPT 25 1 "" + PROMPT 24 1 "" END STRINGA 83 BEGIN KEY "AMMIN. 1 SESSO" - PROMPT 52 1 "" + PROMPT 54 1 "" END STRINGA 84 BEGIN KEY "AMMIN. 1 COMUNENA" - PROMPT 56 1 "" + PROMPT 58 1 "" END STRINGA 85 BEGIN KEY "AMMIN. 1 PROVNA" - PROMPT 81 1 "" + PROMPT 83 1 "" END STRINGA 86 BEGIN KEY "AMMIN. 1 DATANA" - PROMPT 87 1 "" + PROMPT 89 1 "" END STRINGA 87 BEGIN KEY "AMMIN. 1 CODFIS" - PROMPT 100 1 "" + PROMPT 102 1 "" END STRINGA 88 BEGIN KEY "AMMIN. 1 QUALIFICA" - PROMPT 127 1 "" + PROMPT 130 1 "" END END diff --git a/m770/77base2.frm b/m770/77base2.frm index 8a1745cea..88a84a28d 100755 --- a/m770/77base2.frm +++ b/m770/77base2.frm @@ -31,7 +31,7 @@ END NUMERO 2 BEGIN KEY "I1-2" - PROMPT 38 1 "" + PROMPT 36 1 "" PICTURE "##.###" FIELD 36->A0NLDIP END @@ -71,7 +71,7 @@ END NUMERO 7 BEGIN KEY "I2-7 Compensi da terzi" - PROMPT 23 3 "" + PROMPT 27 3 "" PICTURE "###.###.###.###^^^" FIELD 36->A0CTER END @@ -103,7 +103,7 @@ END NUMERO 11 BEGIN KEY "I2-11 Incremento detrazioni" - PROMPT 116 5 "" + PROMPT 116 3 "" PICTURE "###.###.###.###^^^" FIELD 36->A0INCDET END @@ -111,7 +111,7 @@ END NUMERO 12 BEGIN KEY "I3-12 Ritenute da terzi" - PROMPT 23 5 "" + PROMPT 27 5 "" PICTURE "###.###.###.###^^^" FIELD 36->A0RTER END @@ -151,7 +151,7 @@ END NUMERO 17 BEGIN KEY "I4-17 Detrazioni arretrati" - PROMPT 23 7 "" + PROMPT 27 7 "" PICTURE "###.###.###.###^^^" FIELD 36->A0DARR END @@ -191,7 +191,7 @@ END NUMERO 22 BEGIN KEY "I5-22 Rit.operate SI" - PROMPT 23 9 "" + PROMPT 27 9 "" PICTURE "###.###.###.###^^^" FIELD 36->A0RITSI END @@ -224,15 +224,15 @@ NUMERO 26 BEGIN KEY "I5-26 Num.assistiti da datore di lavoro" PROMPT 116 9 "" - PICTURE "###.###.###.###^^^" + PICTURE "#.###" FIELD 36->A0NADLAV END NUMERO 27 BEGIN KEY "I6-27 Num.ass.CAAF" - PROMPT 23 11 "" - PICTURE "###.###.###.###^^^" + PROMPT 27 11 "" + PICTURE "#.###" FIELD 36->A0NACAAF END @@ -247,7 +247,7 @@ END NUMERO 29 BEGIN KEY "I7-2 N.percipienti" - PROMPT 38 13 "" + PROMPT 36 13 "" PICTURE "##.###" FIELD 36->A3NUMPER END @@ -279,7 +279,7 @@ END NUMERO 33 BEGIN KEY "I8-2 N.dip." - PROMPT 38 15 "" + PROMPT 36 15 "" PICTURE "##.###" FIELD 36->B0NLDIP END @@ -319,7 +319,7 @@ END NUMERO 38 BEGIN KEY "I9-7 Altr.ind.erog. 74-94" - PROMPT 23 17 "" + PROMPT 27 17 "" PICTURE "###.###.###.###^^^" FIELD 36->B0AI7492 END @@ -359,7 +359,7 @@ END NUMERO 43 BEGIN KEY "I10-12 Ritenute operate SA" - PROMPT 23 19 "" + PROMPT 27 19 "" PICTURE "###.###.###.###^^^" FIELD 36->B0ROPESA END @@ -407,7 +407,7 @@ END NUMERO 49 BEGIN KEY "I11-2 N.dip." - PROMPT 38 21 "" + PROMPT 36 21 "" PICTURE "##.###" FIELD 36->B1NPER END @@ -447,7 +447,7 @@ END NUMERO 54 BEGIN KEY "I12-2 N.dip." - PROMPT 38 23 "" + PROMPT 36 23 "" PICTURE "##.###" FIELD 36->C0NLASS END @@ -487,7 +487,7 @@ END NUMERO 59 BEGIN KEY "I13-7 Cred.imp.impr.autot." - PROMPT 23 25 "" + PROMPT 27 25 "" PICTURE "###.###.###.###^^^" FIELD 36->C0CIIAUT END @@ -511,7 +511,7 @@ END NUMERO 62 BEGIN KEY "I14-2 N.dip." - PROMPT 38 27 "" + PROMPT 36 27 "" PICTURE "##.###" FIELD 36->D0NLAUT END @@ -551,7 +551,7 @@ END NUMERO 67 BEGIN KEY "I15-7 Cred.imp.pre.assun. " - PROMPT 23 27 "" + PROMPT 27 29 "" PICTURE "###.###.###.###^^^" FIELD 36->D0CRIMPRAS END @@ -559,7 +559,7 @@ END NUMERO 68 BEGIN KEY "I15-8 Cred.imp.ex L.85/95 " - PROMPT 50 27 "" + PROMPT 50 29 "" PICTURE "###.###.###.###^^^" FIELD 36->D0CRIMP85 END @@ -567,7 +567,7 @@ END NUMERO 69 BEGIN KEY "I16-1 N.fogli" - PROMPT 23 29 "" + PROMPT 23 31 "" PICTURE "##.###" FIELD 36->D1NFCOM END @@ -575,7 +575,7 @@ END NUMERO 70 BEGIN KEY "I16-2 N.dip." - PROMPT 38 29 "" + PROMPT 36 31 "" PICTURE "##.###" FIELD 36->D1NPER END @@ -583,7 +583,7 @@ END NUMERO 71 BEGIN KEY "I16-3 Ammont.corris.totale" - PROMPT 50 29 "" + PROMPT 50 31 "" PICTURE "###.###.###.###^^^" FIELD 36->D1TACOR END @@ -591,7 +591,7 @@ END NUMERO 72 BEGIN KEY "I16-4 Somme non sogg.rit. " - PROMPT 72 29 "" + PROMPT 72 31 "" PICTURE "###.###.###.###^^^" FIELD 36->D1SNSRIT END @@ -599,7 +599,7 @@ END NUMERO 73 BEGIN KEY "I16-5 Ritenute operate " - PROMPT 94 29 "" + PROMPT 94 31 "" PICTURE "###.###.###.###^^^" FIELD 36->D1ROPE END @@ -607,7 +607,7 @@ END NUMERO 74 BEGIN KEY "I16-6 Cred.imp.pre.assun. " - PROMPT 116 29 "" + PROMPT 116 31 "" PICTURE "###.###.###.###^^^" FIELD 36->D1CRIMPRAS END @@ -615,7 +615,7 @@ END NUMERO 75 BEGIN KEY "I17-1 N.fogli" - PROMPT 23 31 "" + PROMPT 23 33 "" PICTURE "##.###" FIELD 37->E0NFCOM END @@ -623,7 +623,7 @@ END NUMERO 76 BEGIN KEY "I17-2 N.dip." - PROMPT 38 31 "" + PROMPT 36 33 "" PICTURE "##.###" FIELD 37->E0NPER END @@ -631,7 +631,7 @@ END NUMERO 77 BEGIN KEY "I17-3 Ammontare imponibile" - PROMPT 50 31 "" + PROMPT 50 33 "" PICTURE "###.###.###.###^^^" FIELD 37->E0AIMP END @@ -639,7 +639,7 @@ END NUMERO 78 BEGIN KEY "I17-4 Ritenute operate " - PROMPT 72 31 "" + PROMPT 72 33 "" PICTURE "###.###.###.###^^^" FIELD 37->E0ROPE END @@ -647,7 +647,7 @@ END NUMERO 79 BEGIN KEY "I17-5 Somme non sogg.rit. " - PROMPT 94 31 "" + PROMPT 94 33 "" PICTURE "###.###.###.###^^^" FIELD 37->E0SNSRIT END @@ -655,7 +655,7 @@ END NUMERO 80 BEGIN KEY "I17-6 Cred.imp.pre.assun. " - PROMPT 116 31 "" + PROMPT 116 33 "" PICTURE "###.###.###.###^^^" FIELD 37->E0CRIMPRAS END @@ -663,7 +663,7 @@ END NUMERO 81 BEGIN KEY "I18-1 N.fogli" - PROMPT 23 33 "" + PROMPT 23 35 "" PICTURE "##.###" FIELD 37->E1NFCOM END @@ -671,7 +671,7 @@ END NUMERO 82 BEGIN KEY "I18-2 N.dip." - PROMPT 38 33 "" + PROMPT 36 35 "" PICTURE "##.###" FIELD 37->E1NPER END @@ -679,7 +679,7 @@ END NUMERO 83 BEGIN KEY "I18-3 Somme corrisposte " - PROMPT 50 33 "" + PROMPT 50 35 "" PICTURE "###.###.###.###^^^" FIELD 37->E1SCOR END @@ -687,7 +687,7 @@ END NUMERO 84 BEGIN KEY "I18-4 Base commisurazione " - PROMPT 72 33 "" + PROMPT 72 35 "" PICTURE "###.###.###.###^^^" FIELD 37->E1BCOM END @@ -695,7 +695,7 @@ END NUMERO 85 BEGIN KEY "I18-5 Ritenute operate " - PROMPT 94 33 "" + PROMPT 94 35 "" PICTURE "###.###.###.###^^^" FIELD 37->E1ROPE END @@ -703,7 +703,7 @@ END NUMERO 86 BEGIN KEY "I18-6 Ammontare compless. " - PROMPT 116 33 "" + PROMPT 116 35 "" PICTURE "###.###.###.###^^^" FIELD 37->E1ACOM END @@ -711,7 +711,7 @@ END NUMERO 87 BEGIN KEY "I19-7 Base commisurazione " - PROMPT 23 35 "" + PROMPT 27 37 "" PICTURE "###.###.###.###^^^" FIELD 37->E1BCOM2 END @@ -719,7 +719,7 @@ END NUMERO 88 BEGIN KEY "I19-8 Ritenute operate " - PROMPT 50 35 "" + PROMPT 50 37 "" PICTURE "###.###.###.###^^^" FIELD 37->E1ROPE2 END @@ -727,7 +727,7 @@ END NUMERO 89 BEGIN KEY "I19-9 Cred.imp.pre.assun. " - PROMPT 72 35 "" + PROMPT 72 37 "" PICTURE "###.###.###.###^^^" FIELD 37->E1CRIMPRAS END @@ -735,7 +735,7 @@ END NUMERO 90 BEGIN KEY "I20-1 N.fogli" - PROMPT 23 37 "" + PROMPT 23 39 "" PICTURE "##.###" FIELD 37->E2NFCOM END @@ -743,7 +743,7 @@ END NUMERO 91 BEGIN KEY "I20-2 N.dip." - PROMPT 38 37 "" + PROMPT 36 39 "" PICTURE "##.###" FIELD 37->E2NPER END @@ -751,7 +751,7 @@ END NUMERO 92 BEGIN KEY "I20-3 Somme sogg. ritenute " - PROMPT 50 37 "" + PROMPT 50 39 "" PICTURE "###.###.###.###^^^" FIELD 37->E2SSRIT END @@ -759,7 +759,7 @@ END NUMERO 93 BEGIN KEY "I20-4 Ritenute operate " - PROMPT 72 37 "" + PROMPT 72 39 "" PICTURE "###.###.###.###^^^" FIELD 37->E2ROPE END @@ -767,7 +767,7 @@ END NUMERO 94 BEGIN KEY "I20-5 Cred.imp.pre.assun. " - PROMPT 94 37 "" + PROMPT 94 39 "" PICTURE "###.###.###.###^^^" FIELD 37->E2CRIMPRAS END @@ -775,7 +775,7 @@ END NUMERO 95 BEGIN KEY "I21-1 Som.sog.rit.(pros.A)" - PROMPT 23 39 "" + PROMPT 27 41 "" PICTURE "###.###.###.###^^^" FIELD 37->F0SRITA END @@ -783,7 +783,7 @@ END NUMERO 96 BEGIN KEY "I21-2 Rit.operate(pros.A) " - PROMPT 50 39 "" + PROMPT 50 41 "" PICTURE "###.###.###.###^^^" FIELD 37->F0ROPEA END @@ -791,7 +791,7 @@ END NUMERO 97 BEGIN KEY "I21-3 Tot.acconti (pros.A)" - PROMPT 72 39 "" + PROMPT 72 41 "" PICTURE "###.###.###.###^^^" FIELD 37->F0TACCA END @@ -799,7 +799,7 @@ END NUMERO 98 BEGIN KEY "I21-4 Ecc.dim.acc.(pros.A)" - PROMPT 94 39 "" + PROMPT 94 41 "" PICTURE "###.###.###.###^^^" FIELD 37->F0EDACCA END @@ -807,7 +807,7 @@ END NUMERO 99 BEGIN KEY "I21-5 Ecc. rimbor.(pros.A)" - PROMPT 116 39 "" + PROMPT 116 41 "" PICTURE "###.###.###.###^^^" FIELD 37->F0ERIMA END @@ -815,7 +815,7 @@ END NUMERO 100 BEGIN KEY "I22-6 Somme sog.VA(pros.A)" - PROMPT 23 41 "" + PROMPT 27 43 "" PICTURE "###.###.###.###^^^" FIELD 37->F0SSVA END @@ -823,7 +823,7 @@ END NUMERO 101 BEGIN KEY "I22-7 Rit.oper.VA (pros.A)" - PROMPT 50 41 "" + PROMPT 50 43 "" PICTURE "###.###.###.###^^^" FIELD 37->F0ROPEVA END @@ -831,7 +831,7 @@ END NUMERO 102 BEGIN KEY "I22-8 Som.sogg.rit.(BCDEF)" - PROMPT 72 41 "" + PROMPT 72 43 "" PICTURE "###.###.###.###^^^" FIELD 37->F0SSRITBF END @@ -839,7 +839,7 @@ END NUMERO 103 BEGIN KEY "I22-9 Rit.op.(p.B,C,D,E,F)" - PROMPT 94 41 "" + PROMPT 94 43 "" PICTURE "###.###.###.###^^^" FIELD 37->F0ROPEBF END @@ -847,7 +847,7 @@ END NUMERO 104 BEGIN KEY "I22-10 Cred.imp.pre.assun. " - PROMPT 116 41 "" + PROMPT 116 43 "" PICTURE "###.###.###.###^^^" FIELD 37->F0CRIMPRAS END @@ -855,7 +855,7 @@ END NUMERO 105 BEGIN KEY "I23-1 Som.sogg.rit.(p.A,B)" - PROMPT 23 43 "" + PROMPT 27 45 "" PICTURE "###.###.###.###^^^" FIELD 37->F1SSRIT END @@ -863,7 +863,7 @@ END NUMERO 106 BEGIN KEY "I23-2 Riten.operat.(p.A,B)" - PROMPT 50 43 "" + PROMPT 50 45 "" PICTURE "###.###.###.###^^^" FIELD 37->F1ROPE END @@ -871,7 +871,7 @@ END NUMERO 107 BEGIN KEY "I23-3 Cred.imp.pre.assun. " - PROMPT 72 43 "" + PROMPT 72 45 "" PICTURE "###.###.###.###^^^" FIELD 37->F1CRIMPRAS END @@ -879,7 +879,7 @@ END NUMERO 108 BEGIN KEY "I24-1 Somme sogg. ritenute" - PROMPT 23 45 "" + PROMPT 27 47 "" PICTURE "###.###.###.###^^^" FIELD 37->F2SSRIT END @@ -887,7 +887,7 @@ END NUMERO 109 BEGIN KEY "I24-2 Ritenute operate " - PROMPT 50 45 "" + PROMPT 50 47 "" PICTURE "###.###.###.###^^^" FIELD 37->F2ROPE END @@ -895,7 +895,7 @@ END NUMERO 110 BEGIN KEY "I24-3 Cred.imp.pre.assun. " - PROMPT 72 45 "" + PROMPT 72 47 "" PICTURE "###.###.###.###^^^" FIELD 37->F2CRIMPRAS END @@ -903,7 +903,7 @@ END NUMERO 111 BEGIN KEY "I25-1 N.fogli" - PROMPT 23 47 "" + PROMPT 23 49 "" PICTURE "##.###" FIELD 37->G0NFCOM END @@ -911,7 +911,7 @@ END NUMERO 112 BEGIN KEY "I125-2 N.dip." - PROMPT 38 47 "" + PROMPT 36 49 "" PICTURE "##.###" FIELD 37->G0NPER END @@ -919,7 +919,7 @@ END NUMERO 113 BEGIN KEY "I25-3 Utili spettanti " - PROMPT 50 47 "" + PROMPT 50 49 "" PICTURE "###.###.###.###^^^" FIELD 37->G0USPE END @@ -927,7 +927,7 @@ END NUMERO 114 BEGIN KEY "I25-4 Rit.utili spettanti " - PROMPT 72 47 "" + PROMPT 72 49 "" PICTURE "###.###.###.###^^^" FIELD 37->G0RITSPET END @@ -935,7 +935,7 @@ END NUMERO 115 BEGIN KEY "I25-5 Utili pagati " - PROMPT 94 47 "" + PROMPT 94 49 "" PICTURE "###.###.###.###^^^" FIELD 37->G0UPAG END @@ -943,7 +943,7 @@ END NUMERO 116 BEGIN KEY "I25-6 Rit. su utili pagati" - PROMPT 116 47 "" + PROMPT 116 49 "" PICTURE "###.###.###.###^^^" FIELD 37->G0ROPE END @@ -951,7 +951,7 @@ END NUMERO 117 BEGIN KEY "I26-7 Azioni o quote(pr.1)" - PROMPT 23 49 "" + PROMPT 27 51 "" PICTURE "###.###.###.###^^^" FIELD 37->G0NAZI1 END @@ -959,7 +959,7 @@ END NUMERO 118 BEGIN KEY "I26-8 Utili denaro (pr.1) " - PROMPT 50 49 "" + PROMPT 50 51 "" PICTURE "###.###.###.###^^^" FIELD 37->G0UDEN1 END @@ -967,7 +967,7 @@ END NUMERO 120 BEGIN KEY "I26-9 Utili natura (pr.1) " - PROMPT 72 49 "" + PROMPT 72 51 "" PICTURE "###.###.###.###^^^" FIELD 37->G0UNAT1 END @@ -975,7 +975,7 @@ END NUMERO 121 BEGIN KEY "I26-10 Importo utili (pr.2)" - PROMPT 94 49 "" + PROMPT 94 51 "" PICTURE "###.###.###.###^^^" FIELD 37->G0IUTI2 END @@ -983,7 +983,7 @@ END NUMERO 122 BEGIN KEY "I26-11 Util.sogg.rit.(pr.3)" - PROMPT 116 49 "" + PROMPT 116 51 "" PICTURE "###.###.###.###^^^" FIELD 37->G0USRIT3 END @@ -991,7 +991,7 @@ END NUMERO 123 BEGIN KEY "I27-12 Ritenuta acc.(pr.3) " - PROMPT 23 49 "" + PROMPT 23 53 "" PICTURE "###.###.###.###^^^" FIELD 37->G0RACC3 END @@ -999,7 +999,7 @@ END NUMERO 124 BEGIN KEY "I27-13 Riten. impos.(pr.3) " - PROMPT 50 49 "" + PROMPT 50 53 "" PICTURE "###.###.###.###^^^" FIELD 37->G0RIMP3 END @@ -1007,7 +1007,7 @@ END NUMERO 125 BEGIN KEY "I27-14 Ut.non sogg.rit.(p3)" - PROMPT 72 49 "" + PROMPT 72 53 "" PICTURE "###.###.###.###^^^" FIELD 37->G0UNSRIT3 END @@ -1015,7 +1015,7 @@ END NUMERO 126 BEGIN KEY "I27-15 Cred.imp.pre.assun. " - PROMPT 94 49 "" + PROMPT 94 53 "" PICTURE "###.###.###.###^^^" FIELD 37->G0CRIMPRAS END @@ -1023,7 +1023,7 @@ END NUMERO 127 BEGIN KEY "I28-1 Utili corrisposti " - PROMPT 23 51 "" + PROMPT 27 55 "" PICTURE "###.###.###.###^^^" FIELD 37->G1UCOR END @@ -1031,7 +1031,7 @@ END NUMERO 128 BEGIN KEY "I28-2 Utili sogg. ritenute" - PROMPT 50 51 "" + PROMPT 50 55 "" PICTURE "###.###.###.###^^^" FIELD 37->G1USRIT END @@ -1039,7 +1039,7 @@ END NUMERO 129 BEGIN KEY "I28-3 Ritenute di acconto " - PROMPT 72 51 "" + PROMPT 72 55 "" PICTURE "###.###.###.###^^^" FIELD 37->G1RACC END @@ -1047,7 +1047,7 @@ END NUMERO 130 BEGIN KEY "I28-4 Ritenute di imposta " - PROMPT 94 51 "" + PROMPT 94 55 "" PICTURE "###.###.###.###^^^" FIELD 37->G1RIMP END @@ -1055,7 +1055,7 @@ END NUMERO 131 BEGIN KEY "I28-5 Utili non sogg.rit. " - PROMPT 116 51 "" + PROMPT 116 55 "" PICTURE "###.###.###.###^^^" FIELD 37->G1UNSRIT END @@ -1063,7 +1063,7 @@ END NUMERO 132 BEGIN KEY "I29-6 Cred.imp.pre.assun. " - PROMPT 23 53 "" + PROMPT 27 57 "" PICTURE "###.###.###.###^^^" FIELD 37->G1CRIMPRAS END @@ -1071,7 +1071,7 @@ END NUMERO 133 BEGIN KEY "I30-1 Cont.obb.car.dat.lav" - PROMPT 23 55 "" + PROMPT 27 59 "" PICTURE "###.###.###.###^^^" FIELD 37->H0CODLAV END @@ -1079,7 +1079,7 @@ END NUMERO 134 BEGIN KEY "I30-2 Cont.ob.car.lav.dip." - PROMPT 50 55 "" + PROMPT 50 59 "" PICTURE "###.###.###.###^^^" FIELD 37->H0COLDIP END diff --git a/m770/77base3.frm b/m770/77base3.frm index a8408384b..bf5b5fda3 100755 --- a/m770/77base3.frm +++ b/m770/77base3.frm @@ -115,14 +115,14 @@ END STRINGA 7 BEGIN KEY "Luogo Vers." - PROMPT 28 3 "" + PROMPT 26 3 "" FIELD 42->QLLV END STRINGA 8 BEGIN KEY "Tipo Vers." - PROMPT 36 3 "" + PROMPT 34 3 "" FIELD 42->QLTV END @@ -153,6 +153,7 @@ BEGIN KEY "NUMERO" PROMPT 99 3 "" FIELD 42->QLNUMERO + PICTURE "#####^^^^^^" END END @@ -162,14 +163,14 @@ SECTION FOOTER LAST 2 NUMERO 1 BEGIN KEY "Tot.rit.eff" - PROMPT 51 1 "" + PROMPT 61 1 "" PICTURE "###.###.###.###^^^" END NUMERO 2 BEGIN KEY "Tot.rit.ver" - PROMPT 102 1 "" + PROMPT 112 1 "" PICTURE "###.###.###.###^^^" END diff --git a/m770/77base4.frm b/m770/77base4.frm index 88c87ead4..22d9ab3ac 100755 --- a/m770/77base4.frm +++ b/m770/77base4.frm @@ -219,126 +219,54 @@ SECTION HEADER EVEN 1 NUMERO 1 BEGIN - KEY "P Imp.versata" + KEY "PS Imp.versata" PROMPT 24 1 "" - FIELD 73->IMPOSTA PICTURE "###.###.###.###^^^" END NUMERO 2 BEGIN - KEY "P Inter.lav.dip" + KEY "PS Inter.lav.dip" PROMPT 41 1 "" - FIELD 73->INTERDIP PICTURE "###.###.###.###^^^" END NUMERO 3 BEGIN - KEY "P Inter.dat.lav." + KEY "PS Inter.dat.lav." PROMPT 56 1 "" - FIELD 73->INTERDAT PICTURE "###.###.###.###^^^" END STRINGA 4 BEGIN - KEY "P Modalita' vers" + KEY "PS Modalita' vers" PROMPT 76 1 "" - FIELD 73->TIPOVERS END STRINGA 5 BEGIN - KEY "P Cod.trib" + KEY "PS Cod.trib" PROMPT 82 1 "" - FIELD 73->CODTRIB END -STRINGA 6 +DATA 6 BEGIN - KEY "P DATA VERS." + KEY "PS DATA VERS." PROMPT 89 1 "" - FIELD 73->DATAVERS - PICTURE "## ^ ## ^####" + PICTURE " ## ^ ## ^####" END STRINGA 7 BEGIN - KEY "P Serie" + KEY "PS Serie" PROMPT 108 1 "" - FIELD 73->SERIE END STRINGA 8 BEGIN - KEY "P Numero" + KEY "PS Numero" PROMPT 117 1 "" - FIELD 73->NUMERO -END - -END - -SECTION HEADER ODD 1 - -NUMERO 1 -BEGIN - KEY "S Imp.versata" - PROMPT 24 1 "" - FIELD 76->IMPOSTA - PICTURE "###.###.###.###^^^" -END - -NUMERO 2 -BEGIN - KEY "S Inter.lav.dip" - PROMPT 41 1 "" - FIELD 76->INTERDIP - PICTURE "###.###.###.###^^^" -END - -NUMERO 3 -BEGIN - KEY "S Inter.dat.lav." - PROMPT 56 1 "" - FIELD 76->INTERDAT - PICTURE "###.###.###.###^^^" -END - -STRINGA 4 -BEGIN - KEY "S Modalita' vers" - PROMPT 76 1 "" - FIELD 73->TIPOVERS -END - -STRINGA 5 -BEGIN - KEY "S Cod.trib" - PROMPT 82 1 "" - FIELD 76->CODTRIB -END - -STRINGA 6 -BEGIN - KEY "S DATA VERS." - PROMPT 89 1 "" - FIELD 76->DATAVERS - PICTURE "## ^ ## ^####" -END - -STRINGA 7 -BEGIN - KEY "S Serie" - PROMPT 108 1 "" - FIELD 76->SERIE -END - -STRINGA 8 -BEGIN - KEY "S Numero" - PROMPT 117 1 "" - FIELD 76->NUMERO END END @@ -446,188 +374,188 @@ SECTION FOOTER FIRST 25 STRINGA 650 BEGIN KEY "Quadro A" - PROMPT 19 3 "" + PROMPT 21 3 "" FIELD 37->QCOMP[1,1] END STRINGA 653 BEGIN KEY "Quadro A3" - PROMPT 24 3 "" + PROMPT 26 3 "" FIELD 37->QCOMP[4,4] END STRINGA 660 BEGIN KEY "Quadro B" - PROMPT 29 3 "" + PROMPT 31 3 "" FIELD 37->QCOMP[5,5] END STRINGA 661 BEGIN KEY "Quadro B1" - PROMPT 34 3 "" + PROMPT 36 3 "" FIELD 37->QCOMP[6,6] END STRINGA 670 BEGIN KEY "Quadro C" - PROMPT 39 3 "" + PROMPT 41 3 "" FIELD 37->QCOMP[7,7] END STRINGA 680 BEGIN KEY "Quadro D" - PROMPT 44 3 "" + PROMPT 46 3 "" FIELD 37->QCOMP[8,8] END STRINGA 681 BEGIN KEY "Quadro D1" - PROMPT 49 3 "" + PROMPT 51 3 "" FIELD 37->QCOMP[9,9] END STRINGA 690 BEGIN KEY "Quadro E" - PROMPT 54 3 "" + PROMPT 56 3 "" FIELD 37->QCOMP[10,10] END STRINGA 691 BEGIN KEY "Quadro E1" - PROMPT 60 3 "" + PROMPT 62 3 "" FIELD 37->QCOMP[11,11] END STRINGA 692 BEGIN KEY "Quadro E2" - PROMPT 65 3 "" + PROMPT 67 3 "" FIELD 37->QCOMP[12,12] END STRINGA 700 BEGIN KEY "Quadro F" - PROMPT 70 3 "" + PROMPT 72 3 "" FIELD 37->QCOMP[13,13] END STRINGA 701 BEGIN KEY "Quadro F1" - PROMPT 75 3 "" + PROMPT 77 3 "" FIELD 37->QCOMP[14,14] END STRINGA 702 BEGIN KEY "Quadro F2" - PROMPT 80 3 "" + PROMPT 82 3 "" FIELD 37->QCOMP[15,15] END STRINGA 710 BEGIN KEY "Quadro G" - PROMPT 85 3 "" + PROMPT 87 3 "" FIELD 37->QCOMP[16,16] END STRINGA 711 BEGIN KEY "Quadro G1" - PROMPT 90 3 "" + PROMPT 92 3 "" FIELD 37->QCOMP[17,17] END STRINGA 720 BEGIN KEY "Quadro H" - PROMPT 95 3 "" + PROMPT 97 3 "" FIELD 37->QCOMP[18,18] END STRINGA 730 BEGIN KEY "Quadro I" - PROMPT 100 3 "" + PROMPT 102 3 "" FIELD 37->QCOMP[19,19] END STRINGA 651 BEGIN KEY "Quadro A1" - PROMPT 19 7 "" + PROMPT 21 7 "" FIELD 37->QCOMP[2,2] END STRINGA 652 BEGIN KEY "Quadro A2" - PROMPT 24 7 "" + PROMPT 26 7 "" FIELD 37->QCOMP[3,3] END STRINGA 760 BEGIN KEY "Quadro N" - PROMPT 29 7 "" + PROMPT 31 7 "" FIELD 37->QCOMP[20,20] END STRINGA 780 BEGIN KEY "Quadro P" - PROMPT 35 7 "" + PROMPT 37 7 "" FIELD 37->QCOMP[21,21] END STRINGA 790 BEGIN KEY "Quadro Q" - PROMPT 40 7 "" + PROMPT 42 7 "" FIELD 37->QCOMP[22,22] END STRINGA 800 BEGIN KEY "Quadro R" - PROMPT 45 7 "" + PROMPT 47 7 "" FIELD 37->QCOMP[23,23] END STRINGA 810 BEGIN KEY "Quadro S" - PROMPT 50 7 "" + PROMPT 52 7 "" FIELD 37->QCOMP[24,24] END STRINGA 820 BEGIN KEY "Quadro T" - PROMPT 55 7 "" + PROMPT 57 7 "" FIELD 37->QCOMP[25,25] END STRINGA 821 BEGIN - PROMPT 80 9 "" - KEY "Numero quadri aggiuntivi" + PROMPT 85 9 "" + KEY "Numero quadri aggiuntivi L P Q S T" FIELD 37->H0NQLAGG END STRINGA 822 BEGIN - PROMPT 72 11 "" + PROMPT 75 11 "" KEY "Numero quadri su supporto magnetico" FIELD 37->NSUPPM END diff --git a/m770/77stba.cpp b/m770/77stba.cpp index 0137a79ae..37b4fcce9 100755 --- a/m770/77stba.cpp +++ b/m770/77stba.cpp @@ -1,985 +1,1017 @@ -// Stampa base -#include "77stba.h" - -TBase1::TBase1(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) -{ - r = new TRelation(LF_SOCI); - r->add(LF_ANAG, "TIPOA=TIPOASOC|CODANAGR=CODANAGRSO"); - r->add(LF_ANAGFIS, "CODANAGR=CODANAGR",1, LF_ANAG); - r->add(LF_COMUNI, "COM=COMNASC",1,LF_ANAGFIS); - c = new TCursor(r); - _bAllegSoci=FALSE; -} - -TBase1::~TBase1() -{ - delete r; - delete c; -} - -void TBase1::stampa_corpo(TPrinter& pr) -{ - TPrint_section& body = section('B', first_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); -} - -// accetta solo quelli con qualifica=A,B o C -bool bFiltraSoci(const TRelation* rel) -{ - TString sQual(3); - sQual = rel->lfile().get("RICQUAL"); - return sQual=="A" || sQual=="B" || sQual=="C"; -} - -long TBase1::iContaSoci() -{ - TString filtro(20); - filtro.format("CODDITTA=%d",_codditta); - c->setfilter(filtro); - c->set_filterfunction(bFiltraSoci); - (*c)=0L; - return c->items(); -} - -void TBase1::stampa_soci(TPrinter& pr) -{ - TPrint_section& fut = section('F', first_page); - fut.reset(); - jump_to_line(pr,_INIZIO_SOCI); - const long iSoci = iContaSoci(); - if (iSoci > 11) - { - _bAllegSoci=TRUE; - TPrintrow& rg=fut.row(0); - rg.put("VEDERE ALLEGATO", 25); - pr.print(rg); - _RigaCorr++; - if (usa_progind()) progind()->addstatus(1); - } - else - { - int i=0; - TString sRagsoc,sSesso,sComuneNa,sProvNa,sDataNa,sCodFis,sCodQua; - for ((*c)=0L; c->pos() < c->items(); ++(*c)) - { - TPrintrow& rg=fut.row(i++); - sCodQua=c->file().get("RICQUAL"); - sRagsoc=c->file(LF_ANAG).get("RAGSOC"); - sCodFis=c->file(LF_ANAG).get("COFI"); - sDataNa=c->file(LF_ANAGFIS).get("DATANASC"); - sSesso=c->file(LF_ANAGFIS).get("SESSO"); - sComuneNa=c->file(LF_COMUNI).get("DENCOM"); - sProvNa=c->file(LF_COMUNI).get("PROVCOM"); - fut.field(0).set(sRagsoc); - rg.put(sRagsoc,fut.field(0).x()-1); - fut.field(1).set(sSesso); - rg.put(sSesso,fut.field(1).x()-1); - fut.field(2).set(sComuneNa); - rg.put(sComuneNa,fut.field(2).x()-1); - fut.field(3).set(sProvNa); - rg.put(sProvNa,fut.field(3).x()-1); - fut.field(4).set(sDataNa); - rg.put(sDataNa,fut.field(4).x()-1); - fut.field(5).set(sCodFis); - rg.put(sCodFis,fut.field(5).x()-1); - fut.field(6).set(sCodQua); - rg.put(sCodQua,fut.field(6).x()-1); - pr.print(rg); - _RigaCorr++; - if (usa_progind()) progind()->addstatus(1); - } - } -} - -bool TBase1::print(const long codditta, const long NumFis, const long NumNoFis) -{ - TCursor* cur = cursor(); - TPrinter& pr = printer(); - _codditta=codditta; - - if (!InitPrint(codditta)) - return FALSE; - pr.formlen(BASE_FORMLEN); - - (*cur)=0L; - if (_modulaser) - { - ClearFlagModulaser(); - TPrintrow r; - if (!_GiaMessoStartDoc) - put_modulaser(r, STARTDOC); - put_modulaser(r, STARTDITTA); - put_modulaser(r, STARTPAGE, 1); - pr.print(r); - _RigaCorr++; - } - jump_to_line(pr, prima_riga(PRIMA)); - stampa_corpo(pr); - stampa_soci(pr); - next_page(pr); - close_print(); - return TRUE; -} - -void TBase2::stampa_corpo(TPrinter& pr) -{ - TPrint_section& body = section('B', even_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); -} - -bool TBase2::print(const long codditta, const long NumFis, const long NumNoFis) -{ - TCursor* cur = cursor(); - TPrinter& pr = printer(); - _codditta=codditta; - filtra(codditta); - _RigaCorr=0; - (*cur)=0L; - jump_to_line(pr, prima_riga(PRIMA)); - stampa_corpo(pr); - next_page(pr); - close_print(); - return TRUE; -} - -void TBase3::stampa_testata(TPrinter& pr) -{ - TPrint_section& hh = section('H', first_page); - hh.reset(); - hh.update(); - const int hhr = hh.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(hh.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -int TBase3::stampa_L(TPrinter& pr,const int iChiaveL) -{ - long codit=0L; - TPrint_section& body = section('B', odd_page); - body.reset(); - - TCursor& cur = *cursor(); -// Le chiavi nel file e nel .ini sono saggiamente scambiate - if (iChiaveL==2) cur.setkey(1); - else cur.setkey(2); - - filtra(_codditta); - cur=0L; - - bool finito=FALSE; - int righe=0; - 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; - codit=cur.file().get_long("CODDITTA"); - bool buono=codit==_codditta; -// Guarda se e' necessario stampare l'aggiuntivo - _bAggiuntivoL = buono && righe>14; - finito=righe>14 || codit!=_codditta; - } - return righe; -} - -void TBase3::stampa_totali_L(TPrinter& pr) -{ -// La sezione f last contiene solo due totali aggiornati con add nel form - TPrint_section& hh = section('F', last_page); -// hh.reset(); - hh.update(); - const int hhr = hh.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(hh.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -bool TBase3::print(const long codditta, const long NumFis, const long NumNoFis) -{ - _bAggiuntivoL=TRUE; - TCursor* cur = cursor(); - TPrinter& pr = printer(); - _codditta=codditta; - filtra(codditta); - _RigaCorr=0; - (*cur)=0L; - jump_to_line(pr, prima_riga(PRIMA)); -// Stampa i codici concessione e tesoreria - stampa_testata(pr); -// Legge dai par.studio l'ordinamento da usare per L - TConfig conf(CONFIG_STUDIO); - const int iChiaveL = (int)conf.get_long("FlStQl", "77"); - const int righe_stampate=stampa_L(pr,iChiaveL); -// Se la stampa prosegue i totali vanno sull'aggiuntivo NON qui - if (!_bAggiuntivoL) - { - jump_to_line(pr,_RIGA_TOTALI_L); - stampa_totali_L(pr); - } - next_page(pr); - close_print(); - return TRUE; -} - -const char* TRigaN::sMeseRif() const -{ - __dep16=""; - __dep16 << _MeseRif; - return __dep16; -} - -const char* TRigaN::sAnnoRif() const -{ - __dep16=""; - __dep16 << _AnnoRif; - return __dep16; -} - -// Ordina le righe N per periodo di riferimento -int TRigaN::compare(const TSortable& s) const -{ - const TRigaN& rec = (const TRigaN&)s; - const int da = _AnnoRif - rec._AnnoRif; - const int dm = _MeseRif - rec._MeseRif; - if (da==0) - return dm; - else - return da; -} - -TRigaN::TRigaN(const TLocalisamfile& qn) -{ - _pos = qn.recno(); - - const TRectype& rec = qn.curr(); - - _MeseRif = rec.get_int("MESERIF"); - _AnnoRif = rec.get_int("ANNORIF"); -// Nel quadro R si chiama diversamente @!#@!!! - if (qn.num() == LF_QUAN) - _ImpRimb = rec.get_real("IMPOSTA"); - else - _ImpRimb = rec.get_real("IMPRIMB"); - _CompAss = rec.get_real("COMPENSI"); -} - -int TRigheNR::fill(const long codditta,TLocalisamfile& qnr) -{ - long ditta=0L; -// Si posiziona sul primo della ditta corrente - qnr.zero(); - qnr.put("CODDITTA",codditta); - qnr.read()==NOERR; - ditta=qnr.get_long("CODDITTA"); - if (ditta!=codditta) return 0; - -// Legge tutti quelli della ditta corrente - for (; !qnr.eof(); qnr.next()) - { - ditta=qnr.get_long("CODDITTA"); - if (ditta!=codditta) break; - - TRigaN* n = new TRigaN(qnr); - if (n->pos() >= 0) - _data.add(n); - else - delete n; - } - _data.sort(); - const int i = _data.items(); - return i; -} - -const char* TRigaQT::sMesePag() const -{ - __dep16=""; - __dep16 << _MesePag; - return __dep16; -} - -const char* TRigaQT::sAnnoPag() const -{ - __dep16=""; - __dep16 << _AnnoPag; - return __dep16; -} - -// Ordina le righe N per periodo di riferimento -int TRigaQT::compare(const TSortable& s) const -{ - const TRigaQT& rec = (const TRigaQT&)s; - const int da = _AnnoPag - rec._AnnoPag; - const int dm = _MesePag - rec._MesePag; - if (da==0) - return dm; - else - return da; -} - -TRigaQT::TRigaQT(const TLocalisamfile& qt) -{ - const TRectype& rec = qt.curr(); - - _MesePag = rec.get_int("MESEPAG"); - _AnnoPag = rec.get_int("ANNOPAG"); - _ContVers = rec.get_real("CONTVERS"); - _ContRimb = rec.get_real("CONTRIMB"); - _Interessi=rec.get_real("INTERESSI"); - _sCodReg=rec.get("CODREG"); -} - -int TRigheQT::fill(const long codditta,TLocalisamfile& qt) -{ - long ditta=0L; -// Si posiziona sul primo della ditta corrente - qt.zero(); - qt.put("CODDITTA",codditta); - qt.read()==NOERR; - ditta=qt.get_long("CODDITTA"); - if (ditta!=codditta) return 0; - -// Legge tutti quelli della ditta corrente - for (; !qt.eof(); qt.next()) - { - ditta=qt.get_long("CODDITTA"); - if (ditta!=codditta) break; - - TRigaQT* n = new TRigaQT(qt); - if (n->pos() >= 0) - _data.add(n); - else - delete n; - } - _data.sort(); - const int i = _data.items(); - return i; -} - -// Ordina le righe N per periodo di riferimento -int TRigaPS::compare(const TSortable& s) const -{ - const TRigaPS& rec = (const TRigaPS&)s; - return _dDvpos() >= 0) - _data.add(n); - else - delete n; - } - _data.sort(); - const int i = _data.items(); - return i; -} - -void TBase4::stampa_testata(TPrinter& pr) -{ - TPrint_section& hh = section('H', first_page); - hh.reset(); - hh.update(); - const int hhr = hh.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(hh.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -void TBase4::fill_riga_QT(TPrint_section& sec,const int num) -{ - TString sVal; - int start=0,end=5; - for (int i = start; i < end; i++) - { - TForm_item& fi = sec.field(i); - if (num < _righeQT.items()) - { - const TRigaQT& rN = _righeQT[num]; - if (i==start) - sVal=rN.sMesePag(); - else if (i==start+1) - sVal=rN.sAnnoPag(); - else if (i==start+2) - sVal=rN.ContVers(fi.picture()); - else if (i==start+3) - sVal=rN.ContRimb(fi.picture()); - else if (i==start+4) - sVal=rN.Interessi(fi.picture()); - else if (i==start+5) - sVal=rN.CodReg(); - } - else - sVal=""; - fi.set(sVal); - TPrintrow& row=sec.row(0); - row.put(sVal,fi.x()-1); - } -} - -void TBase4::stampa_Q(TPrinter& pr) -{ - TPrint_section& body = section('F', even_page); - body.reset(); - TLocalisamfile qp(LF_QUAQ); - _righeQT.fill(_codditta,qp); - _bAggQ = _righeQT.items() > _RIGHE_Q; - - int riga=0; - bool FinitaSezione=FALSE; - while (!FinitaSezione) - { -// Stampa la parte sinistra (primi 4 campi) - fill_riga_QT(body,riga); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - riga++; - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); - FinitaSezione=riga>_RIGHE_Q-1; - } -// Salta due righe alla fine - stampa_righe_vuote(pr,2); -} - -void TBase4::stampa_T(TPrinter& pr) -{ - TPrint_section& body = section('F', odd_page); - body.reset(); - TLocalisamfile qp(LF_QUAT); - _righeQT.fill(_codditta,qp); - _bAggT = _righeQT.items() > _RIGHE_T; - - int riga=0; - bool FinitaSezione=FALSE; - while (!FinitaSezione) - { -// Stampa la parte sinistra (primi 4 campi) - fill_riga_QT(body,riga); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - riga++; - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); - FinitaSezione=riga>_RIGHE_T-1; - } -} - -void TBase4::fill_riga_PS(TPrint_section& sec,const int num) -{ - TString sVal; - int start=0,end=7; - for (int i = start; i < end; i++) - { - TForm_item& fi = sec.field(i); - if (num < _righePS.items()) - { - const TRigaPS& rN = _righePS[num]; - if (i==start) - sVal=rN.sImposta(fi.picture()); - else if (i==start+1) - sVal=rN.sIntDip(fi.picture()); - else if (i==start+2) - sVal=rN.sIntDat(fi.picture()); - else if (i==start+3) - sVal=rN.sTipoVers(); - else if (i==start+4) - sVal=rN.sCodTrib(); - else if (i==start+5) - sVal=rN.sDataVers(fi.picture()); - else if (i==start+6) - sVal=rN.sSerie(); - else if (i==start+7) - sVal=rN.sNumero(); - } - else - sVal=""; - fi.set(sVal); - TPrintrow& row=sec.row(0); - row.put(sVal,fi.x()-1); - } -} - -void TBase4::stampa_P(TPrinter& pr) -{ - TPrint_section& body = section('H', even_page); - body.reset(); - TLocalisamfile qp(LF_QUAP); - _righePS.fill(_codditta,qp); - const int items=_righePS.items(); - _bAggP = items > _RIGHE_P; - - int riga=0; - bool FinitaSezione=FALSE; - while (!FinitaSezione) - { -// Stampa la parte sinistra (primi 4 campi) - fill_riga_PS(body,riga); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - riga++; - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); - FinitaSezione=riga>_RIGHE_P-1; - } -// Salta due righe alla fine - stampa_righe_vuote(pr,2); -} - -void TBase4::stampa_S(TPrinter& pr) -{ - TPrint_section& body = section('H', odd_page); - body.reset(); - TLocalisamfile qp(LF_QUAS); - _righePS.fill(_codditta,qp); - _bAggS = _righePS.items() > _RIGHE_S; - - int riga=0; - bool FinitaSezione=FALSE; - while (!FinitaSezione) - { -// Stampa la parte sinistra (primi 4 campi) - fill_riga_PS(body,riga); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - riga++; - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); - FinitaSezione=riga>_RIGHE_S-1; - } -// Salta due righe alla fine - stampa_righe_vuote(pr,2); -} - -void TBase4::stampa_R(TPrinter& pr) -{ - TPrint_section& body = section('B', even_page); - body.reset(); - TLocalisamfile qr(LF_QUAR); - _righeNR.fill(_codditta,qr); - const int items=_righeNR.items(); -// se iRigheNR > 2 => bisogna stampare anche l'allegato - _bAggR = items > _RIGHE_R; - fill_riga_NR(body,0,0); - fill_riga_NR(body,1,1); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); -// Salta due righe alla fine - stampa_righe_vuote(pr,2); -} - -void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side) -{ - TString sVal; - int start,end; - if (side==0) - { - start=0; - end=4; - } - else - { - start=4; - end=8; - } - for (int i = start; i < end; i++) - { - TForm_item& fi = sec.field(i); - if (num < _righeNR.items()) - { - const TRigaN& rN = _righeNR[num]; - if (i==start) - sVal=rN.sMeseRif(); - else if (i==start+1) - sVal=rN.sAnnoRif(); - else if (i==start+2) - sVal=rN.ImpRimb(fi.picture()); - else if (i==start+3) - sVal=rN.CompAss(fi.picture()); - } - else - sVal=""; - fi.set(sVal); - TPrintrow& row=sec.row(0); - row.put(sVal,fi.x()-1); - } -} - -void TBase4::stampa_righe_vuote(TPrinter& pr,const int righe) -{ - TPrintrow rr; - for (int i=0; iaddstatus(1); - } -} - -void TBase4::stampa_N(TPrinter& pr) -{ - TPrint_section& body = section('B', odd_page); - body.reset(); - TLocalisamfile qn(LF_QUAN); - _righeNR.fill(_codditta,qn); -// se iRigheN > 6 => bisogna stampare anche l'allegato - _bAggN = _righeNR.items() > _RIGHE_N; - - int num=0; - int riga=0; - bool FinitaSezione=FALSE; - while (!FinitaSezione) - { -// Stampa la parte sinistra (primi 4 campi) - fill_riga_NR(body,num,0); - num+=3; - fill_riga_NR(body,num,1); - TPrintrow& rr=body.row(0); - pr.print(rr); - rr.reset(); - riga++; - _RigaCorr++; - if (usa_progind()) - progind()->addstatus(1); - num-=2; - FinitaSezione=riga>2; - } -// Salta due righe alla fine - stampa_righe_vuote(pr,2); -} - -void TBase4::stampa_fine(TPrinter& pr) -{ - TPrint_section& sec = section('F', first_page); - - sec.reset(); - sec.update(); - const int hhr = sec.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(sec.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -bool TBase4::print(const long codditta, const long NumFis, const long NumNoFis) -{ - _bAggN=_bAggP=_bAggR=_bAggQ=_bAggS=_bAggT=FALSE; - TCursor* cur = cursor(); - TPrinter& pr = printer(); - _codditta=codditta; - filtra(codditta); - _RigaCorr=0; - (*cur)=0L; - jump_to_line(pr, prima_riga(PRIMA)); -// Stampa da M1 a M6 - stampa_testata(pr); - stampa_N(pr); - stampa_P(pr); - stampa_Q(pr); - stampa_R(pr); - stampa_S(pr); - stampa_T(pr); - stampa_fine(pr); - next_page(pr); - close_print(); - return TRUE; -} - -bool TStampaBase::user_create() -{ - _fBase1 = new TBase1("77base1", "Base"); - _fBase2 = new TBase2("77base2", "Base"); - _fBase3 = new TBase3("77base3", "Base"); - _fBase4 = new TBase4("77base4", "Base"); -// Adesso bisogna chiamare set_cursor per impostare il cursore dentro -// al form. Sarebbe meglio fare in modo che il form usi sempre il cursore -// letto dal .frm, senza bisogno di passarglielo dall'applicazione - _cur = _fBase1->TForm::cursor(); - _fBase1->set_cursor(_cur); - _cur2 = _fBase2->TForm::cursor(); - _fBase2->set_cursor(_cur2); - _cur3 = _fBase3->TForm::cursor(); - _fBase3->set_cursor(_cur3); - _cur4 = _fBase4->TForm::cursor(); - _fBase4->set_cursor(_cur4); - return TRUE; -} - -bool TStampaBase::user_destroy() -{ - delete _fBase1; - delete _fBase2; - delete _fBase3; - delete _fBase4; - return TRUE; -} - -bool TStampaBase::print_quadro(const int OffsetDitta, const bool modulaser) -{ - int start=0, last=0; - -// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di -// stampa a video - printer().formlen(BASE_FORMLEN); - bool ok = printer().open(); - - _fBase1->set_modulaser(modulaser); - _fBase2->set_modulaser(modulaser); - _fBase3->set_modulaser(modulaser); - _fBase4->set_modulaser(modulaser); - -// Dice se deve eseguire il posizionamento del foglio. -// Se stampa piu' ditte va eseguito solo sulla prima -// Occhio a non spostarlo nel ciclo. - _fBase1->set_posiziona(TRUE); - - if (OffsetDitta >= 0) - { - start = OffsetDitta; - last = OffsetDitta; - } - else - last = ditte().items() - 1; - - for (int i = start; i <= last; i++) - { - TString CoFiDic(20); - TToken_string riga(ditte()[i]); - const long codditta = atol(riga.get(0)); - const TipoDitta tipo = (TipoDitta)riga.get_int(1); - const long fis = riga.get_long(2); - const long nofis = riga.get_long(3); - const bool LastFis = (bool)riga.get_int(4); - const bool LastNoFis = (bool)riga.get_int(5); - -// I gruppi dich-estinti hanno totali comuni -// Si presume che nell'array vengano messi nell'ordine dich-estinti - if (tipo == normale || tipo == dichiarante) - _fBase1->azzera_totali(); - - if (tipo == estinto) - CoFiDic = riga.get(6); - -// Dice al form che tipo di ditta si stampa - _fBase1->set_tipo_ditta(tipo); - -// Numera i fogli a partire da 1 per ogni ditta normale e da 1 e di seguito negli estinti -// per i sogg. dichiaranti - if (tipo == normale || tipo == dichiarante) - _fBase1->set_num_foglio(1); - -// Se la ditta e' estinta dice al form il cod.fis. del dichiarante - if (tipo == estinto) - _fBase1->set_cofi_dic(CoFiDic); - -// Dice al form che e' l'ultima ditta - if (i == last) - _fBase1->set_last_ditta(TRUE); - - _fBase1->print(codditta, fis, nofis); - _fBase2->print(codditta, fis, nofis); - _fBase3->print(codditta, fis, nofis); - _fBase4->print(codditta, fis, nofis); - } - printer().close(); - return ok; -} - -void TQuadroL::stampa_testata(TPrinter& pr) -{ - TPrint_section& hh = section('H', first_page); - hh.reset(); - hh.update(); - const int hhr = hh.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(hh.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL) -{ - long codit=0L; - bool eof=FALSE; - TPrint_section& body = section('B', odd_page); - body.reset(); - TCursor& cur = *cursor(); - cur=lStartRec; - bool finito=FALSE; - int righe=0; - - 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; - } - return eof; -} - -void TQuadroL::stampa_totali_L(TPrinter& pr) -{ -// La sezione f last contiene solo due totali aggiornati con add nel form - TPrint_section& hh = section('F', last_page); -// hh.reset(); - hh.update(); - const int hhr = hh.height(); - for (int i = 0; i < hhr; i++) - { - pr.print(hh.row(i)); - _RigaCorr++; - } - if (usa_progind()) - progind()->addstatus(1); -} - -bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis) -{ - TCursor* cur = cursor(); - TPrinter& pr = printer(); - if (!InitPrint(codditta)) - return FALSE; - -// Legge dai par.studio l'ordinamento da usare per L - TConfig conf(CONFIG_STUDIO); - const int iChiaveL = (int)conf.get_long("FlStQl", "77"); - if (iChiaveL==2) cur->setkey(1); - else cur->setkey(2); - - 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; - 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(); - return TRUE; -} - -bool TStampaQuadroAggL::user_create() -{ - _form = new TQuadroL("77QL", quadro()); - return TRUE; -} - -bool TStampaQuadroAggL::user_destroy() -{ - delete _form; - return TRUE; -} - +// Stampa base +#include "77stba.h" + + +TBase1::TBase1(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) +{ + r = new TRelation(LF_SOCI); + r->add(LF_ANAG, "TIPOA=TIPOASOC|CODANAGR=CODANAGRSO"); + r->add(LF_ANAGFIS, "CODANAGR=CODANAGR",1, LF_ANAG); + r->add(LF_COMUNI, "COM=COMNASC",1,LF_ANAGFIS); + c = new TCursor(r); + _bAllegSoci=FALSE; +} + +TBase1::~TBase1() +{ + delete r; + delete c; +} + +void TBase1::stampa_corpo(TPrinter& pr) +{ + TPrint_section& body = section('B', first_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); +} + +// accetta solo quelli ATTUALI E con qualifica=A,B o C +bool bFiltraSoci(const TRelation* rel) +{ + TString sQual(3), sAttPrec(3); + sQual = rel->lfile().get("RICQUAL"); + sAttPrec = rel->lfile().get("ATTPREC"); + return (sAttPrec == "A") && (sQual=="A" || sQual=="B" || sQual=="C"); +} + +long TBase1::iContaSoci() +{ + TString filtro(20); + filtro.format("CODDITTA=%d",_codditta); + c->setfilter(filtro); + c->set_filterfunction(bFiltraSoci); + (*c)=0L; + return c->items(); +} + +const int _INIZIO_SOCI=53; + +void TBase1::stampa_soci(TPrinter& pr) +{ + TPrint_section& fut = section('F', first_page); + fut.reset(); + jump_to_line(pr,_INIZIO_SOCI); + const long iSoci = iContaSoci(); + if (iSoci > 11) + { + _bAllegSoci=TRUE; + TPrintrow& rg=fut.row(0); + rg.put("VEDERE ALLEGATO", 25); + pr.print(rg); + _RigaCorr++; + if (usa_progind()) progind()->addstatus(1); + } + else + { + int i=0; + TString sRagsoc,sSesso,sComuneNa,sProvNa,sDataNa,sCodFis,sCodQua; + TString sNome,sCognome; + for ((*c)=0L; c->pos() < c->items(); ++(*c)) + { + TPrintrow& rg=fut.row(i++); + sCodQua=c->file().get("RICQUAL"); + sRagsoc=c->file(LF_ANAG).get("RAGSOC"); + sNome=sRagsoc.mid(30,20); + sCognome=sRagsoc.mid(0,29); + sNome.trim(); + sCognome.trim(); + sRagsoc=sCognome; sRagsoc << " "; sRagsoc << sNome; + sCodFis=c->file(LF_ANAG).get("COFI"); + sDataNa=c->file(LF_ANAGFIS).get("DATANASC"); + sSesso=c->file(LF_ANAGFIS).get("SESSO"); + sComuneNa=c->file(LF_COMUNI).get("DENCOM"); + sProvNa=c->file(LF_COMUNI).get("PROVCOM"); + fut.field(0).set(sRagsoc); + rg.put(sRagsoc,fut.field(0).x()-1); + fut.field(1).set(sSesso); + rg.put(sSesso,fut.field(1).x()-1); + fut.field(2).set(sComuneNa); + rg.put(sComuneNa,fut.field(2).x()-1); + fut.field(3).set(sProvNa); + rg.put(sProvNa,fut.field(3).x()-1); + fut.field(4).set(sDataNa); + rg.put(sDataNa,fut.field(4).x()-1); + fut.field(5).set(sCodFis); + rg.put(sCodFis,fut.field(5).x()-1); + fut.field(6).set(sCodQua); + rg.put(sCodQua,fut.field(6).x()-1); + pr.print(rg); + _RigaCorr++; + if (usa_progind()) progind()->addstatus(1); + } + } +} + +bool TBase1::print(const long codditta, const long NumFis, const long NumNoFis) +{ + TCursor* cur = cursor(); + TPrinter& pr = printer(); + _codditta=codditta; + + if (!InitPrint(codditta)) + return FALSE; + pr.formlen(BASE_FORMLEN); + + (*cur)=0L; + if (_modulaser) + { + ClearFlagModulaser(); + TPrintrow r; + if (!_GiaMessoStartDoc) + put_modulaser(r, STARTDOC); + put_modulaser(r, STARTDITTA); + put_modulaser(r, STARTPAGE, 1); + pr.print(r); + _RigaCorr++; + } + jump_to_line(pr, prima_riga(PRIMA)); + stampa_corpo(pr); + stampa_soci(pr); + next_page(pr); + close_print(); + return TRUE; +} + +void TBase2::stampa_corpo(TPrinter& pr) +{ + TPrint_section& body = section('B', even_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); +} + +bool TBase2::print(const long codditta, const long NumFis, const long NumNoFis) +{ + TCursor* cur = cursor(); + TPrinter& pr = printer(); + _codditta=codditta; + filtra(codditta); + _RigaCorr=0; + (*cur)=0L; + jump_to_line(pr, prima_riga(PRIMA)); + stampa_corpo(pr); + next_page(pr); + close_print(); + return TRUE; +} + +void TBase3::stampa_testata(TPrinter& pr) +{ + TPrint_section& hh = section('H', first_page); + hh.reset(); + hh.update(); + const int hhr = hh.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(hh.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +int TBase3::stampa_L(TPrinter& pr,const int iChiaveL) +{ + long codit=0L; + TPrint_section& body = section('B', odd_page); + body.reset(); + + TCursor& cur = *cursor(); +// Le chiavi nel file e nel .ini sono saggiamente scambiate + if (iChiaveL==2) cur.setkey(1); + else cur.setkey(2); + + filtra(_codditta); + cur=0L; + + bool finito=FALSE; + int righe=0; + 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; + codit=cur.file().get_long("CODDITTA"); + bool buono=codit==_codditta; +// Guarda se e' necessario stampare l'aggiuntivo + _bAggiuntivoL = buono && righe>14; + finito=righe>14 || codit!=_codditta; + } + return righe; +} + +void TBase3::stampa_totali_L(TPrinter& pr) +{ +// La sezione f last contiene solo due totali aggiornati con add nel form + TPrint_section& hh = section('F', last_page); +// hh.reset(); + hh.update(); + const int hhr = hh.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(hh.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +bool TBase3::print(const long codditta, const long NumFis, const long NumNoFis) +{ + _bAggiuntivoL=TRUE; + TCursor* cur = cursor(); + TPrinter& pr = printer(); + _codditta=codditta; + filtra(codditta); + _RigaCorr=0; + (*cur)=0L; + jump_to_line(pr, prima_riga(PRIMA)); +// Stampa i codici concessione e tesoreria + stampa_testata(pr); +// Legge dai par.studio l'ordinamento da usare per L + TConfig conf(CONFIG_STUDIO); + const int iChiaveL = (int)conf.get_long("FlStQl", "77"); + const int righe_stampate=stampa_L(pr,iChiaveL); +// Se la stampa prosegue i totali vanno sull'aggiuntivo NON qui + if (!_bAggiuntivoL) + { + jump_to_line(pr,_RIGA_TOTALI_L); + stampa_totali_L(pr); + } + next_page(pr); + close_print(); + return TRUE; +} + +const char* TRigaN::sMeseRif() const +{ + __dep16=""; + __dep16 << _MeseRif; + return __dep16; +} + +const char* TRigaN::sAnnoRif() const +{ + __dep16=""; + __dep16 << _AnnoRif; + return __dep16; +} + +// Ordina le righe N per periodo di riferimento +int TRigaN::compare(const TSortable& s) const +{ + const TRigaN& rec = (const TRigaN&)s; + const int da = _AnnoRif - rec._AnnoRif; + const int dm = _MeseRif - rec._MeseRif; + if (da==0) + return dm; + else + return da; +} + +TRigaN::TRigaN(const TLocalisamfile& qn) +{ + _pos = qn.recno(); + + const TRectype& rec = qn.curr(); + + _MeseRif = rec.get_int("MESERIF"); + _AnnoRif = rec.get_int("ANNORIF"); +// Nel quadro R si chiama diversamente @!#@!!! + if (qn.num() == LF_QUAN) + _ImpRimb = rec.get_real("IMPOSTA"); + else + _ImpRimb = rec.get_real("IMPRIMB"); + _CompAss = rec.get_real("COMPENSI"); +} + +int TRigheNR::fill(const long codditta,TLocalisamfile& qnr) +{ + long ditta=0L; +// Si posiziona sul primo della ditta corrente + qnr.zero(); + qnr.put("CODDITTA",codditta); + qnr.read()==NOERR; + ditta=qnr.get_long("CODDITTA"); + if (ditta!=codditta) return 0; + +// Legge tutti quelli della ditta corrente + for (; !qnr.eof(); qnr.next()) + { + ditta=qnr.get_long("CODDITTA"); + if (ditta!=codditta) break; + + TRigaN* n = new TRigaN(qnr); + if (n->pos() >= 0) + _data.add(n); + else + delete n; + } + _data.sort(); + const int i = _data.items(); + return i; +} + +const char* TRigaQT::sMesePag() const +{ + __dep16=""; + __dep16 << _MesePag; + return __dep16; +} + +const char* TRigaQT::sAnnoPag() const +{ + __dep16=""; + __dep16 << _AnnoPag; + return __dep16; +} + +// Ordina le righe N per periodo di riferimento +int TRigaQT::compare(const TSortable& s) const +{ + const TRigaQT& rec = (const TRigaQT&)s; + const int da = _AnnoPag - rec._AnnoPag; + const int dm = _MesePag - rec._MesePag; + if (da==0) + return dm; + else + return da; +} + +TRigaQT::TRigaQT(const TLocalisamfile& qt) +{ + const TRectype& rec = qt.curr(); + + _MesePag = rec.get_int("MESEPAG"); + _AnnoPag = rec.get_int("ANNOPAG"); + _ContVers = rec.get_real("CONTVERS"); + _ContRimb = rec.get_real("CONTRIMB"); + _Interessi=rec.get_real("INTERESSI"); + _sCodReg=rec.get("CODREG"); +} + +int TRigheQT::fill(const long codditta,TLocalisamfile& qt) +{ + long ditta=0L; +// Si posiziona sul primo della ditta corrente + qt.zero(); + qt.put("CODDITTA",codditta); + qt.read()==NOERR; + ditta=qt.get_long("CODDITTA"); + if (ditta!=codditta) return 0; + +// Legge tutti quelli della ditta corrente + for (; !qt.eof(); qt.next()) + { + ditta=qt.get_long("CODDITTA"); + if (ditta!=codditta) break; + + TRigaQT* n = new TRigaQT(qt); + if (n->pos() >= 0) + _data.add(n); + else + delete n; + } + _data.sort(); + const int i = _data.items(); + return i; +} + +// Ordina le righe N per periodo di riferimento +int TRigaPS::compare(const TSortable& s) const +{ + const TRigaPS& rec = (const TRigaPS&)s; + return _dDvpos() >= 0) + _data.add(n); + else + delete n; + } + _data.sort(); + const int i = _data.items(); + return i; +} + +void TBase4::stampa_testata(TPrinter& pr) +{ + TPrint_section& hh = section('H', first_page); + hh.reset(); + hh.update(); + const int hhr = hh.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(hh.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +void TBase4::fill_riga_QT(TPrint_section& sec,const int num) +{ + TString sVal; + int start=0,end=5; + for (int i = start; i < end; i++) + { + TForm_item& fi = sec.field(i); + if (num < _righeQT.items()) + { + const TRigaQT& rN = _righeQT[num]; + if (i==start) + sVal=rN.sMesePag(); + else if (i==start+1) + sVal=rN.sAnnoPag(); + else if (i==start+2) + sVal=rN.ContVers(fi.picture()); + else if (i==start+3) + sVal=rN.ContRimb(fi.picture()); + else if (i==start+4) + sVal=rN.Interessi(fi.picture()); + else if (i==start+5) + sVal=rN.CodReg(); + } + else + sVal=""; + fi.set(sVal); + TPrintrow& row=sec.row(0); + row.put(sVal,fi.x()-1); + } +} + +void TBase4::stampa_Q(TPrinter& pr) +{ + TPrint_section& body = section('F', even_page); + body.reset(); + TLocalisamfile qp(LF_QUAQ); + _righeQT.fill(_codditta,qp); + _bAggQ = _righeQT.items() > _RIGHE_Q; + + int riga=0; + bool FinitaSezione=FALSE; + while (!FinitaSezione) + { +// Stampa la parte sinistra (primi 4 campi) + fill_riga_QT(body,riga); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + riga++; + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); + FinitaSezione=riga>_RIGHE_Q-1; + } +// Salta due righe alla fine + stampa_righe_vuote(pr,2); +} + +void TBase4::stampa_T(TPrinter& pr) +{ + TPrint_section& body = section('F', odd_page); + body.reset(); + TLocalisamfile qp(LF_QUAT); + _righeQT.fill(_codditta,qp); + _bAggT = _righeQT.items() > _RIGHE_T; + + int riga=0; + bool FinitaSezione=FALSE; + while (!FinitaSezione) + { +// Stampa la parte sinistra (primi 4 campi) + fill_riga_QT(body,riga); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + riga++; + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); + FinitaSezione=riga>_RIGHE_T-1; + } +} + +void TBase4::fill_riga_PS(TPrint_section& sec,const int num) +{ + TString sVal; + int start=0,end=7; + for (int i = start; i < end; i++) + { + TForm_item& fi = sec.field(i); + if (num < _righePS.items()) + { + const TRigaPS& rN = _righePS[num]; + if (i==start) + sVal=rN.sImposta(); + else if (i==start+1) + sVal=rN.sIntDip(); + else if (i==start+2) + sVal=rN.sIntDat(); + else if (i==start+3) + sVal=rN.sTipoVers(); + else if (i==start+4) + sVal=rN.sCodTrib(); + else if (i==start+5) + { + TDate dat(rN.sDataVers()); + TFormatted_date d(dat); + d.set_format(fi.picture()); + sVal=d.string(); + } + else if (i==start+6) + sVal=rN.sSerie(); + else if (i==start+7) + sVal=rN.sNumero(); + } + else + sVal=""; + fi.set(sVal); + fi.update(); +// TPrintrow& row=sec.row(0); +// row.put(sVal,fi.x()-1); + } +} + +void TBase4::stampa_P(TPrinter& pr) +{ + TPrint_section& body = section('H', even_page); + body.reset(); + TLocalisamfile qp(LF_QUAP); + _righePS.fill(_codditta,qp); + const int items=_righePS.items(); + _bAggP = items > _RIGHE_P; + + int riga=0; + bool FinitaSezione=FALSE; + while (!FinitaSezione) + { + fill_riga_PS(body,riga); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + riga++; + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); + FinitaSezione=riga>_RIGHE_P-1; + } +// Salta due righe alla fine + stampa_righe_vuote(pr,2); +} + +void TBase4::stampa_S(TPrinter& pr) +{ + TPrint_section& body = section('H', even_page); + body.reset(); + TLocalisamfile qp(LF_QUAS); + _righePS.fill(_codditta,qp); + _bAggS = _righePS.items() > _RIGHE_S; + + int riga=0; + bool FinitaSezione=FALSE; + while (!FinitaSezione) + { + fill_riga_PS(body,riga); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + riga++; + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); + FinitaSezione=riga>_RIGHE_S-1; + } +// Salta due righe alla fine + stampa_righe_vuote(pr,2); +} + +void TBase4::stampa_R(TPrinter& pr) +{ + TPrint_section& body = section('B', even_page); + body.reset(); + TLocalisamfile qr(LF_QUAR); + _righeNR.fill(_codditta,qr); + const int items=_righeNR.items(); +// se iRigheNR > 2 => bisogna stampare anche l'allegato + _bAggR = items > _RIGHE_R; + fill_riga_NR(body,0,0); + fill_riga_NR(body,1,1); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); +// Salta due righe alla fine + stampa_righe_vuote(pr,2); +} + +void TBase4::fill_riga_NR(TPrint_section& sec,const int num, const int side) +{ + TString sVal; + int start,end; + if (side==0) + { + start=0; + end=4; + } + else + { + start=4; + end=8; + } + for (int i = start; i < end; i++) + { + TForm_item& fi = sec.field(i); + if (num < _righeNR.items()) + { + const TRigaN& rN = _righeNR[num]; + if (i==start) + sVal=rN.sMeseRif(); + else if (i==start+1) + sVal=rN.sAnnoRif(); + else if (i==start+2) + sVal=rN.ImpRimb(fi.picture()); + else if (i==start+3) + sVal=rN.CompAss(fi.picture()); + } + else + sVal=""; + fi.set(sVal); + TPrintrow& row=sec.row(0); + row.put(sVal,fi.x()-1); + } +} + +void TBase4::stampa_righe_vuote(TPrinter& pr,const int righe) +{ + TPrintrow rr; + for (int i=0; iaddstatus(1); + } +} + +void TBase4::stampa_N(TPrinter& pr) +{ + TPrint_section& body = section('B', odd_page); + body.reset(); + TLocalisamfile qn(LF_QUAN); + _righeNR.fill(_codditta,qn); +// se iRigheN > 6 => bisogna stampare anche l'allegato + _bAggN = _righeNR.items() > _RIGHE_N; + + int num=0; + int riga=0; + bool FinitaSezione=FALSE; + while (!FinitaSezione) + { +// Stampa la parte sinistra (primi 4 campi) + fill_riga_NR(body,num,0); + num+=3; + fill_riga_NR(body,num,1); + TPrintrow& rr=body.row(0); + pr.print(rr); + rr.reset(); + riga++; + _RigaCorr++; + if (usa_progind()) + progind()->addstatus(1); + num-=2; + FinitaSezione=riga>2; + } +// Salta due righe alla fine + stampa_righe_vuote(pr,2); +} + +void TBase4::stampa_fine(TPrinter& pr) +{ + TPrint_section& sec = section('F', first_page); + + sec.reset(); + sec.update(); + const int hhr = sec.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(sec.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +bool TBase4::print(const long codditta, const long NumFis, const long NumNoFis) +{ + _bAggN=_bAggP=_bAggR=_bAggQ=_bAggS=_bAggT=FALSE; + TCursor* cur = cursor(); + TPrinter& pr = printer(); + _codditta=codditta; + filtra(codditta); + _RigaCorr=0; + (*cur)=0L; + jump_to_line(pr, prima_riga(PRIMA)); +// Stampa da M1 a M6 + stampa_testata(pr); + stampa_N(pr); + stampa_P(pr); + stampa_Q(pr); + stampa_R(pr); + stampa_S(pr); + stampa_T(pr); + stampa_fine(pr); + next_page(pr); + close_print(); + return TRUE; +} + +bool TStampaBase::user_create() +{ + _fBase1 = new TBase1("77base1", "Base"); + _fBase2 = new TBase2("77base2", "Base"); + _fBase3 = new TBase3("77base3", "Base"); + _fBase4 = new TBase4("77base4", "Base"); +// Adesso bisogna chiamare set_cursor per impostare il cursore dentro +// al form. Sarebbe meglio fare in modo che il form usi sempre il cursore +// letto dal .frm, senza bisogno di passarglielo dall'applicazione + _cur = _fBase1->TForm::cursor(); + _fBase1->set_cursor(_cur); + _cur2 = _fBase2->TForm::cursor(); + _fBase2->set_cursor(_cur2); + _cur3 = _fBase3->TForm::cursor(); + _fBase3->set_cursor(_cur3); + _cur4 = _fBase4->TForm::cursor(); + _fBase4->set_cursor(_cur4); + return TRUE; +} + +bool TStampaBase::user_destroy() +{ + delete _fBase1; + delete _fBase2; + delete _fBase3; + delete _fBase4; + return TRUE; +} + +bool TStampaBase::print_quadro(const int OffsetDitta, const bool modulaser) +{ + int start=0, last=0; + +// Setta formlen prima di printer.open per avere la lunghezza giusta nel caso di +// stampa a video + printer().formlen(BASE_FORMLEN); + bool ok = printer().open(); + + _fBase1->set_modulaser(modulaser); + _fBase2->set_modulaser(modulaser); + _fBase3->set_modulaser(modulaser); + _fBase4->set_modulaser(modulaser); + +// Dice se deve eseguire il posizionamento del foglio. +// Se stampa piu' ditte va eseguito solo sulla prima +// Occhio a non spostarlo nel ciclo. + _fBase1->set_posiziona(TRUE); + + if (OffsetDitta >= 0) + { + start = OffsetDitta; + last = OffsetDitta; + } + else + last = ditte().items() - 1; + + for (int i = start; i <= last; i++) + { + TString CoFiDic(20); + TToken_string riga(ditte()[i]); + const long codditta = atol(riga.get(0)); + const TipoDitta tipo = (TipoDitta)riga.get_int(1); + const long fis = riga.get_long(2); + const long nofis = riga.get_long(3); + const bool LastFis = (bool)riga.get_int(4); + const bool LastNoFis = (bool)riga.get_int(5); + +// I gruppi dich-estinti hanno totali comuni +// Si presume che nell'array vengano messi nell'ordine dich-estinti + if (tipo == normale || tipo == dichiarante) + _fBase1->azzera_totali(); + + if (tipo == estinto) + CoFiDic = riga.get(6); + +// Dice al form che tipo di ditta si stampa + _fBase1->set_tipo_ditta(tipo); + +// Numera i fogli a partire da 1 per ogni ditta normale e da 1 e di seguito negli estinti +// per i sogg. dichiaranti + if (tipo == normale || tipo == dichiarante) + _fBase1->set_num_foglio(1); + +// Se la ditta e' estinta dice al form il cod.fis. del dichiarante + if (tipo == estinto) + _fBase1->set_cofi_dic(CoFiDic); + +// Dice al form che e' l'ultima ditta + if (i == last) + _fBase1->set_last_ditta(TRUE); + + _fBase1->print(codditta, fis, nofis); + _fBase2->print(codditta, fis, nofis); + _fBase3->print(codditta, fis, nofis); + _fBase4->print(codditta, fis, nofis); + } + printer().close(); + return ok; +} + +void TQuadroL::stampa_testata(TPrinter& pr) +{ + TPrint_section& hh = section('H', first_page); + hh.reset(); + hh.update(); + const int hhr = hh.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(hh.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL) +{ + long codit=0L; + bool eof=FALSE; + TPrint_section& body = section('B', odd_page); + body.reset(); + TCursor& cur = *cursor(); + cur=lStartRec; + bool finito=FALSE; + int righe=0; + + 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; + } + return eof; +} + +void TQuadroL::stampa_totali_L(TPrinter& pr) +{ +// La sezione f last contiene solo due totali aggiornati con add nel form + TPrint_section& hh = section('F', last_page); +// hh.reset(); + hh.update(); + const int hhr = hh.height(); + for (int i = 0; i < hhr; i++) + { + pr.print(hh.row(i)); + _RigaCorr++; + } + if (usa_progind()) + progind()->addstatus(1); +} + +bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis) +{ + TCursor* cur = cursor(); + TPrinter& pr = printer(); + if (!InitPrint(codditta)) + return FALSE; + +// Legge dai par.studio l'ordinamento da usare per L + TConfig conf(CONFIG_STUDIO); + const int iChiaveL = (int)conf.get_long("FlStQl", "77"); + if (iChiaveL==2) cur->setkey(1); + else cur->setkey(2); + + 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; + 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(); + return TRUE; +} + +bool TStampaQuadroAggL::user_create() +{ + _form = new TQuadroL("77QL", quadro()); + return TRUE; +} + +bool TStampaQuadroAggL::user_destroy() +{ + delete _form; + return TRUE; +} + diff --git a/m770/77stba.h b/m770/77stba.h index efcbd869f..d0f021b2f 100755 --- a/m770/77stba.h +++ b/m770/77stba.h @@ -1,288 +1,289 @@ -#ifndef _77STBA_H -#define _77STBA_H - -#include "77stq.h" - -HIDDEN const int BASE_FORMLEN = 73; -HIDDEN const int BASE_PAGINE = 4; -const int _RIGHE_N = 6; -const int _RIGHE_R = 2; -const int _RIGHE_P = 4; -const int _RIGHE_Q = 4; -const int _RIGHE_S = 4; -const int _RIGHE_T = 4; - -class TBase1 : public TDicForm -{ - private: - long _codditta; - TRelation* r; // usate per contare i soci - TCursor* c; - bool _bAllegSoci; - long iContaSoci(); - protected: - void stampa_corpo(TPrinter& pr); - void stampa_soci(TPrinter& pr); - bool bAllegSoci() const { return _bAllegSoci; } - virtual int dic_form_len() const { return BASE_FORMLEN-2; } - virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } - virtual void stampa_totali(TPrinter& pr) {} - virtual void aggiorna_totali(const char tipo) {} - virtual void set_body(TPrinter& pr, const char tipo) {} - virtual int prima_riga(PaginaQuadro p) const { return 11; } - public: - virtual bool print(const long codditta, const long NumFis, const long NumNoFis); - TBase1(const char* sNomeForm, const char* quadro); - virtual ~TBase1(); -}; - -const int _INIZIO_SOCI=56; - -class TBase2 : public TDicForm -{ - private: - long _codditta; - protected: - void stampa_corpo(TPrinter& pr); - virtual int dic_form_len() const { return BASE_FORMLEN; } - virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } - virtual void set_body(TPrinter& pr, const char tipo) {} - virtual int prima_riga(PaginaQuadro p) const { return 3;} - public: - virtual bool print(const long codditta, const long NumFis, const long NumNoFis); - TBase2(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} - virtual ~TBase2() {} -}; - -class TBase3 : public TDicForm -{ - private: - long _codditta; - bool _bAggiuntivoL; // se necessario stampare aggiuntivo L - protected: - void stampa_testata(TPrinter& pr); - void stampa_totali_L(TPrinter& pr); - bool aggiuntivoL() const { return _bAggiuntivoL; } - int stampa_L(TPrinter& pr,const int iChiaveL); - virtual int dic_form_len() const { return BASE_FORMLEN; } - virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } - virtual void set_body(TPrinter& pr, const char tipo) {} - virtual int prima_riga(PaginaQuadro p) const { return 3;} - public: - virtual bool print(const long codditta, const long NumFis, const long NumNoFis); - TBase3(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} - virtual ~TBase3() {} -}; - -const int _RIGA_TOTALI_L = 65; - -class TRigaN : public TSortable -{ - TRecnotype _pos; - int _MeseRif,_AnnoRif; // periodo di riferimento - real _ImpRimb,_CompAss; // importi - -public: - virtual int compare(const TSortable& s) const; - TRecnotype pos() const { return _pos; } - - const char* sMeseRif() const; - const char* sAnnoRif() const; - const int iMeseRif() const { return _MeseRif; } - const int iAnnoRif() const { return _AnnoRif; } - const char* ImpRimb(const char* pic) const { return _ImpRimb.string(pic); } - const char* CompAss(const char* pic) const { return _CompAss.string(pic); } - TRigaN(const TLocalisamfile& qn); - virtual ~TRigaN() { } -}; - -class TRigheNR : public TObject -{ - TArray _data; - - protected: - const TRigaN& rigaN(int i) const { return (const TRigaN&)_data[i]; } - - public: - const TRigaN& operator[](int i) const { return rigaN(i); } - - int fill(const long codditta,TLocalisamfile& qnr); - int items() const { return _data.items(); } - - TRigheNR() { } - virtual ~TRigheNR() { } -}; - -class TRigaQT : public TSortable -{ - int _MesePag,_AnnoPag; // periodo di riferimento - real _ContVers,_ContRimb,_Interessi; // importi - TString _sCodReg; - TRecnotype _pos; -public: - virtual int compare(const TSortable& s) const; - TRecnotype pos() const { return _pos; } - const char* sMesePag() const; - const char* sAnnoPag() const; - const int iMesePag() const { return _MesePag; } - const int iAnnoPag() const { return _AnnoPag; } - const char* ContVers(const char* pic) const { return _ContVers.string(pic); } - const char* ContRimb(const char* pic) const { return _ContRimb.string(pic); } - const char* Interessi(const char* pic) const { return _Interessi.string(pic); } - const char* CodReg() const { return (const char*)_sCodReg; } - TRigaQT(const TLocalisamfile& qt); - virtual ~TRigaQT() { } -}; - -class TRigheQT : public TObject -{ - TArray _data; - - protected: - const TRigaQT& rigaQT(int i) const { return (const TRigaQT&)_data[i]; } - - public: - const TRigaQT& operator[](int i) const { return rigaQT(i); } - - int fill(const long codditta,TLocalisamfile& qt); - int items() const { return _data.items(); } - - TRigheQT() {} - virtual ~TRigheQT() {} -}; - -class TRigaPS : public TSortable -{ - TDate _dDv; // data vers. - real _rImp,_rIntDip,_rIntDat; // importi - TString _sTipoV,_sCodTrib,_sSerie,_sNumero; - TRecnotype _pos; - public: - virtual int compare(const TSortable& s) const; - TRecnotype pos() const { return _pos; } - TDate dDataVers() const { return _dDv; } - const char* sDataVers(const char* pic) const { return _dDv.string(); } - const char* sImposta(const char* pic) const { return _rImp.string(pic); } - const char* sIntDip(const char* pic) const { return _rIntDip.string(pic); } - const char* sIntDat(const char* pic) const { return _rIntDat.string(pic); } - const char* sTipoVers() const { return (const char*)_sTipoV; } - const char* sCodTrib() const { return (const char*)_sCodTrib; } - const char* sSerie() const { return (const char*)_sSerie; } - const char* sNumero() const { return (const char*)_sNumero; } - TRigaPS(const TLocalisamfile& qt); - virtual ~TRigaPS() { } -}; - -class TRighePS : public TObject -{ - TArray _data; - - protected: - const TRigaPS& rigaPS(int i) const { return (const TRigaPS&)_data[i]; } - - public: - const TRigaPS& operator[](int i) const { return rigaPS(i); } - int fill(const long codditta,TLocalisamfile& ps); - int items() const { return _data.items(); } - TRighePS() {} - virtual ~TRighePS() {} -}; - -class TBase4 : public TDicForm -{ - private: - long _codditta; - TRigheNR _righeNR; // array dei record N e R - TRigheQT _righeQT; - TRighePS _righePS; - bool _bAggN,_bAggP,_bAggR,_bAggQ,_bAggS,_bAggT; - protected: - void stampa_righe_vuote(TPrinter& pr,const int righe); - void fill_riga_QT(TPrint_section& sec,const int num); - void fill_riga_PS(TPrint_section& sec,const int num); - void fill_riga_NR(TPrint_section& sec,const int num, const int side); - void stampa_testata(TPrinter& pr); - void stampa_fine(TPrinter& pr); - void stampa_N(TPrinter& pr); - void stampa_P(TPrinter& pr); - void stampa_Q(TPrinter& pr); - void stampa_R(TPrinter& pr); - void stampa_S(TPrinter& pr); - void stampa_T(TPrinter& pr); - virtual int dic_form_len() const { return BASE_FORMLEN; } - virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } - virtual void set_body(TPrinter& pr, const char tipo) {} - virtual int prima_riga(PaginaQuadro p) const { return 3;} - public: - virtual bool print(const long codditta, const long NumFis, const long NumNoFis); - TBase4(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} - virtual ~TBase4() {} -}; - -const int _FIELD_L = 740; - -class TStampaBase : public TStampaQuadro -{ - private: - TBase1* _fBase1; - TBase2* _fBase2; - TBase3* _fBase3; - TBase4* _fBase4; - TRelation* _rel; - TCursor* _cur, *_cur2, *_cur3, *_cur4; - - protected: - virtual bool user_create(); - virtual bool user_destroy(); - virtual bool conta_tipi_per() const { return FALSE; } - virtual TDicForm* get_form() const { return _fBase1; } - virtual TCursor* get_cursor() const { return _cur; } - virtual bool print_quadro(const int OffsetDitta, const bool modulaser); - - public: - TStampaBase(char livel) : TStampaQuadro("Base", livel) { } -}; - -/////////////////////////////////////////////////////////////////////////////////////////// -// -// Quadro L aggiuntivo -// -/////////////////////////////////////////////////////////////////////////////////////////// -class TQuadroL : public TDicForm -{ - private: - long _codditta; - protected: - void stampa_testata(TPrinter& pr); - void stampa_totali_L(TPrinter& pr); - bool stampa_L(TPrinter& pr,const long lStartRec,const int iRecL); - virtual int dic_form_len() const { return BASE_FORMLEN; } - virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } - virtual void set_body(TPrinter& pr, const char tipo) {} - virtual int prima_riga(PaginaQuadro p) const { return 3;} - public: - virtual bool print(const long codditta, const long NumFis, const long NumNoFis); - TQuadroL(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} - virtual ~TQuadroL() {} -}; - -const int _RIGA_TOTALI_AGG_L = 65; -const long _START_AGG_L = 17L; -const int _REC_PRIMA_AGG_L = 12; -const int _REC_SECONDA_AGG_L = 14; - -class TStampaQuadroAggL : public TStampaQuadro -{ - TQuadroL* _form; - protected: - virtual bool user_create(); - virtual bool user_destroy(); - virtual TDicForm* get_form() const { return _form; } - - public: - TStampaQuadroAggL(const char* quadro, char liv):TStampaQuadro(quadro, liv) {} - virtual ~TStampaQuadroAggL() { } -}; - - -#endif +#ifndef _77STBA_H +#define _77STBA_H + +#include "77stq.h" + +HIDDEN const int BASE_FORMLEN = 73; +HIDDEN const int BASE_PAGINE = 4; +const int _RIGHE_N = 6; +const int _RIGHE_R = 2; +const int _RIGHE_P = 4; +const int _RIGHE_Q = 4; +const int _RIGHE_S = 4; +const int _RIGHE_T = 4; + +class TBase1 : public TDicForm +{ + private: + long _codditta; + TRelation* r; // usate per contare i soci + TCursor* c; + bool _bAllegSoci; + long iContaSoci(); + protected: + void stampa_corpo(TPrinter& pr); + void stampa_soci(TPrinter& pr); + bool bAllegSoci() const { return _bAllegSoci; } + virtual int dic_form_len() const { return BASE_FORMLEN-2; } + virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } + virtual void stampa_totali(TPrinter& pr) {} + virtual void aggiorna_totali(const char tipo) {} + virtual void set_body(TPrinter& pr, const char tipo) {} + virtual int prima_riga(PaginaQuadro p) const { return 11; } + public: + virtual bool print(const long codditta, const long NumFis, const long NumNoFis); + TBase1(const char* sNomeForm, const char* quadro); + virtual ~TBase1(); +}; + +class TBase2 : public TDicForm +{ + private: + long _codditta; + protected: + void stampa_corpo(TPrinter& pr); + virtual int dic_form_len() const { return BASE_FORMLEN; } + virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } + virtual void set_body(TPrinter& pr, const char tipo) {} + virtual int prima_riga(PaginaQuadro p) const { return 3;} + public: + virtual bool print(const long codditta, const long NumFis, const long NumNoFis); + TBase2(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} + virtual ~TBase2() {} +}; + +class TBase3 : public TDicForm +{ + private: + long _codditta; + bool _bAggiuntivoL; // se necessario stampare aggiuntivo L + protected: + void stampa_testata(TPrinter& pr); + void stampa_totali_L(TPrinter& pr); + bool aggiuntivoL() const { return _bAggiuntivoL; } + int stampa_L(TPrinter& pr,const int iChiaveL); + virtual int dic_form_len() const { return BASE_FORMLEN; } + virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } + virtual void set_body(TPrinter& pr, const char tipo) {} + virtual int prima_riga(PaginaQuadro p) const { return 3;} + public: + virtual bool print(const long codditta, const long NumFis, const long NumNoFis); + TBase3(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} + virtual ~TBase3() {} +}; + +const int _RIGA_TOTALI_L = 65; + +class TRigaN : public TSortable +{ + TRecnotype _pos; + int _MeseRif,_AnnoRif; // periodo di riferimento + real _ImpRimb,_CompAss; // importi + +public: + virtual int compare(const TSortable& s) const; + TRecnotype pos() const { return _pos; } + + const char* sMeseRif() const; + const char* sAnnoRif() const; + const int iMeseRif() const { return _MeseRif; } + const int iAnnoRif() const { return _AnnoRif; } + const char* ImpRimb(const char* pic) const { return _ImpRimb.string(pic); } + const char* CompAss(const char* pic) const { return _CompAss.string(pic); } + TRigaN(const TLocalisamfile& qn); + virtual ~TRigaN() { } +}; + +class TRigheNR : public TObject +{ + TArray _data; + + protected: + const TRigaN& rigaN(int i) const { return (const TRigaN&)_data[i]; } + + public: + const TRigaN& operator[](int i) const { return rigaN(i); } + + int fill(const long codditta,TLocalisamfile& qnr); + int items() const { return _data.items(); } + + TRigheNR() { } + virtual ~TRigheNR() { } +}; + +class TRigaQT : public TSortable +{ + int _MesePag,_AnnoPag; // periodo di riferimento + real _ContVers,_ContRimb,_Interessi; // importi + TString _sCodReg; + TRecnotype _pos; +public: + virtual int compare(const TSortable& s) const; + TRecnotype pos() const { return _pos; } + const char* sMesePag() const; + const char* sAnnoPag() const; + const int iMesePag() const { return _MesePag; } + const int iAnnoPag() const { return _AnnoPag; } + const char* ContVers(const char* pic) const { return _ContVers.string(pic); } + const char* ContRimb(const char* pic) const { return _ContRimb.string(pic); } + const char* Interessi(const char* pic) const { return _Interessi.string(pic); } + const char* CodReg() const { return (const char*)_sCodReg; } + TRigaQT(const TLocalisamfile& qt); + virtual ~TRigaQT() { } +}; + +class TRigheQT : public TObject +{ + TArray _data; + + protected: + const TRigaQT& rigaQT(int i) const { return (const TRigaQT&)_data[i]; } + + public: + const TRigaQT& operator[](int i) const { return rigaQT(i); } + + int fill(const long codditta,TLocalisamfile& qt); + int items() const { return _data.items(); } + + TRigheQT() {} + virtual ~TRigheQT() {} +}; + +class TRigaPS : public TSortable +{ + TDate _dDv; // data vers. + real _rImp,_rIntDip,_rIntDat; // importi + TString _sTipoV,_sCodTrib,_sSerie,_sNumero; + TRecnotype _pos; + public: + virtual int compare(const TSortable& s) const; + TRecnotype pos() const { return _pos; } + TDate dDataVers() const { return _dDv; } + const char* sDataVers() const { return _dDv.string(); } + const char* sImposta() const; + const char* sIntDip() const; + const char* sIntDat() const; + const char* sImposta(const char* pic) const { return _rImp.string(pic); } + const char* sIntDip(const char* pic) const { return _rIntDip.string(pic); } + const char* sIntDat(const char* pic) const { return _rIntDat.string(pic); } + const char* sTipoVers() const { return (const char*)_sTipoV; } + const char* sCodTrib() const { return (const char*)_sCodTrib; } + const char* sSerie() const { return (const char*)_sSerie; } + const char* sNumero() const { return (const char*)_sNumero; } + TRigaPS(const TLocalisamfile& qt); + virtual ~TRigaPS() { } +}; + +class TRighePS : public TObject +{ + TArray _data; + + protected: + const TRigaPS& rigaPS(int i) const { return (const TRigaPS&)_data[i]; } + + public: + const TRigaPS& operator[](int i) const { return rigaPS(i); } + int fill(const long codditta,TLocalisamfile& ps); + int items() const { return _data.items(); } + TRighePS() {} + virtual ~TRighePS() {} +}; + +class TBase4 : public TDicForm +{ + private: + long _codditta; + TRigheNR _righeNR; // array dei record N e R + TRigheQT _righeQT; + TRighePS _righePS; + bool _bAggN,_bAggP,_bAggR,_bAggQ,_bAggS,_bAggT; + protected: + void stampa_righe_vuote(TPrinter& pr,const int righe); + void fill_riga_QT(TPrint_section& sec,const int num); + void fill_riga_PS(TPrint_section& sec,const int num); + void fill_riga_NR(TPrint_section& sec,const int num, const int side); + void stampa_testata(TPrinter& pr); + void stampa_fine(TPrinter& pr); + void stampa_N(TPrinter& pr); + void stampa_P(TPrinter& pr); + void stampa_Q(TPrinter& pr); + void stampa_R(TPrinter& pr); + void stampa_S(TPrinter& pr); + void stampa_T(TPrinter& pr); + virtual int dic_form_len() const { return BASE_FORMLEN; } + virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } + virtual void set_body(TPrinter& pr, const char tipo) {} + virtual int prima_riga(PaginaQuadro p) const { return 3;} + public: + virtual bool print(const long codditta, const long NumFis, const long NumNoFis); + TBase4(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} + virtual ~TBase4() {} +}; + +const int _FIELD_L = 740; + +class TStampaBase : public TStampaQuadro +{ + private: + TBase1* _fBase1; + TBase2* _fBase2; + TBase3* _fBase3; + TBase4* _fBase4; + TRelation* _rel; + TCursor* _cur, *_cur2, *_cur3, *_cur4; + + protected: + virtual bool user_create(); + virtual bool user_destroy(); + virtual bool conta_tipi_per() const { return FALSE; } + virtual TDicForm* get_form() const { return _fBase1; } + virtual TCursor* get_cursor() const { return _cur; } + virtual bool print_quadro(const int OffsetDitta, const bool modulaser); + + public: + TStampaBase(char livel) : TStampaQuadro("Base", livel) { } +}; + +/////////////////////////////////////////////////////////////////////////////////////////// +// +// Quadro L aggiuntivo +// +/////////////////////////////////////////////////////////////////////////////////////////// +class TQuadroL : public TDicForm +{ + private: + long _codditta; + protected: + void stampa_testata(TPrinter& pr); + void stampa_totali_L(TPrinter& pr); + bool stampa_L(TPrinter& pr,const long lStartRec,const int iRecL); + virtual int dic_form_len() const { return BASE_FORMLEN; } + virtual void next_page(TPrinter& pr) { fill_page(pr, -1); } + virtual void set_body(TPrinter& pr, const char tipo) {} + virtual int prima_riga(PaginaQuadro p) const { return 3;} + public: + virtual bool print(const long codditta, const long NumFis, const long NumNoFis); + TQuadroL(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {} + virtual ~TQuadroL() {} +}; + +const int _RIGA_TOTALI_AGG_L = 65; +const long _START_AGG_L = 17L; +const int _REC_PRIMA_AGG_L = 12; +const int _REC_SECONDA_AGG_L = 14; + +class TStampaQuadroAggL : public TStampaQuadro +{ + TQuadroL* _form; + protected: + virtual bool user_create(); + virtual bool user_destroy(); + virtual TDicForm* get_form() const { return _form; } + + public: + TStampaQuadroAggL(const char* quadro, char liv):TStampaQuadro(quadro, liv) {} + virtual ~TStampaQuadroAggL() { } +}; + + +#endif diff --git a/m770/77stq.cpp b/m770/77stq.cpp index 37dda5fab..f1520805b 100755 --- a/m770/77stq.cpp +++ b/m770/77stq.cpp @@ -45,7 +45,7 @@ TDicForm::TDicForm(const char* form, const char* quadro) { _can_print_tot_fis = _can_print_tot_nofis = FALSE; _GiaStampatiFis = _GiaStampatiNoFis = _GiaMessoStartDoc = FALSE; - _GiaPosizionato = _posiziona = _modulaser = FALSE; + _GiaPosizionato = _modulaser = FALSE; _LastDitta = _EndPrintDitta = _PaginaPosizionamento = FALSE; ClearFlagModulaser(); } @@ -67,25 +67,19 @@ bool TDicForm::InitPrint(const long codditta) _RigaCorr = 0; TPrinter& pr = printer(); - pr.set_offset(offset_y(), offset_x()); +/* pr.set_offset(offset_y(), offset_x()); pr.set_char_size(fontsize()); // Set font name and size pr.set_fontname(fontname()); // according to current form - - if (_posiziona && !_GiaPosizionato && pr.printtype() == winprinter) - { +*/ + if (!_GiaPosizionato && pr.printtype() == winprinter) posiziona(); -#ifdef DBG - if (!yesno_box("Proseguire con la stampa ?")) - return FALSE; -#endif - } const bool was_open = pr.isopen(); if (!was_open && !pr.open()) return FALSE; - + set_last_page(FALSE); - set_background(1, TRUE); +// set_background(1, TRUE); set_curr_page(PRIMA); do_events(); @@ -215,7 +209,7 @@ bool TDicForm::print(const long codditta, const long NumFis, const long NumNoFis if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; for (int righe=0; righe < QD_RIGHE_SECONDA; righe++) { if (!righe) @@ -617,9 +611,8 @@ void TDicForm::stampa_testata(TPrinter& pr) _RigaCorr++; r.reset(); HEADER_PRIMA_NOPOS--; - } - if (!PaginaPosizionamento()) - fill_page(pr, HEADER_PRIMA_NOPOS); + } + if (!PaginaPosizionamento()) fill_page(pr, HEADER_PRIMA_NOPOS); } pr.print(head.row(j)); @@ -1006,7 +999,7 @@ bool TQuadroG::print(const long codditta, const long NumFis, const long NumNoFis if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; fill_page(pr, HEADER_SECONDA_G); stampa_prospetti3_4(pr); @@ -1232,7 +1225,7 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; for (int righe=0; righe < QGD_RIGHE_SECONDA; righe++) { if (!righe) @@ -1941,7 +1934,7 @@ bool TQuadroD::print(const long codditta, const long NumFis, const long NumNoFis if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; for (int righe=0; righe < QD_RIGHE_SECONDA; righe++) { stampa = TRUE; @@ -2396,7 +2389,7 @@ bool TQuadroD1::print(const long codditta, const long NumFis, const long NumNoFi if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; for (int righe=0; righe < QD1_RIGHE_SECONDA; righe++) { stampa = TRUE; @@ -3327,7 +3320,7 @@ bool TQuadroF::print(const long codditta, const long numfis, const long numnofis if (_PaginaCorrente == SECONDA) { // Reset del flag di pagina con posiz. - if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE; + if (_PaginaPosizionamento) _PaginaPosizionamento = FALSE; if (End_B && End_C && End_D) break; diff --git a/m770/77stq.h b/m770/77stq.h index 8c267d7e8..5fd672765 100755 --- a/m770/77stq.h +++ b/m770/77stq.h @@ -109,7 +109,6 @@ class TDicForm : public TForm virtual void inc_curr_page(); virtual void next_page(TPrinter& pr); bool _modulaser; // se stampa per modulaser - bool _posiziona; // se deve fare posizionamento TipoDitta _tipo_ditta; // tipo ditta: normale, estinto, dichiarante int _num_foglio; // numero foglio TString _cofi_dic; // cod.fis. dichiarante @@ -147,7 +146,7 @@ class TDicForm : public TForm long codditta() const { return _codditta; } void set_codditta(const long ditta) { _codditta = ditta; } - void set_posiziona(const bool posiz) { _posiziona = posiz; _GiaPosizionato = FALSE; } + void set_posiziona(const bool posiz) { _GiaPosizionato = FALSE; } void can_print_tot_fis(const bool canpr) { _can_print_tot_fis = canpr; } void can_print_tot_nofis(const bool canpr) { _can_print_tot_nofis = canpr; } void set_last_ditta(const bool last) { _LastDitta = last; } diff --git a/m770/menu_st.uml b/m770/menu_st.uml index 96f233064..cd03d1991 100755 --- a/m770/menu_st.uml +++ b/m770/menu_st.uml @@ -114,7 +114,7 @@ BUTTON B_BUST 1 1 BEGIN PROMPT 1 ROW6 "" PICTURE 123 - MESSAGE RUN,772MOD,-4,Busta,S + MESSAGE RUN,772MOD,-4,BU,S GROUP 1 END // Fine prima colonna