Patch level :2.2 nopatch

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :stampa movimenti di analitica: prima versione che stampa qualcosa (movimenti per numero registrazione)


git-svn-id: svn://10.65.10.50/trunk@13194 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2005-06-13 17:00:44 +00:00
parent 0b35c0dd99
commit 9867c0c0e5
4 changed files with 259 additions and 80 deletions

View File

@ -135,23 +135,20 @@ TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask()
const bool use_pdcc = cfg.get_bool("UsePdcc");
const int logicnum = use_pdcc ? LF_PCON : LF_PCONANA;
const int nfields = ca_create_fields(*this, 0, logicnum, 2, 5, F_CDC1_INI, F_DES1_INI, 0x0, "#DACONTO");
ca_create_fields(*this, 0, logicnum, 2, 11, F_CDC1_FIN, F_DES1_FIN, 0x0, "#ACONTO");
for (int i = 0; i < nfields; i++)
{
TMask_field& daconto = field(F_CDC1_INI + i);
daconto.set_group(1);
daconto.check_type(CHECK_NORMAL);
TMask_field& aconto = field(F_CDC1_FIN + i);
aconto.set_group(2);
aconto.check_type(CHECK_NORMAL);
}
// creazione dei campi della seconda pagina della maschera
create_page2();
}
////////////////////////////////////////////////////////
// REPORT
////////////////////////////////////////////////////////
class TPrint_movimenti_ca_rep : public TAnal_report
{
};
////////////////////////////////////////////////////////
// APPLICAZIONE
////////////////////////////////////////////////////////
@ -183,7 +180,33 @@ void TPrint_movimenti_ca::main_loop()
{
while (_mask->run() == K_ENTER)
{
//costruzione del ciclo di scansione principale in base ai parametri della maschera
//costruzione della query x il report in base ai parametri della maschera
TSheet_field& sheet = _mask->sfield(F_RIGHE);
const int n_righe_sheet = sheet.items();
//se lo sheet è vuoto aggiunge una riga vuota
if (n_righe_sheet == 0)
sheet.insert();
//report e book
TReport_book book; //book dei report
TString path = _mask->get(F_REPORT);
if (path.empty())
path = "ca3100a";
TPrint_movimenti_ca_rep rep;
rep.load(path);
FOR_EACH_SHEET_ROW(sheet, r, row)
{
TString query;
query << "USE MOVANA\nJOIN RMOVANA INTO NUMREG==NUMREG";
rep.set_recordset(query);
rep.mask2report(*_mask);
book.add(rep);
}
book.print_or_preview(); //stampa il book dei report
}
}

View File

@ -1,11 +1,20 @@
#ifndef __CA3100A_H
#define __CA3100A_H
//pag. stampa mastrini
#define F_CODDITTA 301
#define F_RAGSOC 302
#define F_DATASTAMPA 303
#define F_ANNO 304
//pagina parametri di stampa
#define F_CODDITTA 201
#define F_RAGSOC 202
#define F_DATASTAMPA 203
#define F_ANNO 204
#define F_COMPETENZA 205
#define F_TIPOSTAMPA 206
#define F_DATAINI 207
#define F_DATAFIN 208
#define F_NUMEROINI 209
#define F_NUMEROFIN 210
#define F_CAUSALEINI 211
#define F_CAUSALEFIN 212
#define F_REPORT 213
//campi generati dal pdc
#define F_CDC1_INI 306
@ -17,16 +26,6 @@
#define F_DES1_FIN 366
#define F_DES12_FIN 381
//campi sulla maschera
#define F_DATAINI 390
#define F_DATAFINE 391
#define F_STAMPA_PROG_ATT 392
#define F_STAMPA_SALDI_PROG 393
#define F_STAMPA_SALDI_SCAL 394
#define F_SELEZ_STAMPA 395
#define F_MEMORIZZA 396
//sheet di pagina 2
#define F_RIGHE 400

157
ca/ca3100a.rep Executable file
View File

