Patch level :10.0 962

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
prima stesura della stampa lista fatture per imponibile
0001789: Stampa fatture superiori a 25000 €
Descrizione Nuova stampa delle atture superiori a 25000 €.
Da definire il tracciato


git-svn-id: svn://10.65.10.50/branches/R_10_00@21833 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-03-25 15:20:29 +00:00
parent d8d45ccd28
commit 933950042c
3 changed files with 314 additions and 252 deletions

View File

@ -1,52 +1,56 @@
#include <applicat.h>
#include <automask.h>
#include <progind.h>
#include <recarray.h>
#include <relation.h>
#include <report.h>
#include <textset.h>
#include <clifo.h>
#include <mov.h>
#include <rmoviva.h>
#include "../ba/ba8500.h"
#include "../cg/cg7200a.h"
#include "cglib01.h"
#include "cg7200a.h"
///////////////////////////////////////////////////////////
// Recordset
///////////////////////////////////////////////////////////
class TPrint_x_imponibile_recordset : public TISAM_recordset
class TPrint_x_imponibile_recordset : public TAS400_recordset
{
static real _limite;
protected:
static bool filtro(const TRelation* rel);
virtual void set_custom_filter(TCursor& cursor) const;
public:
TPrint_x_imponibile_recordset(const TString& sql) : TISAM_recordset(sql) {}
TPrint_x_imponibile_recordset();
};
real TPrint_x_imponibile_recordset::_limite;
bool TPrint_x_imponibile_recordset::filtro(const TRelation* rel)
TPrint_x_imponibile_recordset::TPrint_x_imponibile_recordset()
: TAS400_recordset("AS400(512)")
{
const TRectype& rec = rel->curr();
//const char* name, int pos, int len, TFieldtypes t = _alfafld, bool required = false, const TVariant& def = NULL_VARIANT
//campi da LF_MOV
create_field("Numreg", -1, 7, _longfld, true);
create_field("Datareg", -1, 8, _datefld, true);
create_field("Datadoc", -1, 8, _datefld, true);
create_field("Numdoc", -1, 7, _alfafld, true);
create_field("Tipodoc", -1, 2, _alfafld, true);
create_field("Codcaus", -1, 3, _alfafld, true);
create_field("Descr", -1, 50, _alfafld, false);
create_field("Reg", -1, 3, _alfafld, true);
create_field("Protiva", -1, 6, _longfld, true);
create_field("Tipo", -1, 1, _alfafld, true);
create_field("Codcf", -1, 6, _longfld, true);
create_field("Totdoc", -1, 18, _realfld, true);
//campi da LF_RMOVIVA
create_field("Imponibile", -1, 18, _realfld, true);
create_field("Imposta", -1, 18, _realfld, false);
create_field("Tipoiva", -1, 2, _alfafld, true);
create_field("Imponibile_no", -1, 18, _realfld, false); //normale
create_field("Imponibile_ni", -1, 18, _realfld, false); //non imponibile
create_field("Imponibile_es", -1, 18, _realfld, false); //esente
create_field("Imponibile_co", -1, 18, _realfld, false); //corrispettivo
create_field("Imposta_co", -1, 18, _realfld, false); //imposta corrispettivo
const TString& keytok = rec.get(MOV_NUMREG);
TRecord_array righe_iva(keytok, LF_RMOVIVA);
real tot_imponibile;
for (int r = righe_iva.last_row(); r > 0; r = righe_iva.pred_row(r))
tot_imponibile += righe_iva.row(r).get_real(RMI_IMPONIBILE);
return tot_imponibile > _limite;
}
void TPrint_x_imponibile_recordset::set_custom_filter(TCursor& cursor) const
{
_limite = get("#LIMITE").as_real();
cursor.set_filterfunction(filtro);
}
///////////////////////////////////////////////////////////
// Report
///////////////////////////////////////////////////////////
@ -57,16 +61,9 @@ protected:
virtual bool use_mask() { return false; }
public:
virtual bool set_recordset(const TString& sql);
TPrint_x_imponibile_report();
};
bool TPrint_x_imponibile_report::set_recordset(const TString& sql)
{
TPrint_x_imponibile_recordset* recset = new TPrint_x_imponibile_recordset(sql);
return TReport::set_recordset(recset);
}
TPrint_x_imponibile_report::TPrint_x_imponibile_report()
{
load("cg7200a");
@ -79,6 +76,8 @@ TPrint_x_imponibile_report::TPrint_x_imponibile_report()
class TPrint_x_imponibile_mask : public TAutomask
{
protected:
bool convalida_clifo(const char tipocf, const long codcf);
bool aggiungi_movimento(const TRectype& rec, TPrint_x_imponibile_recordset& output_recordset);
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
@ -87,56 +86,199 @@ public:
virtual ~TPrint_x_imponibile_mask() {}
};
bool TPrint_x_imponibile_mask::convalida_clifo(const char tipocf, const long codcf)
{
if (tipocf <= ' ')
return false;
TToken_string key_clifo;
key_clifo.add(tipocf);
key_clifo.add(codcf);
const TRectype& rec_clifo = cache().get(LF_CLIFO, key_clifo);
const int alleg_clifo = rec_clifo.get_int(CLI_ALLEG);
//solo per clifo esteri (alleg = 5)
if (alleg_clifo == 5)
{
if (tipocf == 'F') //tutti i fornitori esteri vanno esclusi (importazioni)
return false;
else //vanno esclusi solo i clienti esteri di stati pirata
{
const TString& stato_clifo = rec_clifo.get(CLI_STATOCF);
const TRectype& rec_sta = cache().get("%STA", stato_clifo);
if (rec_sta.get_bool("B0")) //cliente in stato a fiscalita' agevolata (stato pirata!) -> non ci va
return false;
}
}
return true; //se arriva qui il clifo è da considerare
}
bool TPrint_x_imponibile_mask::aggiungi_movimento(const TRectype& rec, TPrint_x_imponibile_recordset& output_recordset)
{
//controlla se il clifo è da considerare o meno nella stampa
const char tipocf = rec.get_char(MOV_TIPO);
const long codcf = rec.get_long(MOV_CODCF);
if (!convalida_clifo(tipocf, codcf))
return false;
//se il cliente ha superato l'esame di ammissione si parte!
//vanno esclusi gli scontrini anteriori al 30-04-2011 (evadete finchè potete...)
const TString4 tipodoc = rec.get(MOV_TIPODOC);
if (tipodoc == "SC" && rec.get_date(MOV_DATAREG) <= TDate(30, 4, 2011))
return false;
const TString& keytok = rec.get(MOV_NUMREG);
TRecord_array righe_iva(keytok, LF_RMOVIVA);
real tot_imponibile, tot_impon_no, tot_impon_ni, tot_impon_es, tot_impon_co;
real tot_imposta, tot_imposta_co;
TString4 tipoiva; //dichiarata qui perchè serve nella scrittura dell' output_recordset
//calcolo di imponibile ed imposta di tutte le righe iva del movimento
for (int r = righe_iva.last_row(); r > 0; r = righe_iva.pred_row(r))
{
const TRectype& rmi = righe_iva.row(r);
real imponibile = rmi.get_real(RMI_IMPONIBILE);
real imposta = rmi.get_real(RMI_IMPOSTA);
const TString& codiva = rmi.get(RMI_CODIVA);
TCodiceIVA ci(codiva);
//caso speciale degli scontrini (corrispettivi?)
if (tipodoc == "SC")
{
if (imposta.is_zero()) //se l'imposta non è specificata..
{
imposta = ci.scorpora(imponibile); //questo metodo crea l'imposta e riduce l'imponibile!
}
tot_impon_co += imponibile;
tot_imposta_co += imposta;
}
else
{
tipoiva = ci.get("S1");
//operazioni oggetto di comunicazione obbligatoria all'anagrafe tributaria (es: bollette luce)
//ricordare all'utonto che il flag va attivato nella tabella IVA del codice corrispondente
const bool com_obbl = ci.get_bool("B6");
//non ci vanno manco quelli soggetti all'articolo 8 (del dpr 26/10/1972)
const bool art_8 = ci.get("S2") == "20" && ci.get("S3") == "1";
if (com_obbl || art_8)
imponibile = imposta = ZERO;
else
{
if (tipoiva == "NI" || tipoiva == "NS")
tot_impon_ni += imponibile;
else
if (tipoiva == "ES")
tot_impon_es += imponibile;
else
tot_impon_no += imponibile;
}
}
tot_imponibile += imponibile;
tot_imposta += imposta;
}
if (tot_imponibile > get_real(F_LIMITE))
{
output_recordset.new_rec("");
output_recordset.set("Numreg", rec.get_long(MOV_NUMREG));
output_recordset.set("Datareg", rec.get_date(MOV_DATAREG));
output_recordset.set("Datadoc", rec.get_date(MOV_DATADOC));
output_recordset.set("Numdoc", rec.get_long(MOV_NUMDOC));
output_recordset.set("Tipodoc", tipodoc);
output_recordset.set("Codcaus", rec.get(MOV_CODCAUS));
output_recordset.set("Descr", rec.get(MOV_DESCR));
output_recordset.set("Reg", rec.get(MOV_REG));
output_recordset.set("Protiva", rec.get_long(MOV_PROTIVA));
const TString& str_tipocf = tipocf;
output_recordset.set("Tipo", str_tipocf);
output_recordset.set("Codcf", codcf);
output_recordset.set("Totdoc", rec.get_real(MOV_TOTDOC));
output_recordset.set("Imponibile", tot_imponibile);
output_recordset.set("Imposta", tot_imposta);
output_recordset.set("Tipoiva", tipoiva);
output_recordset.set("Imponibile_no", tot_impon_no);
output_recordset.set("Imponibile_ni", tot_impon_ni);
output_recordset.set("Imponibile_es", tot_impon_es);
output_recordset.set("Imponibile_co", tot_impon_co);
output_recordset.set("Imposta_co", tot_imposta_co);
}
return false;
}
void TPrint_x_imponibile_mask::elabora()
{
const char tipodate = get(F_TIPODATE)[0];
const char tipoelenco = get(F_TIPOELENCO)[0];
const TString& tipoelenco = get(F_TIPOELENCO);
const long codcf = get_long(F_CODCF);
const bool clifo_spec = codcf > 0L;
const int anno = get_int(F_ANNO);
const TDate dataini = get_date(F_DATAINI);
const TDate datafin = get_date(F_DATAFIN);
const TDate dataini(1, 1, anno);
const TDate datafine(31, 12, anno);
const real limite = get_real(F_LIMITE);
const real limite_farlocco = limite * 0.60;
const TDate dataini_stampa = get_date(F_DATAINI);
const TDate datafine_stampa = get_date(F_DATAFIN);
TString query;
query << "USE MOV KEY 3";
query << "\nSELECT (TOTDOC>=" << limite_farlocco.integer() << ")";
if (tipodate == 'R') //per data di 'R'egistrazione
query << "USE MOV KEY 2";
query << "\nSELECT (TIPO=#TIPO)";
if (clifo_spec)
query << "&&(CODCF=#CODCF)";
if (tipodate == 'D') //per data 'D'ocumento
{
if (codcf <= 0L)
query << "&&(BETWEEN(DATAREG," << dataini.date2ansi() << "," << datafin.date2ansi() << "))";
query << "\nFROM TIPO=" << tipoelenco;
if (codcf > 0L)
{
query << " CODCF=" << codcf;
query << " DATAREG=" << dataini.date2ansi();
}
query << "\nTO TIPO=" << tipoelenco;
if (codcf > 0L)
{
query << " CODCF=" << codcf;
query << " DATAREG=" << datafin.date2ansi();
}
query << "&&(BETWEEN(DATADOC,#DATAINI,#DATAFINE))";
query << "\nBY TIPO CODCF NUMREG";
query << "\nFROM DATAREG=#DATAINI";
TDate datadoc_fine = datafine;
datadoc_fine.addyear(2);
query << "\nTO DATAREG=" << datadoc_fine;
}
else //per data 'D'ocumento
else //per data 'R'egistrazione
{
query << "&&(BETWEEN(DATADOC," << dataini.date2ansi() << "," << datafin.date2ansi() << "))";
query << "\nBY CODCF DATADOC";
query << "\nFROM TIPO=" << tipoelenco;
if (codcf > 0L)
query << " CODCF=" << codcf;
query << "\nBY TIPO CODCF NUMREG";
query << "\nFROM DATAREG=#DATAINI";
query << "\nTO DATAREG=#DATAFINE";
}
//recordset con tutti i movimenti contabili di campo che soddisfano la query
TISAM_recordset movimenti_recset(query);
query << "\nTO TIPO=" << tipoelenco;
if (codcf > 0L)
query << " CODCF=" << codcf;
movimenti_recset.set_var("#TIPO", tipoelenco);
movimenti_recset.set_var("#CODCF", codcf);
movimenti_recset.set_var("#DATAINI", dataini);
movimenti_recset.set_var("#DATAFINE", datafine);
const long movimenti_recset_items = movimenti_recset.items();
//recordset di output su cui scrivere i record validi da mandare in stampa!
TPrint_x_imponibile_recordset* output_recordset = new TPrint_x_imponibile_recordset;
//solita progind per intrattenere l'utonto
TProgind pi(movimenti_recset_items, TR("Scansione movimenti in corso..."), true, true);
//giro su tutti i movimenti contabili che soddisfano la query
for (bool ok = movimenti_recset.move_first(); ok; ok = movimenti_recset.move_next())
{
if (!pi.addstatus(1))
break;
//metodo che decide se aggiungere i dati di un movimento all'output recordset
//al suo interno ci sono tutti i filtri di legge!
aggiungi_movimento(movimenti_recset.cursor()->curr(), *output_recordset);
}
#ifdef DBG
output_recordset->save_as("D:/dati/crpa/cazzone.xls", fmt_html);
#endif
//appiccia il recordset al report
TPrint_x_imponibile_report rep;
rep.set_recordset(query);
rep.set_recordset(output_recordset);
rep.mask2report(*this);
rep.preview();

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="cg7200a" lpi="6">
<report name="cg7200a" orientation="2" lpi="6">
<description>Lista fatture per imponibile</description>
<font face="Arial" size="8" />
<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>
@ -13,21 +12,38 @@
<li Value="Fornitore" Code="F" />
</list>
</field>
<field border="1" x="1" y="0.5" type="Linea" width="168" height="0" pattern="1" />
<field x="60" y="0.5" type="Testo" width="6" pattern="1" text="P. IVA">
<font italic="1" face="Arial" bold="1" size="8" />
</field>
<field x="73" y="0.5" type="Testo" width="10" pattern="1" text="Cod. Fisc.">
<font italic="1" face="Arial" bold="1" size="8" />
</field>
<field x="122" y="0.5" type="Testo" align="center" width="11" pattern="1" text="Imponibili" />
<field x="147" y="0.5" type="Testo" align="center" width="11" pattern="1" text="Corrispettivi" />
<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="32.5" y="1.5" type="Testo" align="right" width="6" 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="52" y="1.5" type="Testo" width="4" pattern="1" text="Caus." />
<field x="57" y="1.5" type="Testo" width="12" pattern="1" text="Descrizione" />
<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" />
<field x="91" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Imponibile" />
<field x="101" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Imposta" />
<field x="111.5" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Normale" />
<field border="2" x="111.5" y="1.5" type="Linea" pattern="1" />
<field x="121.5" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Non Impon." />
<field x="131.5" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Esente" />
<field x="142" y="1.5" type="Testo" align="right" width="10" pattern="1" text="Imponibile" />
<field border="2" x="142" y="1.5" type="Linea" pattern="1" />
<field x="152" y="1.5" type="Testo" align="right" width="8" pattern="1" text="Imposta" />
<field border="1" x="1" y="2.5" type="Linea" width="168" height="0" pattern="1" />
</section>
<section type="Head" level="1" 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">
<field border="1" radius="50" x="45" 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:" />
@ -91,215 +107,118 @@ THEN</prescript>
</field>
</section>
<section type="Head" level="2" pattern="1">
<groupby>CODCF</groupby>
<groupby>Codcf</groupby>
<font face="Arial" bold="1" size="8" />
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
<field x="8" y="0.75" type="Stringa" width="50" pattern="1">
<prescript>MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,RAGSOC</prescript>
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,RAGSOC</prescript>
</field>
<field x="60" y="0.75" type="Stringa" width="11" pattern="1">
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,PAIV</prescript>
</field>
<field x="73" y="0.75" type="Stringa" width="16" pattern="1">
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,COFI</prescript>
</field>
<field x="1" y="0.75" type="Numero" align="right" width="6" id="151" pattern="1">
<source>CODCF</source>
<source>Codcf</source>
</field>
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" pattern="1" />
<section type="Head" level="11" pattern="1">
<prescript description="H11 PRESCRIPT">MESSAGE RESET,F11</prescript>
</section>
<section type="Body" level="11" hidden="1" pattern="1">
<sql>USE RMOVIVA
FROM NUMREG=#PARENT.NUMREG
TO NUMREG=#PARENT.NUMREG</sql>
<field x="1" type="Numero" align="right" width="3" pattern="1">
<source>NUMRIG</source>
<section type="Body" level="1" pattern="1">
<field x="1" type="Numero" align="right" width="7" pattern="1">
<source>Numreg</source>
</field>
<field x="5" type="Valuta" align="right" width="10" id="241" pattern="1" text="#########,@@">
<source>IMPONIBILE</source>
<field x="9.5" type="Data" width="10" pattern="1">
<source>Datareg</source>
</field>
<field x="16" type="Valuta" align="right" width="10" id="242" pattern="1" text="#########,@@">
<source>IMPOSTA</source>
<field x="20.5" type="Stringa" width="3.5" pattern="1">
<source>Reg</source>
</field>
<field x="30" type="Array" width="15" id="244" pattern="1">
<source>PARENT.TIPODOC</source>
<list>
<li Value="Normale" Code=" ">251 ENABLE</li>
<li Value="Scontrino" Code="SC">251 DISABLE "IMPONIBILE" @ "F11.235" +! "IMPOSTA" @ "F11.236" +!</li>
</list>
<field x="24.5" type="Numero" align="right" width="6" pattern="1">
<source>Protiva</source>
</field>
<field x="50" type="Stringa" width="4" id="250" pattern="1">
<source>CODIVA</source>
<field x="31.5" type="Stringa" align="right" width="7" pattern="1">
<source>Numdoc</source>
</field>
<field x="55" type="Array" width="15" id="251" pattern="1">
<prescript description="B11.251 PRESCRIPT">MESSAGE TABLEREAD,%IVA,CODIVA,S1</prescript>
<list>
<li Value="Normale" Code=" ">"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 x="40" type="Data" width="10" pattern="1">
<source>Datadoc</source>
</field>
</section>
<section type="Foot" level="11" hidden="1" pattern="1">
<prescript description="F11 PRESCRIPT">#241 @
#H1.102 @ &#3C;= IF
"F11" HIDE
ELSE
"F11" SHOW
THEN</prescript>
<field x="2" type="Numero" align="right" width="7" pattern="1">
<source>NUMREG</source>
</field>
<field x="10.5" type="Data" width="10" pattern="1">
<source>DATAREG</source>
</field>
<field x="21.5" type="Stringa" width="3.5" pattern="1">
<source>REG</source>
</field>
<field x="25.5" type="Numero" align="right" width="6" pattern="1">
<source>PROTIVA</source>
</field>
<field x="32.5" type="Stringa" align="right" width="7" pattern="1">
<source>NUMDOC</source>
</field>
<field x="41" type="Data" width="10" pattern="1">
<source>DATADOC</source>
<field x="51.5" type="Stringa" width="3.5" pattern="1">
<source>Codcaus</source>
</field>
<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>
<source>Descr</source>
</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 x="77" type="Valuta" align="right" width="12" pattern="1" text="#########,@@">
<source>Totdoc</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.201</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 x="89" type="Valuta" align="right" width="12" pattern="1" text="#########,@@">
<source>Imponibile</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.202</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 x="101" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>Imposta</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.203</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 x="112" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>Imponibile_no</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.204</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 x="122" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>Imponibile_ni</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.205</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 x="132" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>Imponibile_es</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.206</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 x="142" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>Imponibile_co</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.207</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="84" y="1" type="Valuta" hidden="1" align="right" width="10" id="235" pattern="1" text="#########,@@">
<prescript description="F11.235 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.235" +!
THEN</prescript>
</field>
<field x="94" y="1" type="Valuta" hidden="1" align="right" width="10" id="236" pattern="1" text="#########,@@">
<prescript description="F11.236 PRESCRIPT">#241 @
"H1.102" @ &#3E;= IF
#THIS @
"F1.236" +!
THEN</prescript>
</field>
<field x="51.5" type="Stringa" width="3.5" id="239" pattern="1">
<source>CODCAUS</source>
</field>
<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="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 x="152" type="Valuta" align="right" width="8" pattern="1" text="#########,@@">
<source>Imposta_co</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.208</prescript>
</field>
</section>
<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">
<field border="1" x="1" y="0.25" type="Linea" width="168" height="0" pattern="1" />
<field x="3.5" y="0.75" type="Testo" width="12" pattern="1" text="Data stampa" />
<field x="15.5" y="0.75" type="Data" width="10" pattern="1">
<source>#DATASTAMPA</source>
</field>
<field x="151" y="0.75" type="Testo" width="5" pattern="1" text="Pag." />
<field x="156" 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="73" y="7.75" type="Testo" width="14" pattern="1" text="Scontrini" />
<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="89" y="7.75" type="Valuta" align="right" width="13" id="235" pattern="1" text="#########,@@" />
<field x="102" y="7.75" type="Valuta" align="right" width="13" id="236" 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="#########,@@" />
<field border="2" x="1" y="1" type="Linea" width="168" height="0" pattern="1" />
<field border="2" x="111.5" y="1" type="Linea" height="2.5" pattern="1" />
<field border="2" x="142" y="1" type="Linea" height="2.5" pattern="1" />
<field x="65" y="1.5" type="Testo" width="10" pattern="1" text="TOTALI" />
<field x="121" y="1.5" type="Testo" align="center" bg_color="#000000" width="12" pattern="1" text="Imponibili" />
<field x="146.5" y="1.5" type="Testo" align="center" width="12" pattern="1" text="Corrispettivi" />
<field x="74.5" y="2.5" type="Testo" align="right" bg_color="#000000" width="14" pattern="1" text="Tot. Documento" />
<field x="88.5" y="2.5" type="Testo" align="right" bg_color="#000000" width="12" pattern="1" text="Imponibile" />
<field x="100.5" y="2.5" type="Testo" align="right" bg_color="#000000" width="10" pattern="1" text="Imposta" />
<field x="110.5" y="2.5" type="Testo" align="right" bg_color="#C0C0C0" width="11" pattern="1" text="Normale" />
<field x="121.5" y="2.5" type="Testo" align="right" width="10" pattern="1" text="Non Imp." />
<field x="131.5" y="2.5" type="Testo" align="right" width="10" pattern="1" text="Esente" />
<field x="141.5" y="2.5" type="Testo" align="right" width="10" pattern="1" text="Imponib." />
<field x="151.5" y="2.5" type="Testo" align="right" width="8" pattern="1" text="Imposta" />
<field border="2" x="1" y="3.5" type="Linea" width="168" height="0" pattern="1" />
<field x="75" y="3.75" type="Valuta" align="right" width="14" id="201" pattern="1" text="#########,@@" />
<field x="89" y="3.75" type="Valuta" align="right" width="12" id="202" pattern="1" text="#########,@@" />
<field x="101" y="3.75" type="Valuta" align="right" width="10" id="203" pattern="1" text="#########,@@" />
<field x="111" y="3.75" type="Valuta" align="right" width="11" id="204" pattern="1" text="#########,@@" />
<field x="122" y="3.75" type="Valuta" align="right" width="10" id="205" pattern="1" text="#########,@@" />
<field x="132" y="3.75" type="Valuta" align="right" width="10" id="206" pattern="1" text="#########,@@" />
<field x="142" y="3.75" type="Valuta" align="right" width="10" id="207" pattern="1" text="#########,@@" />
<field x="152" y="3.75" type="Valuta" align="right" width="8" id="208" pattern="1" text="#########,@@" />
</section>
<section type="Foot" level="2" pattern="1" />
<sql>USE MOV KEY 3

View File

@ -32,6 +32,7 @@ BEGIN
PROMPT 1 2 "Data stampa "
HELP "Data in cui viene effettuata la stampa"
FLAGS "A"
FIELD #DATASTAMPA
END
NUMBER F_ANNO 4