Patch level :10.0 / 4.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :aggiunto allegato 6.1 alla dichiarazione conai


git-svn-id: svn://10.65.10.50/trunk@16269 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2008-03-07 11:49:21 +00:00
parent 2bd01e238a
commit 97043a38f5
4 changed files with 335 additions and 32 deletions

@ -70,22 +70,6 @@ public:
TDichiarazione_CONAI_csv_recordset();
};
/*const TDichiarazione_CONAI_csv_recordset::get(const char* field_name) const
{
if (*field_name == '#')
{
if (strcmp(field_name, "#RAGSOC") == 0)
{
TVariant& var = get_tmp_var();
var = mask.;
}
return var;
}
return NULL_VARIANT;
}*/
TDichiarazione_CONAI_csv_recordset::TDichiarazione_CONAI_csv_recordset()
: TCSV_recordset("CSV(,)\n")
{
@ -424,7 +408,7 @@ static int compare_csv_rows_specie(const TObject** o1, const TObject** o2)
TToken_string& s1 = *(TToken_string*)*o1;
TToken_string& s2 = *(TToken_string*)*o2;
//deve ordinare sul campo 8 (codagg2 = codice specie conai)
//deve ordinare sul campo codagg2 = codice specie conai (campo 8)
const TString& c1 = s1.get(8);
const TString& c2 = s2.get(8);
@ -454,7 +438,7 @@ static int compare_csv_rows_cofi(const TObject** o1, const TObject** o2)
TToken_string& s1 = *(TToken_string*)*o1;
TToken_string& s2 = *(TToken_string*)*o2;
//deve ordinare sul campo cofi/piva
//deve ordinare sul campo cofi/piva (campo 5)
const TString& c1 = s1.get(5);
const TString& c2 = s2.get(5);
int cmp = c1.compare(c2);
@ -462,6 +446,19 @@ static int compare_csv_rows_cofi(const TObject** o1, const TObject** o2)
return cmp;
}
static int compare_csv_rows_datadoc(const TObject** o1, const TObject** o2)
{
TToken_string& s1 = *(TToken_string*)*o1;
TToken_string& s2 = *(TToken_string*)*o2;
//deve ordinare sul campo datadoc (campo 3)
const TString& c1 = s1.get(3);
const TString& c2 = s2.get(3);
int cmp = c1.compare(c2);
return cmp;
}
//metodo di base per la ricerca delle righe documento che soddisfano i parametri dell'utonto
void TDichiarazione_CONAI::elabora(const TMask& mask) const
{
@ -534,9 +531,25 @@ void TDichiarazione_CONAI::elabora(const TMask& mask) const
}
//In caso il tipo stampa NON sia con il modello 6.1 basato sulla specie conai ma di tipo 6.3 basato sui..
//fornitori e le loro esenzioni, il report va rinominato perche' e' unico
if (mask.get_int(F_TIPOSTAMPA) == 2)
nome_report = "tp0900es.rep";
//fornitori e le loro esenzioni, oppure l'allegato del 6.1 il report va rinominato perche' e' unico
const int tipostampa = mask.get_int(F_TIPOSTAMPA);
switch (tipostampa)
{
case 1:
break; //se modello 6.1 va bene quello che ha stabilito nel precedente switch
case 2:
nome_report = "tp0900sc.rep"; //scheda elenco fatture allegata al 6.1
break;
case 3:
nome_report = "tp0900es.rep"; //modello 6.3 quantita' in esenzione
break;
case 4:
nome_report = "tp0900li.rep"; //lista clienti in esenzione
break;
default:
break;
}
//Adesso prende le numerazioni e i tipi documento
TSheet_field& sf = mask.sfield(F_TIPI);
@ -602,14 +615,24 @@ void TDichiarazione_CONAI::elabora(const TMask& mask) const
} //FOR_EACH...
//riordinamento del file secondo:
//In caso il tipo stampa sia con il modello 6.3 basato sui..
//fornitori e le loro esenzioni...
if (mask.get_int(F_TIPOSTAMPA) == 2)
csv->sort(compare_csv_rows_cofi);
else
//specie conai, codice cliente, numero documento
csv->sort(compare_csv_rows_specie);
//riordinamento del file secondo il tipo di stampa selezionato:
switch (tipostampa)
{
case 1:
csv->sort(compare_csv_rows_specie); //Mod.6.1: specie conai, codice cliente, numero documento
break;
case 2:
csv->sort(compare_csv_rows_datadoc); //Allegato 6.1: datadoc
break;
case 3:
csv->sort(compare_csv_rows_cofi); //Mod.6.3: piva e cofi
break;
case 4:
csv->sort(compare_csv_rows_cofi); //Lista clienti in esenzione: piva e cofi
break;
default:
break;
}
//se richiesto il file in formato excel...
if (mask.get_bool(F_EXCEL))

