Patch level :4.0 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :iniziato il programma di ricerca documenti contabilizzati per finta git-svn-id: svn://10.65.10.50/trunk@14010 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ac4ce80261
commit
9631bbe0c1
@ -10,6 +10,7 @@ int main(int argc, char **argv)
|
||||
case 1 : ve1200(argc, argv); break; //stampa scoperto, lista bolle
|
||||
case 2 : ve1300(argc, argv); break; //stampa report documenti
|
||||
case 3 : ve1400(argc, argv); break; //stampa tabelle vendita ed utilita' varie
|
||||
case 4 : ve1500(argc, argv); break; //stampa di controllo documenti contabilizzati
|
||||
default: ve1100(argc, argv); break; //stampa documenti di vendita
|
||||
}
|
||||
return 0;
|
||||
|
1
ve/ve1.h
1
ve/ve1.h
@ -5,6 +5,7 @@ int ve1100(int argc, char* argv[]);
|
||||
int ve1200(int argc, char* argv[]);
|
||||
int ve1300(int argc, char* argv[]);
|
||||
int ve1400(int argc, char* argv[]);
|
||||
int ve1500(int argc, char* argv[]);
|
||||
|
||||
#endif // __VE1_H
|
||||
|
||||
|
164
ve/ve1500.cpp
Executable file
164
ve/ve1500.cpp
Executable file
@ -0,0 +1,164 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <progind.h>
|
||||
#include <recset.h>
|
||||
#include <relation.h>
|
||||
#include <reprint.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include "../cg/cg2103.h"
|
||||
#include "velib.h"
|
||||
|
||||
#include "ve1.h"
|
||||
#include "ve1500.h"
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// MASCHERA
|
||||
////////////////////////////////////////////////////////
|
||||
class TStampa_contab_docs_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
TStampa_contab_docs_mask();
|
||||
virtual ~TStampa_contab_docs_mask() {}
|
||||
};
|
||||
|
||||
|
||||
bool TStampa_contab_docs_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
bool ok = true;
|
||||
/* switch (o.dlg())
|
||||
{
|
||||
case :
|
||||
if (e == fe_init || e == fe_modify)
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}*/
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
TStampa_contab_docs_mask::TStampa_contab_docs_mask()
|
||||
:TAutomask("ve1500")
|
||||
{}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// RECORDSET
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
class TStampa_contab_docs_recordset : public TISAM_recordset
|
||||
{
|
||||
public:
|
||||
void set_filter(const TStampa_contab_docs_mask& msk);
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// REPORT
|
||||
////////////////////////////////////////////////////////
|
||||
class TStampa_contab_docs_rep : public TReport
|
||||
{
|
||||
|
||||
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 TStampa_contab_docs_rep::set_filter(const TStampa_contab_docs_mask& msk, const TString& 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);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// APPLICAZIONE
|
||||
////////////////////////////////////////////////////////
|
||||
class TStampa_contab_docs : public TSkeleton_application
|
||||
{
|
||||
TString_array _codnums;
|
||||
protected:
|
||||
void cerca_numerazioni_valide(const TStampa_contab_docs_mask& msk);
|
||||
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)
|
||||
{
|
||||
_codnums.destroy();
|
||||
TTable num("%NUM");
|
||||
//giro sulle numerazioni
|
||||
for (int err = num.first(); err == NOERR; err = num.next())
|
||||
{
|
||||
const TCodice_numerazione codnum(num.curr());
|
||||
//giro sui tipidoc collegati
|
||||
for (int t = codnum.ntipi_doc()-1; t >= 0; t--)
|
||||
{
|
||||
const TString8 td = codnum.tipo_doc(t);
|
||||
const TTipo_documento& tpd = TDocumento::tipo(td);
|
||||
//causale collegata al tipo doc
|
||||
const TString& codcaus = tpd.causale();
|
||||
//se la causale non è vuota, la numerazione va considerata
|
||||
if (codcaus.not_empty())
|
||||
{
|
||||
_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 bool anale = caus.link_analitica();*/
|
||||
}
|
||||
} //for(int t =...
|
||||
} //for(num.first()
|
||||
}
|
||||
|
||||
void TStampa_contab_docs::main_loop()
|
||||
{
|
||||
TStampa_contab_docs_mask mask;
|
||||
while (mask.run() == K_ENTER)
|
||||
{
|
||||
//report e book dei report
|
||||
TReport_book book;
|
||||
TStampa_contab_docs_rep rep;
|
||||
rep.load("ve1500a");
|
||||
|
||||
//crea l'elenco delle numerazioni da considerare e lo mette in _codnums
|
||||
cerca_numerazioni_valide(mask);
|
||||
|
||||
FOR_EACH_ARRAY_ROW(_codnums, i, row)
|
||||
{
|
||||
rep.set_filter(mask, *row); //passa alla set_filter anche la numerazione corrente
|
||||
book.add(rep);
|
||||
}
|
||||
book.print_or_preview(); //stampa il book dei report
|
||||
}
|
||||
}
|
||||
|
||||
int ve1500(int argc, char* argv[])
|
||||
{
|
||||
TStampa_contab_docs a;
|
||||
a.run(argc, argv, TR("Stampa di controllo documenti contabilizzati"));
|
||||
return 0;
|
||||
}
|
6
ve/ve1500.h
Executable file
6
ve/ve1500.h
Executable file
@ -0,0 +1,6 @@
|
||||
//campi maschera ve1500.uml
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
#define F_ESERCIZIO 103
|
||||
#define F_DATAINIZIO 104
|
||||
#define F_DATAFINE 105
|
69
ve/ve1500.uml
Executable file
69
ve/ve1500.uml
Executable file
@ -0,0 +1,69 @@
|
||||
#include "ve1500.h"
|
||||
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
BUTTON DLG_PRINT 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -11 "~Stampa"
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -11 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Stampa di controllo documenti contabilizzati" -1 -1 78 6
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
BEGIN
|
||||
PROMPT 1 0 ""
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "DF"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 55
|
||||
BEGIN
|
||||
PROMPT 20 1 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ESERCIZIO 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Esercizio "
|
||||
FLAGS "Z"
|
||||
USE ESC
|
||||
INPUT CODTAB F_ESERCIZIO
|
||||
DISPLAY "Codice@10" CODTAB
|
||||
DISPLAY "Inizio esercizio" D0
|
||||
DISPLAY "Fine esercizio" D1
|
||||
OUTPUT F_ESERCIZIO CODTAB
|
||||
OUTPUT F_DATAINIZIO D0
|
||||
OUTPUT F_DATAFINE D1
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE F_DATAINIZIO
|
||||
BEGIN
|
||||
PROMPT 20 2 "Data inizio "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATAFINE
|
||||
BEGIN
|
||||
PROMPT 45 2 "Data fine "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
104
ve/ve1500a.rep
Executable file
104
ve/ve1500a.rep
Executable file
@ -0,0 +1,104 @@
|
||||
|
||||
<report name="ve1500a" lpi="6">
|
||||
<description>Stampa di controllo documenti contabilizzati</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head">
|
||||
<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">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field border="2" y="4" type="Linea" width="176" 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>
|
||||
</field>
|
||||
<field x="79" y="4.5" type="Data" width="10" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="157" y="4.5" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
</section>
|
||||
<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:">
|
||||
<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>
|
||||
<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">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<source>CODCAT</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field type="Stringa" width="10" pattern="1">
|
||||
<source>IDCESPITE</source>
|
||||
</field>
|
||||
<field x="11.5" type="Data" width="10" pattern="1">
|
||||
<source>DTALIEN</source>
|
||||
</field>
|
||||
<field x="23" type="Data" width="10" pattern="1">
|
||||
<source>DTCOMP</source>
|
||||
</field>
|
||||
<field x="34.5" type="Data" width="10" pattern="1">
|
||||
<source>DTFUNZ</source>
|
||||
</field>
|
||||
<field x="46" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<source>DESC</source>
|
||||
</field>
|
||||
<field x="112" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#PERCAMM</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>
|
||||
</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" />
|
||||
</section>
|
||||
<sql>USE CESPI KEY 2</sql>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user