@ -0,0 +1,157 @@
<report name="ca3100a" lpi="8">
<description>Stampa movimenti contabilta' analitica</description>
<font face="Courier New" size="8" />
<section type="Head">
<font italic="1" face="Courier New" size="8" />
<field x="1" type="Stringa" width="50" pattern="1">
<font italic="1" face="Courier New" bold="1" size="10" />
<source>#SYSTEM.RAGSOC</source>
</field>
<field x="100" type="Data" width="10" pattern="1">
<source>#SYSTEM.DATE</source>
</field>
<field x="152" type="Numero" align="right" width="3" pattern="1">
<source>#REPORT.PAGE</source>
</field>
<field border="2" x="1" y="2.5" type="Linea" width="154" height="0" pattern="1" />
<field x="2" y="2.5" type="Testo" width="6" pattern="1" text="N.Reg.">
<font italic="1" face="Courier New" bold="1" size="10" />
</field>
<field x="9" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Reg." />
<field x="21" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Comp." />
<field x="33" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
<field x="44" y="2.5" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
<field x="56" y="2.5" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
<field x="64" y="2.5" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
<field x="73" y="2.5" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
<field x="99.5" y="2.5" type="Testo" align="center" width="8" pattern="1" text="Cod.Cau." />
<field x="110.5" y="2.5" type="Testo" align="center" width="7" pattern="1" text="Tp.Mov." />
<field x="120" y="2.5" type="Testo" align="center" width="15" pattern="1" text="Tot. documento" />
<field x="136" y="2.5" type="Testo" align="center" width="4" pattern="1" text="Sez." />
<field border="2" x="1" y="4" type="Linea" width="154" height="0" pattern="1" />
</section>
<section type="Head" level="1" height="3">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
MESSAGE RESET,F1.102</prescript>
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="154" height="2.5" text="MOVIMENTI DI CONTABILITA' ANALITICA">
<font face="Courier New" bold="1" size="16" />
</field>
</section>
<section type="Body" />
<section type="Body" level="1">
<field x="1" y="1" type="Numero" align="right" width="7" pattern="1">
<font face="Courier New" bold="1" size="10" />
<source>NUMREG</source>
</field>
<field x="9" y="1" type="Data" width="10" pattern="1">
<source>DATAREG</source>
</field>
<field x="21" y="1" type="Data" width="10" pattern="1">
<source>DATACOMP</source>
</field>
<field x="33" y="1" type="Data" width="10" pattern="1">
<source>DATADOC</source>
</field>
<field x="45" y="1" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
<source>NUMREGCG</source>
</field>
<field x="54" y="1" type="Stringa" width="7" pattern="1">
<source>NUMDOC</source>
</field>
<field x="64" y="1" type="Stringa" width="4" pattern="1">
<source>TIPODOC</source>
</field>
<field x="73" y="1" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
</field>
<field x="101" y="1" type="Stringa" width="3" pattern="1">
<source>CODCAUS</source>
</field>
<field x="112" y="1" type="Stringa" width="1" pattern="1">
<source>TIPOMOV</source>
</field>
<field x="120" y="1" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>TOTDOC</source>
</field>
<field x="137" y="1" type="Stringa" width="1" pattern="1">
<source>SEZIONE</source>
</field>
</section>
<section type="Head" level="11">
<font italic="1" face="Courier New" size="8" />
<field x="8.21" type="Testo" align="center" width="4" pattern="1" text="Riga" />
<field x="13.21" type="Testo" width="23" pattern="1" text="Centro di Costo" />
<field x="37.21" type="Testo" width="23" pattern="1" text="Commessa" />
<field x="61.21" type="Testo" width="13" pattern="1" text="Fase" />
<field x="75.21" type="Testo" width="23" pattern="1" text="Conto" />
<field x="99.21" type="Testo" width="25" pattern="1" text="Descrizione" />
<field x="128" type="Testo" align="center" width="15" pattern="1" text="Dare" />
<field x="143" type="Testo" align="center" width="15" pattern="1" text="Avere" />
<field border="1" x="8" y="1" type="Linea" width="154" height="0" pattern="1" />
</section>
<section type="Body" level="11">
<sql>USE RMOVANA
FROM NUMREG=#PARENT.NUMREG
TO NUMREG=#PARENT.NUMREG
</sql>
<field x="9" type="Numero" align="right" width="3" pattern="1">
<source>NUMRIG</source>
</field>
<field x="13" type="Stringa" width="23" pattern="1">
<source>CODCCOSTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
</field>
<field x="37" type="Stringa" width="23" pattern="1">
<source>CODCMS</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
</field>
<field x="61" type="Stringa" width="13" pattern="1">
<source>CODFASE</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
</field>
<field x="75" type="Stringa" width="23" pattern="1">
<source>CODCONTO</source>
<prescript description="B11.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
</field>
<field x="99" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESCR</source>
</field>
<field x="125" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.101 PRESCRIPT">"RMOVANA.SEZIONE" @
"A" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
</field>
<field x="140" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
<source>IMPORTO</source>
<prescript description="B11.102 PRESCRIPT">"RMOVANA.SEZIONE" @
"D" =
IF
0 #THIS !
THEN
</prescript>
<postscript description="B11.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
</field>
</section>
<section type="Foot" level="11" />
<section type="Foot" height="1" />
<section type="Foot" level="1">
<field border="2" x="1" y="1" type="Linea" width="154" height="0" pattern="1" />
<field x="96" y="1.5" type="Testo" width="30" pattern="1" text="Totale generale per sezione:">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="125" y="1.5" type="Valuta" align="right" width="15" id="101" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="140" y="1.5" type="Valuta" align="right" width="15" id="102" pattern="1" text="###.###.###,@@">
<font face="Courier New" bold="1" size="8" />
</field>
</section>
<sql>USE MOVANA
</sql>
</report>

View File