@ -116,13 +116,16 @@ BEGIN
ITEM "4|Legno "
ITEM "5|Vetro "
HELP "Codice spesa per contributo CONAI"
FIELD #SPECIECONAI
END
RADIOBUTTON F_TIPOSTAMPA 34
LIST F_TIPOSTAMPA 21
BEGIN
PROMPT 45 12 "@bTipo stampa"
ITEM "1|Mod.6.1"
ITEM "2|Mod.6.3"
ITEM "1|Modello 6.1"
ITEM "2|Allegato Mod. 6.1"
ITEM "3|Modello 6.3"
ITEM "4|Lista esenzioni"
FLAGS "Z"
END

BIN
tp/tp0900sc.png Executable file

Binary file not shown.

After

(image error) Size: 28 KiB

277
tp/tp0900sc.rep Executable file

@ -0,0 +1,277 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="tp0900sc" orientation="1" lpi="6">
<description>Allegato Mod. 6.1</description>
<font face="Courier New" size="10" />
<section type="Head" height="28">
<field x="51" y="0.25" type="Testo" valign="center" fg_color="#005A94" width="2" height="1.5" pattern="1" text="&#2F;">
<font face="Arial Narrow" size="18" />
</field>
<field x="55" y="0.5" type="Array" fg_color="#005A94" width="15" height="1.5" pattern="1">
<font face="Arial Narrow" bold="1" size="16" />
<source>#SPECIECONAI</source>
<list>
<li Value="ACCIAIO" Code="0" />
<li Value="ALLUMINIO" Code="1" />
<li Value="CARTA" Code="2" />
<li Value="PLASTICA" Code="3" />
<li Value="LEGNO" Code="4" />
<li Value="VETRO" Code="5" />
</list>
</field>
<field x="18.5" y="14.3" type="Array" hidden="1" width="1" pattern="1">
<source>#PERIODO</source>
<list>
<li Value="ANNO" Code="1">MESSAGE HIDE,2@|HIDE,3@</li>
<li Value="TRIMESTRE" Code="2">MESSAGE HIDE,3@|SHOW,2@</li>
<li Value="MESE" Code="3">MESSAGE HIDE,2@|SHOW,3@</li>
</list>
</field>
<field x="19.6" y="14.3" type="Stringa" valign="center" align="center" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<source>IF(#PERIODO="1","X","")</source>
</field>
<field x="60" y="14.5" type="Numero" align="right" width="5" pattern="1">
<source>#ANNO</source>
</field>
<field x="19.6" y="15.3" type="Stringa" valign="center" align="center" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<source>IF(#PERIODO="2","X","")</source>
</field>
<field x="42" y="15.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>2</groups>
<source>IF(#TRIMESTRE="3","X","")</source>
</field>
<field x="55.5" y="15.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>2</groups>
<source>IF(#TRIMESTRE="6","X","")</source>
</field>
<field x="70" y="15.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>2</groups>
<source>IF(#TRIMESTRE="9","X","")</source>
</field>
<field x="84" y="15.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>2</groups>
<source>IF(#TRIMESTRE="12","X","")</source>
</field>
<field x="19.6" y="16.3" type="Stringa" valign="center" align="center" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<source>IF(#PERIODO="3","X","")</source>
</field>
<field x="37" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="1","X","")</source>
</field>
<field x="41.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="2","X","")</source>
</field>
<field x="46" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="3","X","")</source>
</field>
<field x="51" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="4","X","")</source>
</field>
<field x="55.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="5","X","")</source>
</field>
<field x="60.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="6","X","")</source>
</field>
<field x="65" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="7","X","")</source>
</field>
<field x="70" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="8","X","")</source>
</field>
<field x="74.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="9","X","")</source>
</field>
<field x="79.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="10","X","")</source>
</field>
<field x="84" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="11","X","")</source>
</field>
<field x="88.5" y="16.56" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<groups>3</groups>
<source>IF(#MESE="12","X","")</source>
</field>
<field x="20.5" y="19" type="Stringa" width="30" pattern="1">
<source>#SOCIO</source>
</field>
<field x="64.25" y="19.25" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<source>IF(#PRODUT="1","X","")</source>
</field>
<field x="74" y="19.25" type="Stringa" width="1" pattern="1">
<font face="Courier New" bold="1" size="12" />
<source>IF(#PRODUT="2","X","")</source>
</field>
<field x="22.5" y="20.25" type="Stringa" width="50" pattern="1">
<source>#RAGSOC</source>
</field>
<field x="18" y="21.25" type="Stringa" width="30" pattern="1">
<source>#INDIR</source>
</field>
<field x="20" y="22.5" type="Stringa" width="16" pattern="1">
<source>#PAIV</source>
</field>
<field x="62.25" y="22.5" type="Stringa" width="16" pattern="1">
<source>#COFI</source>
</field>
<field x="31.5" y="23.75" type="Stringa" width="18" pattern="1">
<source>#RESP</source>
</field>
<field x="54.25" y="23.75" type="Stringa" width="16" pattern="1">
<source>#TEL</source>
</field>
<field x="76" y="23.75" type="Stringa" width="18" pattern="1">
<font face="Arial Narrow" size="8" />
<source>#EMAIL</source>
</field>
<field border="2" x="11.5" y="25.5" type="Linea" width="81" height="0" pattern="1" />
<field border="2" x="11.5" y="25.5" type="Linea" height="1.25" pattern="1" />
<field border="2" x="92.5" y="25.5" type="Linea" height="1.25" pattern="1" />
<field x="15.5" y="25.75" type="Testo" width="50" pattern="1" text="ELENCO DOCUMENTI ALLEGATO AL MODULO CONAI 6.1 --- ">
<font face="Arial" bold="1" size="10" />
</field>
<field x="66" y="25.75" type="Array" width="15" pattern="1">
<font face="Arial" bold="1" size="10" />
<source>#SPECIECONAI</source>
<list>
<li Value="ACCIAIO" Code="0" />
<li Value="ALLUMINIO" Code="1" />
<li Value="CARTA" Code="2" />
<li Value="PLASTICA" Code="3" />
<li Value="LEGNO" Code="4" />
<li Value="VETRO" Code="5" />
</list>
</field>
<field border="2" x="11.5" y="26.75" type="Linea" width="81" height="0" pattern="1" />
<field border="2" x="11.5" y="26.75" type="Linea" height="1.25" pattern="1" />
<field border="2" x="23" y="26.75" type="Linea" height="1.25" pattern="1" />
<field border="2" x="30" y="26.75" type="Linea" height="1.25" pattern="1" />
<field border="2" x="40" y="26.75" type="Linea" height="1.25" pattern="1" />
<field border="2" x="55" y="26.75" type="Linea" height="1.25" pattern="1" />
<field border="2" x="92.5" y="26.75" type="Linea" height="1.25" pattern="1" />
<field x="11.5" y="27" type="Testo" align="center" width="11" pattern="1" text="Data">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="23.5" y="27" type="Testo" align="center" width="6" pattern="1" text="Tipo">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="30" y="27" type="Testo" align="center" width="10" pattern="1" text="Numero">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="40" y="27" type="Testo" align="center" width="15" pattern="1" text="Valore Conai">
<font face="Courier New" bold="1" size="10" />
</field>
<field border="2" x="11.5" y="28" type="Linea" width="81" height="0" pattern="1" />
</section>
<section type="Head" level="1" />
<section type="Head" level="2">
<groupby>C</groupby>
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
</section>
<section type="Body">
<field x="2" y="0.5" type="Immagine" width="90" height="25.5" pattern="1">
<source>"tp0900sc.png"</source>
</field>
</section>
<section type="Body" level="1" hidden="1">
<field type="Data" width="10" pattern="1">
<source>D</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE COPY,F2.101</prescript>
</field>
<field x="10" type="Stringa" width="10" pattern="1">
<source>A</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE COPY,F2.102</prescript>
</field>
<field x="20" type="Numero" align="right" width="10" pattern="1">
<source>C</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE COPY,F2.103</prescript>
</field>
<field x="30" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
<source>O</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F2.104</prescript>
</field>
</section>
<section type="Foot" height="3">
<font face="Courier New" size="8" />
</section>
<section type="Foot" level="1">
<field x="11.5" y="0.5" type="Testo" width="80" pattern="1" text="(*) Attenzione: ricordiamo che in questo modulo non devono essere inseriti i quantitativi relativi alle cessioni tra produttori">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
</field>
<field x="11.5" y="1.75" type="Testo" width="20" pattern="1" text="Il dichiarante:">
<font face="Courier New" bold="1" size="8" />
</field>
<field x="11.5" y="2.5" type="Testo" width="80" pattern="1" text="con la sottoscrizione della presente, si dichiara a tuttti gli effetti responsabile della ">
<font face="Courier New" size="8" />
</field>
<field x="11.5" y="3.25" type="Testo" width="81" pattern="1" text="veridicita' dei dati forniti a Conai e si impegna a comunicare tempestivamente le variazioni">
<font face="Courier New" size="8" />
</field>
<field x="11.5" y="4.12" type="Testo" width="80" pattern="1" text="che dovessero intervenire, per quanto di sua possibile conoscenza.">
<font face="Courier New" size="8" />
</field>
<field x="12" y="5.75" type="Testo" width="10" pattern="1" text="Data">
<font face="Courier New" size="8" />
</field>
<field x="65.5" y="5.75" type="Testo" align="center" width="20" pattern="1" text="Timbro e firma">
<font face="Courier New" size="8" />
</field>
<field x="12" y="7.25" type="Data" width="14" pattern="1">
<source>#SYSTEM.DATE</source>
</field>
<field border="1" x="11.5" y="8.75" type="Linea" width="15" height="0" pattern="1" />
<field border="1" x="68.25" y="8.75" type="Linea" width="15" height="0" pattern="1" />
<field border="1" x="11" y="10" type="Linea" width="80" height="0" pattern="1" />
<field x="11.5" y="10.5" type="Testo" width="80" pattern="1" text="Conai informa che i dati comunicati sono trattati da personale incaricato nel rispetto della legge sotto richiamata ed in ogni caso ">
<font face="Courier New" size="7" />
</field>
<field x="11.5" y="11.25" type="Testo" width="80" pattern="1" text="per permettere il regolare svolgimento delle attivita' previste dalle disposizioni dello Statuto, del Regolamento e delle">
<font face="Courier New" size="7" />
</field>
<field x="11.5" y="12" type="Testo" width="80" pattern="1" text="attivita' previste dalle disposizioni dello Statuto, del Regolamento e delle deliberazioni degli organi consortili. (Ai sensi della legge n. 675&#2F;96, ex. art. 10 e 13)">
<font face="Courier New" size="7" />
</field>
</section>
<section type="Foot" level="2">
<field border="1" x="11.5" type="Linea" pattern="1" />
<field border="1" x="22.8" type="Linea" pattern="1" />
<field border="1" x="30.1" type="Linea" pattern="1" />
<field border="1" x="40.05" type="Linea" pattern="1" />
<field border="1" x="55" type="Linea" pattern="1" />
<field border="1" x="11.5" y="1" type="Linea" width="43.5" height="0" pattern="1" />
<field x="12" type="Data" width="10" id="101" pattern="1" />
<field x="24" type="Stringa" align="right" width="5" id="102" pattern="1" />
<field x="32" type="Numero" align="right" width="7" id="103" pattern="1" hide_zero="1" />
<field x="40.5" type="Valuta" align="right" width="14" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
</section>
</report>