Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :Stampa Venduto per 12 mesi git-svn-id: svn://10.65.10.50/trunk@18157 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6088c96513
commit
e195fbf05d
@ -13,6 +13,7 @@ int main(int argc, char** argv)
|
||||
case 3: lv2400(argc, argv); break; //generazione automatica bolle di consegna
|
||||
case 4: lv2600(argc, argv); break; //acquisizione bolle di rientro
|
||||
case 6: lv2700(argc, argv); break; //Riepilogo Bolle di Lavanderie
|
||||
case 7: lv2800(argc, argv); break; //Venduto Per Cliente nei 12 Mesi
|
||||
default: lv2100(argc, argv); break; //generazione automatica del planning
|
||||
}
|
||||
return 0;
|
||||
|
1
lv/lv2.h
1
lv/lv2.h
@ -7,5 +7,6 @@ int lv2300(int argc, char* argv[]);//Stampa Giri -2
|
||||
int lv2400(int argc, char* argv[]);
|
||||
int lv2600(int argc, char* argv[]);
|
||||
int lv2700(int argc, char* argv[]);//Riepilogo Bolle di Lavanderie -6
|
||||
int lv2800(int argc, char* argv[]);//Venduto Per Cliente nei 12 Mesi -7
|
||||
|
||||
#endif // __LV2_H
|
@ -287,6 +287,7 @@ void TGiri_app::main_loop()
|
||||
else
|
||||
{
|
||||
TGiri_report r(false); //Stampa Giro Giornaliero
|
||||
r.mask2report(m);
|
||||
TReport_book b;
|
||||
bool ok = b.add(r); // Richiede parametri di stampa in base alla maschera omonima
|
||||
if (ok)
|
||||
|
433
lv/lv2800.cpp
Executable file
433
lv/lv2800.cpp
Executable file
@ -0,0 +1,433 @@
|
||||
#include <Textset.h>
|
||||
#include <Applicat.h>
|
||||
#include <Automask.h>
|
||||
#include <Reprint.h>
|
||||
#include "lv0.h"
|
||||
#include "lv2800a.h"
|
||||
#include <config.h>
|
||||
|
||||
//Stampa Venduto Per Cliente nei 12 Mesi
|
||||
//lvietri
|
||||
class TVendCli_recordset: public TCSV_recordset
|
||||
{
|
||||
public:
|
||||
TVendCli_recordset(): TCSV_recordset("CSV(\"\t\")") {}
|
||||
};
|
||||
|
||||
struct TStruttura: public TObject
|
||||
{
|
||||
long _prezzo;
|
||||
long _cliente;
|
||||
TString _articolo;
|
||||
TString _descr;
|
||||
TDate _dataDoc;
|
||||
int _numeroDoc;
|
||||
long _qta;
|
||||
TStruttura():_cliente(0),_articolo(""),_descr(""),_dataDoc(""),_numeroDoc(0),_qta(0) {}
|
||||
TStruttura(long cliente, TString articolo, TString descr,
|
||||
TDate dataDoc, int numeroDoc,
|
||||
long qta, long prezzo):_cliente(cliente),_articolo(articolo),
|
||||
_descr(descr),_dataDoc(dataDoc),_numeroDoc(numeroDoc),
|
||||
_qta(qta),_prezzo(prezzo) {}
|
||||
};
|
||||
|
||||
class TVendCli_mask: public TAutomask
|
||||
{
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TVendCli_mask():TAutomask("lv2800a"){}
|
||||
};
|
||||
|
||||
bool TVendCli_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
class TVendCli_report : public TReport
|
||||
{
|
||||
protected:
|
||||
virtual bool use_mask() { return false; }
|
||||
};
|
||||
|
||||
class TVendCli_app: public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
virtual void main_loop();
|
||||
void elabora(const TMask& mask) const;
|
||||
TString getQuery() const;
|
||||
bool ctl(TDate dataInizio,
|
||||
TDate dataFine,
|
||||
int dataNum,
|
||||
bool isAnno) const;
|
||||
};
|
||||
|
||||
TString TVendCli_app::getQuery() const
|
||||
{
|
||||
//Stringhe x composizione query
|
||||
TString query, select, between, orderBy, join, from_, to_;
|
||||
|
||||
//Richiamo parametri della ditta di configurazione
|
||||
//file Ditta.ini
|
||||
TConfig lvini(CONFIG_DITTA, "lv");
|
||||
const TString4 codnum = "B01";//lvini.get("NUM_GEN"); ??
|
||||
const TString4 tipodoc = "B01";//lvini.get("TIPODOC_GEN");??
|
||||
|
||||
select << "USE RDOC KEY 1\n";
|
||||
select << "SELECT ((DOC.TIPODOC='" << tipodoc << "')&&";
|
||||
between << "(BETWEEN(DOC.ZONA,#F_ZONA_FROM,#F_ZONA_FROM))";
|
||||
between << "&&(BETWEEN(CODART,#F_CODART_FROM,#F_CODART_TO))";
|
||||
between << "&&(BETWEEN(DOC.DATADOC,#F_DATA_FROM,#F_DATA_TO))";
|
||||
between << "&&(BETWEEN(DOC.CODCF,#F_CODCF_FROM,#F_CODCF_TO)))\n";
|
||||
orderBy << "BY DOC.CODCF CODART DOC.DATADOC NDOC\n";
|
||||
join << "JOIN DOC TO RDOC ALIAS 1000 INTO CODNUM==CODNUM ANNO==ANNO PROVV==PROVV NDOC==NDOC\n";
|
||||
from_ << "FROM CODNUM='" << codnum << "'\n";
|
||||
to_ << "TO CODNUM='" << codnum << "'";
|
||||
|
||||
query << select << between << orderBy << join << from_ << to_;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
class TRiepVendCli: public TArray
|
||||
{
|
||||
public:
|
||||
void add(int count,long cliente, TString articolo, TString descr,
|
||||
TDate dataDoc, int numeroDoc, long qta, long prezzo);
|
||||
TRiepVendCli():TArray(9){}
|
||||
};
|
||||
|
||||
|
||||
void TRiepVendCli::add(int count,long cliente, TString articolo, TString descr,
|
||||
TDate dataDoc, int numeroDoc, long qta, long prezzo)
|
||||
{
|
||||
TStruttura* struttura = new TStruttura(cliente,articolo, descr,dataDoc,numeroDoc,qta, prezzo);
|
||||
TArray::add(struttura,count);
|
||||
}
|
||||
|
||||
/*
|
||||
Effettuo Controlli. Ritorna false-Errore se:
|
||||
- data iniziale vuota
|
||||
- data finale vuota
|
||||
- date appartenenti ad anno differente
|
||||
(msk gestisce controllo se data iniziale è maggiore di
|
||||
quella finale)
|
||||
*/
|
||||
bool TVendCli_app:: ctl(TDate dataInizio,
|
||||
TDate dataFine,
|
||||
int dataNum,
|
||||
bool isAnno) const
|
||||
{
|
||||
bool vRc = true;
|
||||
|
||||
if(isAnno)
|
||||
{
|
||||
if(dataNum==0)
|
||||
{
|
||||
error_box (TR("ERRORE:Valorizzare l'anno"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dataInizio.empty())
|
||||
{
|
||||
error_box (TR("ERRORE:Valorizzare la data iniziale!"));
|
||||
return false;
|
||||
}
|
||||
if(dataFine.empty())
|
||||
{
|
||||
error_box (TR("ERRORE:Valorizzare la data finale!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
int annoInizio = dataInizio.year();
|
||||
int annoFine = dataFine.year();
|
||||
if(annoInizio!=annoFine)
|
||||
{
|
||||
error_box (TR("ERRORE:le date non fanno parte dello stesso anno!"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//metodo principale di elaborazione
|
||||
void TVendCli_app:: elabora(const TMask& mask)const
|
||||
{
|
||||
/*
|
||||
Se i controlli vanno a buon fine, allora
|
||||
va avanti nella gestione
|
||||
*/
|
||||
if(ctl(mask.get_date(F_DATA_DA),
|
||||
mask.get_date(F_DATA_A),
|
||||
mask.get_int(F_ANNO),
|
||||
mask.get_bool(F_CHECK_ANNO)))
|
||||
{
|
||||
TISAM_recordset riep(getQuery());
|
||||
|
||||
TDate dataDa = mask.get_date(F_DATA_DA);
|
||||
TDate dataA = mask.get_date(F_DATA_A);
|
||||
|
||||
if(mask.get_bool(F_CHECK_ANNO))
|
||||
{
|
||||
dataDa.set_day(1);
|
||||
dataDa.set_month(1);
|
||||
dataDa.set_year(mask.get_int(F_ANNO));
|
||||
|
||||
dataA.set_day(31);
|
||||
dataA.set_month(12);
|
||||
dataA.set_year(mask.get_int(F_ANNO));
|
||||
}
|
||||
|
||||
//inserire parametri filtri
|
||||
riep.set_var("#F_DATA_FROM",dataDa);
|
||||
riep.set_var("#F_DATA_TO",dataA);
|
||||
riep.set_var("#F_CODCF_FROM",TVariant(mask.get(F_CODCF_DA)));
|
||||
riep.set_var("#F_CODCF_TO",TVariant(mask.get(F_CODCF_A)));
|
||||
riep.set_var("#F_ZONA_FROM",TVariant(mask.get(F_ZONA)));
|
||||
riep.set_var("#F_ANNO_TO",TVariant(mask.get(F_ANNO)));
|
||||
riep.set_var("#F_CHECK_ANNO_TO",TVariant(mask.get(F_CHECK_ANNO)));
|
||||
riep.set_var("#F_CODART_FROM",TVariant(mask.get(F_CODART_FROM)));
|
||||
riep.set_var("#F_CODART_TO",TVariant(mask.get(F_CODART_TO)));
|
||||
|
||||
TRiepVendCli riepilogo;
|
||||
int count = 1;
|
||||
|
||||
for(bool ok = riep.move_first();ok;ok=riep.move_next())
|
||||
{
|
||||
TDate dataDoc = riep.get("DOC.DATADOC").as_date();
|
||||
TString articolo = riep.get("CODART").as_string();
|
||||
TString descr = riep.get("DESCR").as_string();
|
||||
|
||||
int numeroDoc = riep.get("NDOC").as_int();
|
||||
long cliente = riep.get("DOC.CODCF").as_int();
|
||||
long qta = riep.get("QTA").as_int();
|
||||
long prezzo = riep.get("PREZZO").as_int();
|
||||
|
||||
riepilogo.add(count,cliente,articolo,descr,dataDoc,numeroDoc,qta,prezzo);
|
||||
count++;
|
||||
}
|
||||
|
||||
//gestione report
|
||||
TVendCli_report rep;
|
||||
bool stampa = rep.load("lv2800a");
|
||||
TVendCli_recordset* riep_set = new TVendCli_recordset();
|
||||
rep.set_recordset(riep_set);
|
||||
|
||||
//inizializzazione variabili
|
||||
TString articoloOld;
|
||||
TString descrOld;
|
||||
int clienteOld = 0;
|
||||
bool START = true;
|
||||
int colonna = 0;
|
||||
long qt01 = 0;
|
||||
long qt02 = 0;
|
||||
long qt03 = 0;
|
||||
long qt04 = 0;
|
||||
long qt05 = 0;
|
||||
long qt06 = 0;
|
||||
long qt07 = 0;
|
||||
long qt08 = 0;
|
||||
long qt09 = 0;
|
||||
long qt10 = 0;
|
||||
long qt11 = 0;
|
||||
long qt12 = 0;
|
||||
|
||||
//scandisce clienti e tiene buoni solo quelli valorizzati
|
||||
FOR_EACH_ARRAY_ITEM(riepilogo,c,obj)
|
||||
{
|
||||
TStruttura& s = *(TStruttura*) obj;
|
||||
|
||||
//Solo la prima volta setto le variabili altrimenti
|
||||
//entrerebbe sempre nel metodo creazione record
|
||||
//in report
|
||||
if(START)
|
||||
{
|
||||
clienteOld=s._cliente;
|
||||
articoloOld=s._articolo;
|
||||
START = false;
|
||||
}
|
||||
|
||||
//metodo creazione record in report
|
||||
if((clienteOld!=s._cliente ||
|
||||
articoloOld!=s._articolo))
|
||||
{
|
||||
riep_set->new_rec();
|
||||
colonna = 0;
|
||||
riep_set->set(colonna,TVariant(long (clienteOld)));//CAMPO DI ROTTURA
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(long (clienteOld)));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(articoloOld));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(descrOld));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt01));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt02));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt03));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt04));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt05));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt06));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt07));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt08));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt09));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt10));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt11));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt12));
|
||||
|
||||
clienteOld = s._cliente;
|
||||
articoloOld= s._articolo;
|
||||
descrOld = s._descr;
|
||||
|
||||
qt01=0;
|
||||
qt02=0;
|
||||
qt03=0;
|
||||
qt04=0;
|
||||
qt05=0;
|
||||
qt06=0;
|
||||
qt07=0;
|
||||
qt08=0;
|
||||
qt09=0;
|
||||
qt10=0;
|
||||
qt11=0;
|
||||
qt12=0;
|
||||
}
|
||||
|
||||
//Gestione Somma qta in base al mese
|
||||
TString data = s._dataDoc;
|
||||
TString mese = data.mid(3,2);
|
||||
|
||||
if(mese=="01"){
|
||||
qt01 = qt01 + s._qta;
|
||||
}
|
||||
if(mese=="02"){
|
||||
qt02 = qt02 + s._qta;
|
||||
}
|
||||
if(mese=="03"){
|
||||
qt03 = qt03 + s._qta;
|
||||
}
|
||||
if(mese=="04"){
|
||||
qt04 = qt04 + s._qta;
|
||||
}
|
||||
if(mese=="05"){
|
||||
qt05 = qt05 + s._qta;
|
||||
}
|
||||
if(mese=="06"){
|
||||
qt06 = qt06 + s._qta;
|
||||
}
|
||||
if(mese=="07"){
|
||||
qt07 = qt07 + s._qta;
|
||||
}
|
||||
if(mese=="08"){
|
||||
qt08 = qt08 + s._qta;
|
||||
}
|
||||
if(mese=="09"){
|
||||
qt09 = qt09 + s._qta;
|
||||
}
|
||||
if(mese=="10"){
|
||||
qt10 = qt10 + s._qta;
|
||||
}
|
||||
if(mese=="11"){
|
||||
qt11 = qt11 + s._qta;
|
||||
}
|
||||
if(mese=="12"){
|
||||
qt12 = qt12 + s._qta;
|
||||
}
|
||||
}
|
||||
|
||||
//Stampa Ultimo record se ne ha fatto almeno 1
|
||||
if(!START)
|
||||
{
|
||||
riep_set->new_rec();
|
||||
colonna = 0;
|
||||
riep_set->set(colonna,TVariant(long (clienteOld)));//CAMPO DI ROTTURA
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(long (clienteOld)));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(articoloOld));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(descrOld));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt01));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt02));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt03));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt04));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt05));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt06));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt07));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt08));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt09));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt10));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt11));
|
||||
colonna++;
|
||||
riep_set->set(colonna,TVariant(qt12));
|
||||
}
|
||||
|
||||
//Crea file che contiene il recordset
|
||||
//riep_set->save_as("c:\\riepilogoBolla.txt");
|
||||
|
||||
//Se il report esiste..
|
||||
if(stampa)
|
||||
{
|
||||
//carica tutte le variabili del report.
|
||||
rep.mask2report(mask);
|
||||
|
||||
TReport_book b;
|
||||
bool ok = b.add(rep);// Richiede parametri di stampa in base alla maschera omonima
|
||||
if (ok)
|
||||
{
|
||||
//Se esiste almeno 1 pagina
|
||||
if (b.pages() > 0)
|
||||
b.print_or_preview(); // Stampa effettivamente
|
||||
else
|
||||
warning_box (TR("Nessun record estratto per i parametri inseriti"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TVendCli_app::main_loop()
|
||||
{
|
||||
TVendCli_mask mask;
|
||||
|
||||
//Settaggio della data finale come
|
||||
//31-12-(anno in corso)
|
||||
TString data = "31-12-";
|
||||
data << mask.get_int(F_ANNO);
|
||||
mask.set("#F_DATA_TO",data);
|
||||
|
||||
while(mask.run()==K_ENTER)
|
||||
{
|
||||
elabora(mask);
|
||||
}
|
||||
}
|
||||
|
||||
int lv2800(int argc, char* argv[])
|
||||
{
|
||||
TVendCli_app app;
|
||||
app.run(argc, argv, TR("Stampa Venduto Per Cliente nei 12 Mesi"));
|
||||
return 0;
|
||||
}
|
15
lv/lv2800a.h
Executable file
15
lv/lv2800a.h
Executable file
@ -0,0 +1,15 @@
|
||||
//Stampa Venduto Per Cliente nei 12 Mesi
|
||||
#define F_CODCF_DA 203
|
||||
#define F_RAGSOC_DA 204
|
||||
#define F_CODCF_A 205
|
||||
#define F_RAGSOC_A 206
|
||||
#define F_DATA_DA 207
|
||||
#define F_DATA_A 208
|
||||
#define F_ANNO 209
|
||||
#define F_CHECK_ANNO 210
|
||||
#define F_CODART_FROM 211
|
||||
#define F_DESART_FROM 212
|
||||
#define F_CODART_TO 213
|
||||
#define F_DESART_TO 214
|
||||
#define F_ZONA 215
|
||||
#define F_DESZONA 216
|
152
lv/lv2800a.rep
Executable file
152
lv/lv2800a.rep
Executable file
@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report page_merge="1" name="lv2800a" orientation="2" lpi="6">
|
||||
<description>Stampa Riepilogo Bolle di Lavanderia</description>
|
||||
<font face="Courier New" size="7" />
|
||||
<section type="Head">
|
||||
<field x="3" type="Testo" width="12" height="1.5" pattern="1" text="Data elab. :" />
|
||||
<field x="15.5" type="Stringa" width="15" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE _TODAY</prescript>
|
||||
</field>
|
||||
<field x="35.5" type="Testo" align="center" width="70" height="1.5" pattern="1" text="Stampa Venduto per Cliente nei 12 Mesi">
|
||||
<font face="Courier New" bold="1" size="12" />
|
||||
</field>
|
||||
<field x="113.37" y="0.12" type="Testo" width="5" height="1.5" pattern="1" text="Pag." />
|
||||
<field x="118.5" y="0.12" type="Stringa" width="10" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE _PAGENO</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section repeat="1" type="Head" level="2" height="4.5" page_break="1">
|
||||
<groupby>A</groupby>
|
||||
<field type="Testo" width="10" pattern="1" text="Cliente:">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="9.5" type="Stringa" width="8" pattern="1">
|
||||
<source>B</source>
|
||||
</field>
|
||||
<field x="18.5" type="Stringa" width="40" pattern="1">
|
||||
<source>B</source>
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE _ISAMREAD,20,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="59" type="Stringa" width="40" pattern="1">
|
||||
<source>B</source>
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE _ISAMREAD,20,TIPOCF='C'!CODCF=#THIS,INDCF</prescript>
|
||||
</field>
|
||||
<field x="101" type="Stringa" width="40" pattern="1">
|
||||
<source>B</source>
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE _ISAMREAD,20,TIPOCF='C'!CODCF=#THIS,LOCALITACF</prescript>
|
||||
</field>
|
||||
<field border="1" y="1.5" type="Linea" width="192" height="0" pattern="1" />
|
||||
<field y="2.5" type="Testo" width="8" pattern="1" text="Codice:">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="20.5" y="2.5" type="Testo" width="15" pattern="1" text="Descrizione:">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="50" y="2.5" type="Testo" width="10" pattern="1" text="Gennaio">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="60" y="2.5" type="Testo" width="10" pattern="1" text="Febbraio">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="70" y="2.5" type="Testo" width="10" pattern="1" text="Marzo">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="80" y="2.5" type="Testo" width="10" pattern="1" text="Aprile">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="90" y="2.5" type="Testo" width="10" pattern="1" text="Maggio">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="100" y="2.5" type="Testo" width="10" pattern="1" text="Giugno">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="110" y="2.5" type="Testo" width="10" pattern="1" text="Luglio">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="120" y="2.5" type="Testo" width="10" pattern="1" text="Agosto">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="130" y="2.5" type="Testo" width="10" pattern="1" text="Settembre">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="140" y="2.5" type="Testo" width="10" pattern="1" text="Ottobre">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="150" y="2.5" type="Testo" width="10" pattern="1" text="Novembre">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="160" y="2.5" type="Testo" width="10" pattern="1" text="Dicembre">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field x="3" y="3" type="Stringa" hidden="1" width="10" pattern="1">
|
||||
<source>A</source>
|
||||
</field>
|
||||
<field x="182" y="3" type="Testo" align="center" width="8" pattern="1" text="TOTALI">
|
||||
<font face="Courier New" bold="1" size="7" />
|
||||
</field>
|
||||
<field border="1" y="4" type="Linea" width="192" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field type="Stringa" width="20" pattern="1">
|
||||
<source>C</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE RESET,1000</prescript>
|
||||
</field>
|
||||
<field x="21" type="Stringa" width="28" pattern="1">
|
||||
<source>D</source>
|
||||
</field>
|
||||
<field x="50" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>E</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="60" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>F</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="70" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>G</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="80" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>H</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="90" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>I</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="100" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>J</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="110" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>K</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="120" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>L</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="130" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>M</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="140" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>N</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="150" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>O</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="160" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>P</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
|
||||
</field>
|
||||
<field x="182" type="Numero" align="right" width="8" id="1000" pattern="1" hide_zero="1" />
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" />
|
||||
</report>
|
195
lv/lv2800a.uml
Executable file
195
lv/lv2800a.uml
Executable file
@ -0,0 +1,195 @@
|
||||
#include "lv2800a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
#include "printbar.h"
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Venduto Per Cliente nei 12 Mesi" -1 -1 40 5
|
||||
|
||||
GROUPBOX DLG_NULL 80 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "@b Parametri Cliente"
|
||||
END
|
||||
|
||||
NUMBER F_CODCF_DA 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da Cliente "
|
||||
FLAGS "U"
|
||||
KEY 1
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CODCF_DA
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
OUTPUT F_CODCF_DA CODCF
|
||||
OUTPUT F_RAGSOC_DA RAGSOC
|
||||
FIELD #F_CODCF_FROM
|
||||
END
|
||||
|
||||
STRING F_RAGSOC_DA 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
KEY 2
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_RAGSOC_DA
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
DISPLAY "Codice" CODCF
|
||||
OUTPUT F_CODCF_DA CODCF
|
||||
OUTPUT F_RAGSOC_DA RAGSOC
|
||||
END
|
||||
|
||||
NUMBER F_CODCF_A 6
|
||||
BEGIN
|
||||
PROMPT 2 3 "A Cliente "
|
||||
FLAGS "U"
|
||||
KEY 1
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CODCF_A
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
OUTPUT F_CODCF_A CODCF
|
||||
OUTPUT F_RAGSOC_A RAGSOC
|
||||
FIELD #F_CODCF_TO
|
||||
END
|
||||
|
||||
STRING F_RAGSOC_A 50
|
||||
BEGIN
|
||||
PROMPT 25 3 ""
|
||||
KEY 2
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_RAGSOC_A
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
DISPLAY "Codice" CODCF
|
||||
OUTPUT F_CODCF_A CODCF
|
||||
OUTPUT F_RAGSOC_A RAGSOC
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 80 3
|
||||
BEGIN
|
||||
PROMPT 1 5 "@b Parametri Data"
|
||||
END
|
||||
|
||||
DATE F_DATA_DA
|
||||
BEGIN
|
||||
PROMPT 2 6 "Da Data "
|
||||
FLAGS "A"
|
||||
FIELD #F_DATA_FROM
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
DATE F_DATA_A
|
||||
BEGIN
|
||||
PROMPT 30 6 "A Data "
|
||||
FIELD #F_DATA_TO
|
||||
VALITATE DATE_CMP_FUNC >= F_DATA_DA
|
||||
WARNING "La data finale deve essere successiva a quella iniziale"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
BOOLEAN F_CHECK_ANNO
|
||||
BEGIN
|
||||
PROMPT 60 6 "Per Anno "
|
||||
FIELD #F_CHECK_ANNO_TO
|
||||
MESSAGE TRUE DISABLE,1@|ENABLE,F_ANNO
|
||||
MESSAGE FALSE ENABLE,1@|DISABLE,F_ANNO
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 72 6 ""
|
||||
FLAGS "A"
|
||||
FIELD #F_ANNO_TO
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 80 4
|
||||
BEGIN
|
||||
PROMPT 1 8 "@b Parametri Articolo"
|
||||
END
|
||||
|
||||
STRING F_CODART_FROM 20
|
||||
BEGIN
|
||||
PROMPT 2 9 "Da Articolo "
|
||||
FLAG "U"
|
||||
USE 47
|
||||
INPUT CODART F_CODART_FROM
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART_FROM CODART
|
||||
OUTPUT F_DESART_FROM DESCR
|
||||
FIELD #F_CODART_FROM
|
||||
END
|
||||
|
||||
STRING F_DESART_FROM 40
|
||||
BEGIN
|
||||
PR 38 9 ""
|
||||
USE 47 KEY 2
|
||||
INPUT DESCR F_DESART_FROM
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPALY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART_FROM CODART
|
||||
OUTPUT F_DESART_FROM DESCR
|
||||
FIELD #F_DESART_FROM
|
||||
END
|
||||
|
||||
STRING F_CODART_TO 20
|
||||
BEGIN
|
||||
PROMPT 2 10 "Ad Articolo "
|
||||
FLAG "U"
|
||||
USE 47
|
||||
INPUT CODART F_CODART_TO
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART_TO CODART
|
||||
OUTPUT F_DESART_TO DESCR
|
||||
FIELD #F_CODART_TO
|
||||
END
|
||||
|
||||
STRING F_DESART_TO 40
|
||||
BEGIN
|
||||
PR 38 10 ""
|
||||
USE 47 KEY 2
|
||||
INPUT DESCR F_DESART_TO
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPALY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART_TO CODART
|
||||
OUTPUT F_DESART_TO DESCR
|
||||
FIELD #F_DESART_TO
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 80 3
|
||||
BEGIN
|
||||
PROMPT 1 12 "@b Parametri Zona"
|
||||
END
|
||||
|
||||
STRING F_ZONA 2
|
||||
BEGIN
|
||||
PROMPT 2 13 "Codice Zona"
|
||||
USE ZON
|
||||
INPUT CODTAB F_ZONA
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_ZONA CODTAB
|
||||
OUTPUT F_DESZONA S0
|
||||
CHECKTYPE NORMAL
|
||||
FIELD #F_ZONA_FROM
|
||||
END
|
||||
|
||||
STRING F_DESZONA 50
|
||||
BEGIN
|
||||
PROMPT 20 13 ""
|
||||
USE ZON KEY 2
|
||||
INPUT CODTAB F_ZONA
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_ZONA CODTAB
|
||||
OUTPUT F_DESZONA S0
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user