Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
lista fatture per imponibile: comincia a stampare qualcosa di giusto


git-svn-id: svn://10.65.10.50/branches/R_10_00@21813 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-03-22 16:47:42 +00:00
parent 017866e414
commit bcf54de3b5
4 changed files with 275 additions and 40 deletions

@ -47,19 +47,24 @@ void TPrint_x_imponibile_mask::elabora()
const char tipoelenco = get(F_TIPOELENCO)[0];
const long codcf = get_long(F_CODCF);
const int anno = get_int(F_ANNO);
const TDate dataini = get_date(F_DATAINI);
const TDate datafin = get_date(F_DATAFIN);
TString query;
if (tipodate == 'R') //per data di 'R'egistrazione
{
query << "USE MOV KEY 3";
query << "\nSELECT (ANNOIVA=" << anno << ")";
query << "\nFROM TIPO=" << tipoelenco;
if (codcf > 0L)
query << " CODCF=" << codcf;
query << " CODCF=" << codcf;
query << " DATAREG=" << dataini.date2ansi();
query << "\nTO TIPO=" << tipoelenco;
if (codcf > 0L)
query << " CODCF=" << codcf;
query << " CODCF=" << (codcf > 0L ? codcf : 999999);
query << " DATAREG=" << datafin.date2ansi();
}
else //per data 'D'ocumento
{
@ -67,11 +72,45 @@ void TPrint_x_imponibile_mask::elabora()
TPrint_x_imponibile_report rep;
rep.set_recordset(query);
rep.mask2report(*this);
rep.preview();
}
bool TPrint_x_imponibile_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
{
case F_ANNO:
if (e == fe_modify)
{
//in base all'anno varia il limite dell'imponibile da considerare
const int anno = o.get_long();
if (anno <= 2010)
set(F_LIMITE, "25000");
else
set(F_LIMITE, "3000");
//cambiando l'anno propone in automatico il dadata adata
const TDate ini_anno(1, 1, anno);
set(F_DATAINI, ini_anno);
const TDate fine_anno(31, 12, anno);
set(F_DATAFIN, fine_anno);
}
break;
case F_DATAINI:
case F_DATAFIN:
if (e == fe_modify || e == fe_close)
{
const TDate data = get_date(o.dlg());
const int anno = get_int(F_ANNO);
if (data.year() != anno)
return error_box("La data deve appartenere all'anno selezionato!");
}
break;
default:
break;
}
return true;
}

@ -2,9 +2,10 @@
#define F_RAGSOC 202
#define F_DATASTAMPA 203
#define F_ANNO 204
#define F_TIPODATE 205
#define F_DATAINI 206
#define F_DATAFIN 207
#define F_TIPOELENCO 208
#define F_CODCF 209
#define F_DESCF 210
#define F_LIMITE 205
#define F_TIPODATE 206
#define F_DATAINI 207
#define F_DATAFIN 208
#define F_TIPOELENCO 209
#define F_CODCF 210
#define F_DESCF 211