@ -8,11 +8,6 @@ BEGIN
MESSAGE EXIT,K_ENTER
END
BUTTON F_MEMORIZZA 18 2
BEGIN
PROMPT -23 -11 "~Memorizza scelte"
END
BUTTON DLG_QUIT 18 2
BEGIN
PROMPT -33 -11 ""
@ -58,87 +53,92 @@ BEGIN
OUTPUT F_ANNO CODTAB
CHECKTYPE NORMAL
CHECKTYPE NORMAL
MESSAGE HIDE,98|HIDE,99|SHOW,96|SHOW,97
MESSAGE EMPTY HIDE,96|HIDE,97|SHOW,98|SHOW,99
FLAGS "RZ"
ADD NONE
END
GROUPBOX DLG_NULL 76 6
BOOLEAN F_COMPETENZA
BEGIN
PROMPT 1 4 "@bDa:"
PROMPT 1 3 "Stampa i soli movimenti con competenza nell'esercizio precedente"
END
GROUPBOX DLG_NULL 76 6
RADIOBUTTON F_TIPOSTAMPA 12
BEGIN
PROMPT 1 10 "@bA:"
PROMPT 1 4 "Stampa "
ITEM "2|data" MESSAGE CLEAR,2@|ENABLE,3@
ITEM "1|numero" MESSAGE CLEAR,3@|ENABLE,2@
END
GROUPBOX DLG_NULL 76 7
DATE F_DATAINI
BEGIN
PROMPT 1 16 "@bOpzioni stampa"
PROMPT 16 5 "Stampa mov. dalla data "
GROUP 3
END
TEXT 96
DATE F_DATAFIN
BEGIN
PROMPT 2 17 "Dalla data competenza"
PROMPT 52 5 "alla data "
GROUP 3
END
TEXT 97
NUMBER F_NUMEROINI 7
BEGIN
PROMPT 40 17 "Alla data competenza "
PROMPT 16 6 "Stampa mov. dal numero "
USE LF_MOV KEY 1
INPUT NUMREG F_NUMEROINI
DISPLAY "Numero@7" NUMREG
DISPLAY "Data@10" DATAREG
DISPLAY "Causale" CODCAUS
DISPLAY "Documento" NUMDOC
DISPLAY "Descrizione@50" DESCR
OUTPUT F_NUMEROINI NUMREG
GROUP 2
END
TEXT 98
NUMBER F_NUMEROFIN 7
BEGIN
PROMPT 2 17 "Dalla data operazione "
PROMPT 52 6 "al numero "
COPY USE F_NUMEROINI
INPUT NUMREG F_NUMEROFIN
COPY DISPLAY F_NUMEROINI
FLAGS "R"
NUM_EXPR {(#F_NUMEROFIN==0)||(#F_NUMEROFIN>=#F_NUMEROINI)}
WARNING "Limite superiore errato"
GROUP 2
END
TEXT 99
STRING F_CAUSALEINI 3
BEGIN
PROMPT 40 17 "Alla data operazione "
PROMPT 1 8 "Stampa dalla causale "
USE LF_CAUSALI KEY 1
INPUT CODCAUS F_CAUSALEINI
DISPLAY "Codice causale" CODCAUS
DISPLAY "Descrizione@50" DESCR
OUTPUT F_CAUSALEINI CODCAUS
FLAGS "U"
VALIDATE ZEROFILL_FUNC 3
END
DATE F_DATAINI
STRING F_CAUSALEFIN 3
BEGIN
PROMPT 26 17 ""
PROMPT 40 8 "alla causale "
COPY USE F_CAUSALEINI
INPUT CODCAUS F_CAUSALEFIN
DISPLAY "Codice causale" CODCAUS
DISPLAY "Descrizione@50" DESCR
OUTPUT F_CAUSALEFIN CODCAUS
FLAGS "U"
VALIDATE ZEROFILL_FUNC 3
END
DATE F_DATAFINE
STRING F_REPORT 256 64
BEGIN
PROMPT 62 17 ""
PROMPT 1 9 "Report "
END
BOOLEAN F_STAMPA_PROG_ATT
BEGIN
PROMPT 2 18 "Stampa progressivi attuali"
END
BOOLEAN F_STAMPA_SALDI_PROG
BEGIN
PROMPT 2 19 "Stampa saldi progressivi"
END
BOOLEAN F_STAMPA_SALDI_SCAL
BEGIN
PROMPT 2 20 "Stampa saldo scalare"
END
LIST F_SELEZ_STAMPA 34
BEGIN
PROMPT 2 21 "Selezione mastrini "
ITEM "1|Movimentati nel periodo"
ITEM "2|Con saldo diverso da 0"
ITEM "3|Tutti"
END
ENDPAGE
PAGE "Selezioni" -1 -1 78 20
SPREADSHEET F_RIGHE -1 -2
BEGIN
PROMPT 0 2 ""
PROMPT 1 11 "Selezione su CdC / Commesse / Fasi"
ITEM "Cdc1"
ITEM "Cdc2"
ITEM "Cdc3"