Patch level :4.0 418
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto programma di ricerca documenti del cazzo; ancora non a menu perchè va testato git-svn-id: svn://10.65.10.50/trunk@14019 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9f1020db48
commit
45aad68b83
@ -56,16 +56,18 @@ TStampa_contab_docs_mask::TStampa_contab_docs_mask()
|
||||
class TStampa_contab_docs_recordset : public TISAM_recordset
|
||||
{
|
||||
public:
|
||||
void set_filter(const TStampa_contab_docs_mask& msk);
|
||||
void set_filter(const int anno, const TString& codnum);
|
||||
TStampa_contab_docs_recordset(const TString& sql) : TISAM_recordset(sql) { }
|
||||
};
|
||||
|
||||
static const TStampa_contab_docs_recordset* myself = NULL;
|
||||
|
||||
//metodo per caricare i valori nel recordset dalla maschera...fighissimo!!
|
||||
void TStampa_contab_docs_recordset::set_filter(const TStampa_contab_docs_mask& msk)
|
||||
void TStampa_contab_docs_recordset::set_filter(const int anno, const TString& codnum)
|
||||
{
|
||||
|
||||
//mette il valore delle variabili nel report
|
||||
set_var("#CODNUM", TVariant(codnum));
|
||||
set_var("#ANNO", TVariant(long(anno)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
@ -78,17 +80,18 @@ protected:
|
||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||
|
||||
public:
|
||||
void set_filter(const TStampa_contab_docs_mask& msk, const TString& codnum);
|
||||
void set_filter(const int anno, const TString& codnum);
|
||||
};
|
||||
|
||||
|
||||
void TStampa_contab_docs_rep::set_filter(const TStampa_contab_docs_mask& msk, const TString& codnum)
|
||||
void TStampa_contab_docs_rep::set_filter(const int anno, const TString& codnum)
|
||||
{
|
||||
((TStampa_contab_docs_recordset*) recordset())->set_filter(anno, codnum);
|
||||
}
|
||||
|
||||
bool TStampa_contab_docs_rep::get_usr_val(const TString& name, TVariant& var) const
|
||||
{
|
||||
const TRecordset& recset = *recordset();
|
||||
|
||||
return TReport::get_usr_val(name, var);
|
||||
}
|
||||
|
||||
@ -99,14 +102,14 @@ class TStampa_contab_docs : public TSkeleton_application
|
||||
{
|
||||
TString_array _codnums;
|
||||
protected:
|
||||
void cerca_numerazioni_valide(const TStampa_contab_docs_mask& msk);
|
||||
void cerca_numerazioni_valide(const int anno);
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
//scan di tutte le numerazioni;per ognuna di esse scan dei tipi collegati;se almeno uno di questi..
|
||||
//..presenta una causale contabile (generale e/o analitica) -> la numerazione in questione viene..
|
||||
//..presa in considerazione nella stampa del report!
|
||||
void TStampa_contab_docs::cerca_numerazioni_valide(const TStampa_contab_docs_mask& msk)
|
||||
void TStampa_contab_docs::cerca_numerazioni_valide(const int anno)
|
||||
{
|
||||
_codnums.destroy();
|
||||
TTable num("%NUM");
|
||||
@ -127,7 +130,7 @@ void TStampa_contab_docs::cerca_numerazioni_valide(const TStampa_contab_docs_mas
|
||||
_codnums.add(codnum.codice());
|
||||
break;
|
||||
/* //crea l'oggetto causale per chiedergli se è legata all'analitica (quindi anale)
|
||||
const TCausale caus(codcaus, msk.get_int(F_ESERCIZIO));
|
||||
const TCausale caus(codcaus, anno);
|
||||
const bool anale = caus.link_analitica();*/
|
||||
}
|
||||
} //for(int t =...
|
||||
@ -145,11 +148,12 @@ void TStampa_contab_docs::main_loop()
|
||||
rep.load("ve1500a");
|
||||
|
||||
//crea l'elenco delle numerazioni da considerare e lo mette in _codnums
|
||||
cerca_numerazioni_valide(mask);
|
||||
const int anno = mask.get_int(F_ESERCIZIO);
|
||||
cerca_numerazioni_valide(anno);
|
||||
|
||||
FOR_EACH_ARRAY_ROW(_codnums, i, row)
|
||||
{
|
||||
rep.set_filter(mask, *row); //passa alla set_filter anche la numerazione corrente
|
||||
rep.set_filter(anno, *row); //passa alla set_filter anche la numerazione corrente
|
||||
book.add(rep);
|
||||
}
|
||||
book.print_or_preview(); //stampa il book dei report
|
||||
|
101
ve/ve1500a.rep
101
ve/ve1500a.rep
@ -6,10 +6,10 @@
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="6">
|
||||
<field border="1" radius="100" x="18" y="0.5" type="Testo" valign="center" align="center" shade_offset="25" width="130" height="2.5" text="LISTA SINTETICA CESPITI">
|
||||
<field border="1" radius="100" x="1" y="0.5" type="Testo" valign="center" align="center" shade_offset="25" width="90" height="2.5" text="STAMPA DI CONTROLLO DOCUMENTI CONTABILIZZATI">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field border="2" y="4" type="Linea" width="176" height="0" pattern="1" />
|
||||
<field border="2" y="4" type="Linea" width="90" height="0" pattern="1" />
|
||||
<field x="1" y="4.5" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="9" />
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
@ -24,81 +24,64 @@
|
||||
<section repeat="1" type="Head" level="2">
|
||||
<groupby>CODCAT</groupby>
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<field x="1" type="Testo" width="12" pattern="1" text="Categoria:">
|
||||
<field x="1" type="Testo" width="6" pattern="1" text="Anno">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
</field>
|
||||
<field x="16" type="Stringa" width="70" pattern="1">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<source>#DESCAT</source>
|
||||
<field x="8" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field x="157" y="0.75" type="Testo" align="justify" width="12" height="3" pattern="1" text="Valore residuo da ammortizzare" />
|
||||
<field x="24" y="1" type="Testo" align="center" width="10" pattern="1" text="Date" />
|
||||
<field x="89.5" y="1" type="Testo" width="8" pattern="1" text="Valori" />
|
||||
<field x="126.5" y="1" type="Testo" width="20" pattern="1" text="Fondo Ammortamento" />
|
||||
<field x="1" y="2" type="Testo" width="10" pattern="1" text="Codice" />
|
||||
<field x="11" y="2" type="Testo" width="11" pattern="1" text="Alienazione" />
|
||||
<field x="24" y="2" type="Testo" width="10" pattern="1" text="Acquisto" />
|
||||
<field x="34.5" y="2" type="Testo" width="10" pattern="1" text="Entr. Funz." />
|
||||
<field x="46" y="2" type="Testo" width="30" pattern="1" text="Descrizione" />
|
||||
<field x="72" y="2" type="Testo" align="right" width="12" pattern="1" text="Acquisizione" />
|
||||
<field x="85" y="2" type="Testo" align="right" width="12" pattern="1" text="Alienazioni" />
|
||||
<field x="98" y="2" type="Testo" align="right" width="12" pattern="1" text="Aggiornato" />
|
||||
<field x="112" y="2" type="Testo" align="right" width="4" pattern="1" text="%Amm" />
|
||||
<field x="118" y="2" type="Testo" align="right" width="12" pattern="1" text="Es. corrente" />
|
||||
<field x="131" y="2" type="Testo" align="right" width="12" pattern="1" text="Fine es.prec" />
|
||||
<field x="143" y="2" type="Testo" align="right" width="12" pattern="1" text="Totale" />
|
||||
<field border="1" x="1" y="3" type="Linea" width="172" height="0" pattern="1" />
|
||||
<field x="13" type="Numero" align="right" width="2" id="101" pattern="1">
|
||||
<field x="1" y="1" type="Testo" width="14" pattern="1" text="Numerazione">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<source>CODCAT</source>
|
||||
</field>
|
||||
<field x="15" y="1" type="Stringa" align="right" width="5" pattern="1">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<source>CODNUM</source>
|
||||
</field>
|
||||
<field x="21" y="1" type="Stringa" width="50" pattern="1">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE TABLEREAD,%NUM,CODNUM,S0</prescript>
|
||||
</field>
|
||||
<field x="1" y="2.5" type="Testo" width="5" pattern="1" text="Tipo" />
|
||||
<field x="7" y="2.5" type="Testo" align="right" width="8" pattern="1" text="Numero" />
|
||||
<field x="16" y="2.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
|
||||
<field x="27" y="2.5" type="Testo" align="right" width="10" pattern="1" text="N. reg. CG" />
|
||||
<field x="39" y="2.5" type="Testo" align="right" width="10" pattern="1" text="N. reg. CA" />
|
||||
<field border="1" x="1" y="3.5" type="Linea" width="90" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field type="Stringa" width="10" pattern="1">
|
||||
<source>IDCESPITE</source>
|
||||
<field x="1" type="Stringa" width="4" pattern="1">
|
||||
<source>TIPODOC</source>
|
||||
</field>
|
||||
<field x="11.5" type="Data" width="10" pattern="1">
|
||||
<source>DTALIEN</source>
|
||||
<field x="7" type="Numero" align="right" width="7" pattern="1">
|
||||
<source>NDOC</source>
|
||||
</field>
|
||||
<field x="23" type="Data" width="10" pattern="1">
|
||||
<source>DTCOMP</source>
|
||||
<field x="16" type="Data" width="10" pattern="1">
|
||||
<source>DATADOC</source>
|
||||
</field>
|
||||
<field x="34.5" type="Data" width="10" pattern="1">
|
||||
<source>DTFUNZ</source>
|
||||
<field x="30" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
|
||||
<source>NUMREG</source>
|
||||
</field>
|
||||
<field x="46" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<source>DESC</source>
|
||||
<field x="42" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
|
||||
<source>NUMREGCA</source>
|
||||
</field>
|
||||
<field x="112" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#PERCAMM</source>
|
||||
<field x="60" type="Numero" align="right" fg_color="#FF0000" width="7" pattern="1">
|
||||
<source>23.NUMREG</source>
|
||||
</field>
|
||||
<field x="98" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@">
|
||||
<source>#COSTO</source>
|
||||
</field>
|
||||
<field x="85" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@">
|
||||
<source>#ALIENAZ</source>
|
||||
</field>
|
||||
<field x="72" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
|
||||
<source>#101-#102</source>
|
||||
</field>
|
||||
<field x="118" type="Numero" align="right" width="12" id="104" pattern="1">
|
||||
<source>#QAMM</source>
|
||||
</field>
|
||||
<field x="131" type="Numero" align="right" width="12" id="105" pattern="1">
|
||||
<source>#FAMM</source>
|
||||
</field>
|
||||
<field x="144" type="Numero" align="right" width="12" id="106" pattern="1">
|
||||
<source>#104+#105</source>
|
||||
</field>
|
||||
<field x="157" type="Numero" align="right" width="12" id="107" pattern="1">
|
||||
<source>#101-#106</source>
|
||||
<field x="70" type="Numero" align="right" fg_color="#FF0000" width="7" pattern="1">
|
||||
<source>107.NUMREG</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" height="1">
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="196" height="0" pattern="1" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="90" height="0" pattern="1" />
|
||||
</section>
|
||||
<sql>USE CESPI KEY 2</sql>
|
||||
<sql>USE DOC
|
||||
SELECT ((NUMREG!='')||(NUMREGCA!=''))((23-E;NUMREG!=NUMREG)||(107-E;NUMREG!=NUMREGCA))
|
||||
JOIN MOV INTO NUMREG==NUMREG
|
||||
JOIN MOVANA INTO NUMREG==NUMREGCA
|
||||
FROM PROVV='D' CODNUM=#CODNUM ANNO=#ANNO
|
||||
TO PROVV='D' CODNUM=#CODNUM ANNO=#ANNO
|
||||
</sql>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user