@ -2,20 +2,102 @@
<report name="cg7200a" lpi="6">
<description>Lista fatture per imponibile</description>
<font face="Arial" size="8" />
<section type="Head" pattern="1" />
<section type="Head" pattern="1">
<font italic="1" face="Arial" size="8" />
<field border="1" x="0.5" y="0.5" type="Linea" width="117" height="0" pattern="1" />
<field x="1" y="0.5" type="Array" width="12" pattern="1">
<font italic="1" face="Arial" bold="1" size="8" />
<source>H1.101</source>
<list>
<li Value="Cliente" Code="C" />
<li Value="Fornitore" Code="F" />
</list>
</field>
<field x="2" y="1.5" type="Testo" align="right" width="7" pattern="1" text="N.Reg." />
<field x="10.5" y="1.5" type="Testo" align="center" width="10" pattern="1" text="Data Reg." />
<field x="21" y="1.5" type="Testo" width="4" pattern="1" text="Reg." />
<field x="26.5" y="1.5" type="Testo" align="right" width="6" pattern="1" text="Prot." />
<field x="32.5" y="1.5" type="Testo" align="right" width="7" pattern="1" text="N.Doc." />
<field x="41" y="1.5" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
<field x="52" y="1.5" type="Testo" width="10" pattern="1" text="Causale" />
<field x="79" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Tot. Doc." />
<field x="91.5" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Imponibile" />
<field x="104.5" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Imposta" />
<field border="1" x="1" y="2.5" type="Linea" width="117" height="0" pattern="1" />
</section>
<section type="Head" level="1" pattern="1">
<field type="Stringa" width="1" id="101" pattern="1">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
<field border="1" radius="50" x="15" y="0.5" type="Testo" valign="center" align="center" shade_offset="50" width="80" height="3" pattern="2" text="LISTA FATTURE PER IMPONIBILE">
<font face="Arial" bold="1" size="14" />
</field>
<field x="2" y="4.5" type="Testo" width="12" pattern="1" text="Tipo elenco:" />
<field x="52" y="4.5" type="Stringa" width="50" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#DESCF</source>
</field>
<field x="2" y="5.5" type="Testo" width="5" pattern="1" text="Anno:" />
<field x="7" y="5.5" type="Numero" align="right" width="5" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#ANNO</source>
</field>
<field x="17" y="5.5" type="Testo" width="18" pattern="1" text="Valore limite imponibile:" />
<field x="50" y="5.5" type="Testo" width="14" pattern="1" text="Ordinamento per:" />
<field x="64" y="5.5" type="Array" width="20" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#TIPODATE</source>
<list>
<li Value="Data registrazione" Code="R" />
<li Value="Data documento" Code="D" />
</list>
</field>
<field x="87" y="5.5" type="Testo" width="4" pattern="1" text="Dal:" />
<field x="91" y="5.5" type="Data" width="10" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#DATAINI</source>
</field>
<field x="104" y="5.5" type="Testo" width="3" pattern="1" text="Al:" />
<field x="106.5" y="5.5" type="Data" width="10" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#DATAFIN</source>
</field>
<field x="14" y="4.5" type="Array" width="12" id="101" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>#TIPOELENCO</source>
<list>
<li Value="Clienti" Code="C" />
<li Value="Fornitori" Code="F" />
</list>
</field>
<field x="35" y="5.5" type="Valuta" align="right" width="10" id="102" pattern="1" text="#########,@@">
<font face="Arial" bold="1" size="8" />
<source>#LIMITE</source>
</field>
<field x="45" y="4.5" type="Numero" align="right" width="6" id="103" pattern="1" hide_zero="1">
<font face="Arial" bold="1" size="8" />
<source>#CODCF</source>
</field>
<field x="35" y="4.5" type="Array" width="10" id="105" pattern="1">
<source>#101</source>
<prescript description="H1.105 PRESCRIPT">#103 @
0 = IF
"H1.105" HIDE
ELSE
"H1.105" SHOW
THEN</prescript>
<list>
<li Value="Cliente:" Code="C" />
<li Value="Fornitore:" Code="F" />
</list>
</field>
</section>
<section type="Head" level="2" pattern="1">
<groupby>CODCF</groupby>
<font face="Arial" bold="1" size="8" />
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
<field x="8" type="Stringa" width="50" pattern="1">
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#102,RAGSOC</prescript>
<field x="8" y="0.75" type="Stringa" width="50" pattern="1">
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,RAGSOC</prescript>
</field>
<field x="1" type="Numero" align="right" width="6" id="102" pattern="1">
<field x="1" y="0.75" type="Numero" align="right" width="6" id="151" pattern="1">
<source>CODCF</source>
</field>
</section>
@ -24,7 +106,7 @@
<section type="Head" level="11" pattern="1">
<prescript description="H11 PRESCRIPT">MESSAGE RESET,F11</prescript>
</section>
<section type="Body" level="11" pattern="1">
<section type="Body" level="11" hidden="1" pattern="1">
<sql>USE RMOVIVA
FROM NUMREG=#PARENT.NUMREG
TO NUMREG=#PARENT.NUMREG</sql>
@ -43,16 +125,16 @@ TO NUMREG=#PARENT.NUMREG</sql>
<field x="34" type="Array" width="15" pattern="1">
<prescript description="B11.0 PRESCRIPT">MESSAGE TABLEREAD,%IVA,CODIVA,S1</prescript>
<list>
<li Value="Normale"> "IMPONIBILE" @ "F11.201" +! "IMPOSTA" @ "F11.202" +!</li>
<li Value="Non soggetto" Code="NS"> "IMPONIBILE" @ "F11.211" +! "IMPOSTA" @ "F11.212" +!</li>
<li Value="Esente" Code="ES"> "IMPONIBILE" @ "F11.221" +! "IMPOSTA" @ "F11.222" +!</li>
<li Value="Non imponibile" Code="NI"> "IMPONIBILE" @ "F11.231" +! "IMPOSTA" @ "F11.232" +!</li>
<li Value="Normale">"IMPONIBILE" @ "F11.201" +! "IMPOSTA" @ "F11.202" +!</li>
<li Value="Non soggetto" Code="NS">"IMPONIBILE" @ "F11.211" +! "IMPOSTA" @ "F11.212" +!</li>
<li Value="Esente" Code="ES">"IMPONIBILE" @ "F11.221" +! "IMPOSTA" @ "F11.222" +!</li>
<li Value="Non imponibile" Code="NI">"IMPONIBILE" @ "F11.231" +! "IMPOSTA" @ "F11.232" +!</li>
</list>
</field>
</section>
<section type="Foot" level="11" hidden="1" pattern="1">
<prescript description="F11 PRESCRIPT">#241 @
3000 &#3C; IF
#H1.102 @ &#3C;= IF
"F11" HIDE
ELSE
"F11" SHOW
@ -60,41 +142,141 @@ THEN</prescript>
<field x="2" type="Numero" align="right" width="7" pattern="1">
<source>NUMREG</source>
</field>
<field x="10" type="Data" width="10" pattern="1">
<field x="10.5" type="Data" width="10" pattern="1">
<source>DATAREG</source>
</field>
<field x="21" type="Stringa" width="3" pattern="1">
<field x="21.5" type="Stringa" width="3.5" pattern="1">
<source>REG</source>
</field>
<field x="25" type="Numero" align="right" width="6" pattern="1">
<field x="25.5" type="Numero" align="right" width="6" pattern="1">
<source>PROTIVA</source>
</field>
<field x="32" type="Stringa" align="right" width="7" pattern="1">
<field x="32.5" type="Stringa" align="right" width="7" pattern="1">
<source>NUMDOC</source>
</field>
<field x="40" type="Data" width="10" pattern="1">
<field x="41" type="Data" width="10" pattern="1">
<source>DATADOC</source>
</field>
<field x="51" type="Stringa" width="3" pattern="1">
<field x="55.5" type="Stringa" width="21" pattern="1">
<font face="Arial Narrow" size="7" />
<prescript description="F11.0 PRESCRIPT">MESSAGE ISAMREAD,26,CODCAUS=#239,DESCR</prescript>
</field>
<field x="2" y="1" type="Valuta" hidden="1" align="right" width="10" id="201" pattern="1" text="#########,@@">
<prescript description="F11.201 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.201" +!
THEN</prescript>
</field>
<field x="12" y="1" type="Valuta" hidden="1" align="right" width="10" id="202" pattern="1" text="#########,@@">
<prescript description="F11.202 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.202" +!
THEN</prescript>
</field>
<field x="22.5" y="1" type="Valuta" hidden="1" align="right" width="10" id="211" pattern="1" text="#########,@@">
<prescript description="F11.211 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.211" +!
THEN</prescript>
</field>
<field x="32.5" y="1" type="Valuta" hidden="1" align="right" width="10" id="212" pattern="1" text="#########,@@">
<prescript description="F11.212 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.212" +!
THEN</prescript>
</field>
<field x="43" y="1" type="Valuta" hidden="1" align="right" width="10" id="221" pattern="1" text="#########,@@">
<prescript description="F11.221 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.221" +!
THEN</prescript>
</field>
<field x="53" y="1" type="Valuta" hidden="1" align="right" width="10" id="222" pattern="1" text="#########,@@">
<prescript description="F11.222 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.222" +!
THEN</prescript>
</field>
<field x="63.5" y="1" type="Valuta" hidden="1" align="right" width="10" id="231" pattern="1" text="#########,@@">
<prescript description="F11.231 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.231" +!
THEN</prescript>
</field>
<field x="73.5" y="1" type="Valuta" hidden="1" align="right" width="10" id="232" pattern="1" text="#########,@@">
<prescript description="F11.232 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.232" +!
THEN</prescript>
</field>
<field x="51.5" type="Stringa" width="3.5" id="239" pattern="1">
<source>CODCAUS</source>
</field>
<field x="84" type="Valuta" hidden="1" align="right" width="10" id="201" pattern="1" text="#########,@@" />
<field x="94" type="Valuta" hidden="1" align="right" width="10" id="202" pattern="1" text="#########,@@" />
<field x="106" type="Valuta" hidden="1" align="right" width="10" id="211" pattern="1" text="#########,@@" />
<field x="116" type="Valuta" hidden="1" align="right" width="10" id="212" pattern="1" text="#########,@@" />
<field x="128" type="Valuta" hidden="1" align="right" width="10" id="221" pattern="1" text="#########,@@" />
<field x="138" type="Valuta" hidden="1" align="right" width="10" id="222" pattern="1" text="#########,@@" />
<field x="150" type="Valuta" hidden="1" align="right" width="10" id="231" pattern="1" text="#########,@@" />
<field x="160" type="Valuta" hidden="1" align="right" width="10" id="232" pattern="1" text="#########,@@" />
<field x="60" type="Valuta" align="right" width="10" id="241" pattern="1" text="#########,@@">
<source>#201+#211+#221+#231</source>
<field x="77" type="Valuta" align="right" width="12" id="240" pattern="1" text="#########,@@">
<source>PARENT.TOTDOC</source>
<prescript description="F11.240 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.240" +!
THEN</prescript>
</field>
<field x="71" type="Valuta" align="right" width="10" id="242" pattern="1" text="#########,@@">
<field x="90" type="Valuta" align="right" width="12" id="241" pattern="1" text="#########,@@">
<source>#201+#211+#221+#231</source>
<prescript description="F11.241 PRESCRIPT">#THIS @
"H1.102" @ &#3E;= IF
#THIS @
"F1.241" +!
THEN</prescript>
</field>
<field x="103" type="Valuta" align="right" width="12" id="242" pattern="1" text="#########,@@">
<source>#202+#212+#222+#232</source>
<prescript description="F11.242 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.242" +!
THEN</prescript>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<section type="Foot" pattern="1">
<field border="1" x="1" y="0.25" type="Linea" width="117" height="0" pattern="1" />
<field x="103" y="0.75" type="Testo" width="5" pattern="1" text="Pag." />
<field x="108" y="0.75" type="Numero" align="right" width="4" pattern="1">
<source>REPORT.PAGE</source>
</field>
</section>
<section type="Foot" level="1" pattern="1">
<font face="Arial" bold="1" size="8" />
<field border="2" x="1" y="0.25" type="Linea" width="117" height="0" pattern="1" />
<field x="63" y="1" type="Testo" bg_color="#000000" txt_color="#FFFFFF" width="12" pattern="2" text="TOTALI">
<font face="Arial" bold="1" size="10" />
</field>
<field x="75" y="1" type="Testo" align="right" bg_color="#000000" txt_color="#FFFFFF" width="14" pattern="2" text="Tot. Doc." />
<field x="89" y="1" type="Testo" align="right" bg_color="#000000" txt_color="#FFFFFF" width="13" pattern="2" text="Imponibile" />
<field x="102" y="1" type="Testo" align="right" bg_color="#000000" txt_color="#FFFFFF" width="13" pattern="2" text="Imposta" />
<field x="73" y="3.75" type="Testo" bg_color="#C0C0C0" width="14" pattern="1" text="Normale" />
<field x="73" y="4.75" type="Testo" width="14" pattern="1" text="Non soggetto" />
<field x="73" y="5.75" type="Testo" width="14" pattern="1" text="Esente" />
<field x="73" y="6.75" type="Testo" width="14" pattern="1" text="Non imponibile" />
<field x="89" y="3.75" type="Valuta" align="right" width="13" id="201" pattern="1" text="#########,@@" />
<field x="102" y="3.75" type="Valuta" align="right" width="13" id="202" pattern="1" text="#########,@@" />
<field x="89" y="4.75" type="Valuta" align="right" width="13" id="211" pattern="1" text="#########,@@" />
<field x="102" y="4.75" type="Valuta" align="right" width="13" id="212" pattern="1" text="#########,@@" />
<field x="89" y="5.75" type="Valuta" align="right" width="13" id="221" pattern="1" text="#########,@@" />
<field x="102" y="5.75" type="Valuta" align="right" width="13" id="222" pattern="1" text="#########,@@" />
<field x="89" y="6.75" type="Valuta" align="right" width="13" id="231" pattern="1" text="#########,@@" />
<field x="102" y="6.75" type="Valuta" align="right" width="13" id="232" pattern="1" text="#########,@@" />
<field x="75" y="2.25" type="Valuta" align="right" width="14" id="240" pattern="1" text="#########,@@" />
<field x="89" y="2.25" type="Valuta" align="right" width="13" id="241" pattern="1" text="#########,@@" />
<field x="102" y="2.25" type="Valuta" align="right" width="13" id="242" pattern="1" text="#########,@@" />
</section>
<section type="Foot" level="2" pattern="1" />
<sql>USE MOV KEY 3
SELECT (ANNOIVA=2010)

