Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@16209 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8af73fbed4
commit
9a6fec1a12
@ -198,7 +198,7 @@ void TDichiarazione_CONAI::scrivi_csv(const TRectype& riga_generata, TDichiarazi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int compare_csv_rows(const TObject** o1, const TObject** o2)
|
static int compare_csv_rows_specie(const TObject** o1, const TObject** o2)
|
||||||
{
|
{
|
||||||
TToken_string& s1 = *(TToken_string*)*o1;
|
TToken_string& s1 = *(TToken_string*)*o1;
|
||||||
TToken_string& s2 = *(TToken_string*)*o2;
|
TToken_string& s2 = *(TToken_string*)*o2;
|
||||||
@ -228,6 +228,19 @@ static int compare_csv_rows(const TObject** o1, const TObject** o2)
|
|||||||
return cmp;
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
const TString& c1 = s1.get(5);
|
||||||
|
const TString& c2 = s2.get(5);
|
||||||
|
int cmp = c1.compare(c2);
|
||||||
|
|
||||||
|
return cmp;
|
||||||
|
}
|
||||||
|
|
||||||
//metodo di base per la ricerca delle righe documento che soddisfano i parametri dell'utonto
|
//metodo di base per la ricerca delle righe documento che soddisfano i parametri dell'utonto
|
||||||
void TDichiarazione_CONAI::elabora(const TMask& mask) const
|
void TDichiarazione_CONAI::elabora(const TMask& mask) const
|
||||||
{
|
{
|
||||||
@ -360,8 +373,14 @@ void TDichiarazione_CONAI::elabora(const TMask& mask) const
|
|||||||
|
|
||||||
} //FOR_EACH...
|
} //FOR_EACH...
|
||||||
|
|
||||||
//riordinamento del file secondo: specie conai, codice cliente, numero documento
|
//riordinamento del file secondo:
|
||||||
csv->sort(compare_csv_rows);
|
//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);
|
||||||
|
|
||||||
//se richiesto il file in formato excel...
|
//se richiesto il file in formato excel...
|
||||||
if (mask.get_bool(F_EXCEL))
|
if (mask.get_bool(F_EXCEL))
|
||||||
@ -377,9 +396,11 @@ void TDichiarazione_CONAI::elabora(const TMask& mask) const
|
|||||||
//creazione del report di stampa
|
//creazione del report di stampa
|
||||||
TDichiarazione_CONAI_report rep;
|
TDichiarazione_CONAI_report rep;
|
||||||
bool ok = rep.load(nome_report);
|
bool ok = rep.load(nome_report);
|
||||||
|
//setta il recordset...
|
||||||
|
rep.set_recordset(csv);
|
||||||
|
//..e poi carica i valori sulla maschera nel report!!!!
|
||||||
rep.mask2report(mask);
|
rep.mask2report(mask);
|
||||||
|
|
||||||
rep.set_recordset(csv);
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
TReport_book book;
|
TReport_book book;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<report name="tp0900ca" orientation="1" lpi="6">
|
<report name="tp0900ca" orientation="1" lpi="6">
|
||||||
<description>Dichiarazione CONAI carta 6.1</description>
|
<description>Dichiarazione CONAI carta 6.1</description>
|
||||||
<font face="Courier New" size="8" />
|
<font face="Courier New" size="10" />
|
||||||
<section type="Head">
|
<section type="Head">
|
||||||
<field x="60.5" y="9.75" type="Numero" align="right" width="5" pattern="1">
|
<field x="60.5" y="9.75" type="Numero" align="right" width="5" pattern="1">
|
||||||
<source>#ANNO</source>
|
<source>#ANNO</source>
|
||||||
@ -53,6 +53,7 @@ MESSAGE ADD,F0.210</postscript>
|
|||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
<section y="26" type="Foot">
|
<section y="26" type="Foot">
|
||||||
|
<font face="Courier New" size="8" />
|
||||||
<field x="26.5" y="20" type="Data" width="14" pattern="1">
|
<field x="26.5" y="20" type="Data" width="14" pattern="1">
|
||||||
<font face="Courier New" size="10" />
|
<font face="Courier New" size="10" />
|
||||||
<source>#SYSTEM.DATE</source>
|
<source>#SYSTEM.DATE</source>
|
||||||
@ -189,6 +190,30 @@ MESSAGE ADD,F0.210</postscript>
|
|||||||
<prescript description="F0.210 PRESCRIPT">#THIS @
|
<prescript description="F0.210 PRESCRIPT">#THIS @
|
||||||
1000 F;
|
1000 F;
|
||||||
2 ROUND
|
2 ROUND
|
||||||
|
#THIS !</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="60.5" y="0.25" type="Numero" align="right" width="10" id="300" pattern="1" />
|
||||||
|
<field x="60.5" y="1.25" type="Numero" align="right" width="10" id="301" pattern="1" />
|
||||||
|
<field x="60.5" y="2.25" type="Numero" align="right" width="10" id="302" pattern="1" />
|
||||||
|
<field x="60.5" y="3.25" type="Numero" align="right" width="10" id="303" pattern="1" />
|
||||||
|
<field x="60.5" y="4.25" type="Valuta" align="right" width="10" id="304" pattern="1" text="#########,@@">
|
||||||
|
<prescript description="F0.304 PRESCRIPT">#204 @
|
||||||
|
30 *
|
||||||
|
#THIS !</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="60.5" y="5.25" type="Numero" align="right" width="10" id="305" pattern="1" />
|
||||||
|
<field x="60.5" y="6.25" type="Numero" align="right" width="10" id="306" pattern="1" />
|
||||||
|
<field x="60.5" y="7.25" type="Numero" align="right" width="10" id="307" pattern="1" />
|
||||||
|
<field x="60.5" y="8.25" type="Numero" align="right" width="10" id="308" pattern="1" />
|
||||||
|
<field x="60.5" y="9.25" type="Numero" align="right" width="10" id="309" pattern="1" />
|
||||||
|
<field x="60.5" y="10.25" type="Valuta" align="right" width="10" id="310" pattern="1" text="#########,@@">
|
||||||
|
<font face="Courier New" bold="1" size="8" />
|
||||||
|
<prescript description="F0.310 PRESCRIPT">#210 @
|
||||||
|
30 *
|
||||||
|
#THIS !</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="25" y="12.25" type="Numero" align="right" width="55" id="410" pattern="1" text="LETTERE">
|
||||||
|
<prescript description="F0.410 PRESCRIPT">#310 @
|
||||||
#THIS !</prescript>
|
#THIS !</prescript>
|
||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user