@ -38,9 +38,17 @@ NUMBER F_ANNO 4
BEGIN
PROMPT 1 3 "Anno "
CHECKTYPE REQUIRED
FLAGS "U"
FIELD #ANNO
END
CURRENCY F_LIMITE 9
BEGIN
PROMPT 23 3 "Importo limite imponibile considerato "
FLAGS "D"
FIELD #LIMITE
END
GROUPBOX DLG_NULL 76 4
BEGIN
PROMPT 1 4 "@bParametri movimenti"
@ -52,18 +60,21 @@ BEGIN
HELP "Movimenti per data registrazione o data documento"
ITEM "R|Registrazione"
ITEM "D|Documento"
FIELD #TIPODATE
END
DATE F_DATAINI
BEGIN
PROMPT 2 6 "Stampa movimenti dalla data "
HELP "Data da cui iniziare la stampa"
FIELD #DATAINI
END
DATE F_DATAFIN
BEGIN
PROMPT 50 6 "alla data "
HELP "Data fino a cui eseguire la stampa"
FIELD #DATAFIN
END
GROUPBOX DLG_NULL 76 4
@ -95,6 +106,7 @@ BEGIN
OUTPUT F_DESCF RAGSOC
FLAGS "R"
CHECKTYPE NORMAL
FIELD #CODCF
END
STRING F_DESCF 50 45
@ -109,6 +121,7 @@ BEGIN
DISPLAY "Codice" CODCF
COPY OUTPUT F_CODCF
CHECKTYPE NORMAL
FIELD #DESCF
END
ENDPAGE