Aggiornamento versione al 4 febbraio 1998
git-svn-id: svn://10.65.10.50/trunk@6105 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
edb0d968ed
commit
e7871d48fa
BIN
at/at00.bmp
Executable file
BIN
at/at00.bmp
Executable file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
BIN
at/at01.bmp
Executable file
BIN
at/at01.bmp
Executable file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
BIN
at/at02.bmp
Executable file
BIN
at/at02.bmp
Executable file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
694
at/at6600.cpp
694
at/at6600.cpp
@ -1,694 +0,0 @@
|
||||
#include <applicat.h>
|
||||
//#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at6.h"
|
||||
|
||||
// nomi campi maschera
|
||||
#include "at6600a.h"
|
||||
|
||||
// nomi dei campi
|
||||
#include "soggetti.h"
|
||||
#include "donaz.h"
|
||||
#include "atstatd.h"
|
||||
#include "sezioni.h"
|
||||
|
||||
// classe per la definizione di una riga di statistica
|
||||
class TRiga : public TObject
|
||||
{
|
||||
int _anno, _mese;
|
||||
TArray _valori;
|
||||
|
||||
protected:
|
||||
const TRiga& copy(const TRiga& riga);
|
||||
public:
|
||||
const int anno() const { return _anno; }
|
||||
const int mese() const { return _mese; }
|
||||
TObject* dup() const { return new TRiga(*this); }
|
||||
const TRiga& operator = (const TRiga& riga);
|
||||
const real& operator [] (int colonna) const;
|
||||
void aggiorna_valore(int colonna, const real& numero) ;
|
||||
void azzera_valori();
|
||||
// costruttore
|
||||
TRiga(int anno, int mese) {_anno = anno; _mese = mese;}
|
||||
// costruttore di copia
|
||||
TRiga(const TRiga& riga) { copy(riga); }
|
||||
virtual ~TRiga() {};
|
||||
};
|
||||
|
||||
const TRiga& TRiga::copy(const TRiga& riga)
|
||||
{
|
||||
_anno = riga._anno;
|
||||
_mese = riga._mese;
|
||||
_valori = riga._valori;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
const TRiga& TRiga::operator = (const TRiga& riga)
|
||||
{
|
||||
copy(riga);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
const real& TRiga::operator [] (int colonna) const
|
||||
{
|
||||
real* valore = (real*)_valori.objptr(colonna);
|
||||
if (valore == NULL)
|
||||
return ZERO;
|
||||
else
|
||||
return *valore;
|
||||
}
|
||||
|
||||
void TRiga::aggiorna_valore(int colonna, const real& numero)
|
||||
{
|
||||
real* valore = (real*)_valori.objptr(colonna);
|
||||
if (valore == NULL)
|
||||
_valori.add(new real(numero), colonna);
|
||||
else
|
||||
*valore += numero;
|
||||
}
|
||||
|
||||
void TRiga::azzera_valori()
|
||||
{
|
||||
_valori.destroy();
|
||||
}
|
||||
|
||||
class TRiepilogoDonazioni : public TApplication
|
||||
{
|
||||
TMask* _msk;
|
||||
TRelation* _rel;
|
||||
TCursor* _cur;
|
||||
TLocalisamfile* _sezioni;
|
||||
TLocalisamfile* _soggetti;
|
||||
TLocalisamfile* _donaz;
|
||||
TLocalisamfile* _atstatd;
|
||||
TDate _dataini, _datafin;
|
||||
bool _primedon;
|
||||
TAssoc_array* _colonne;
|
||||
TArray _righe; // array per riepilogo donazioni
|
||||
TArray _righe_prime; // array per riepilogo prime don
|
||||
TString16 _sezini, _sotini, _sezfin, _sotfin;
|
||||
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual bool menu(MENU_TAG m);
|
||||
virtual TMask& get_mask() { return *_msk; }
|
||||
virtual TRelation* get_relation() const { return _rel; }
|
||||
int data2row(const int anno, const int mese);
|
||||
bool riepilogo();
|
||||
bool stampa();
|
||||
bool crea_colonne();
|
||||
bool crea_righe();
|
||||
void azzera_righe();
|
||||
void stampa_sezione(TString16 codsez, TString16 codsot);
|
||||
void crea_intestazione();
|
||||
TString16 int2month(const int month);
|
||||
public:
|
||||
TRiepilogoDonazioni() {}
|
||||
|
||||
};
|
||||
|
||||
HIDDEN inline TRiepilogoDonazioni& app() { return (TRiepilogoDonazioni&) main_app(); }
|
||||
|
||||
TString16 TRiepilogoDonazioni::int2month(const int month)
|
||||
{
|
||||
TString16 mese = "";
|
||||
switch (month)
|
||||
{
|
||||
case 1:
|
||||
mese << "GENNAIO ";
|
||||
break;
|
||||
case 2:
|
||||
mese << "FEBBRAIO ";
|
||||
break;
|
||||
case 3:
|
||||
mese << "MARZO ";
|
||||
break;
|
||||
case 4:
|
||||
mese << "APRILE ";
|
||||
break;
|
||||
case 5:
|
||||
mese << "MAGGIO ";
|
||||
break;
|
||||
case 6:
|
||||
mese << "GIUGNO ";
|
||||
break;
|
||||
case 7:
|
||||
mese << "LUGLIO ";
|
||||
break;
|
||||
case 8:
|
||||
mese << "AGOSTO ";
|
||||
break;
|
||||
case 9:
|
||||
mese << "SETTEMBRE";
|
||||
break;
|
||||
case 10:
|
||||
mese << "OTTOBRE ";
|
||||
break;
|
||||
case 11:
|
||||
mese << "NOVEMBRE ";
|
||||
break;
|
||||
case 12:
|
||||
mese << "DICEMBRE ";
|
||||
break;
|
||||
}
|
||||
return mese;
|
||||
}
|
||||
|
||||
int TRiepilogoDonazioni::data2row(const int anno, const int mese)
|
||||
{
|
||||
const int annoini = _dataini.year();
|
||||
return (anno-annoini)*12 + mese;
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::crea_colonne()
|
||||
{
|
||||
_colonne->destroy();
|
||||
TTable tdn("TDN");
|
||||
real contatore(ZERO);
|
||||
for (tdn.first(); !tdn.eof(); tdn.next())
|
||||
{
|
||||
real* oggetto = new real(contatore);
|
||||
_colonne->add((const char*)tdn.get("CODTAB"),(TObject*)oggetto);
|
||||
contatore+=1;
|
||||
}
|
||||
return !tdn.empty();
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::crea_righe()
|
||||
{
|
||||
int anno = _dataini.year();
|
||||
int meseini, mesefin;
|
||||
while (anno<=_datafin.year())
|
||||
{
|
||||
if (anno == _dataini.year())
|
||||
meseini = _dataini.month();
|
||||
else
|
||||
meseini = 1;
|
||||
if (anno == _datafin.year())
|
||||
mesefin = _datafin.month();
|
||||
else
|
||||
mesefin = 12;
|
||||
for (int mese=meseini;mese<=mesefin;mese++)
|
||||
{
|
||||
_righe.add(new TRiga(anno, mese), data2row(anno, mese));
|
||||
if (_primedon)
|
||||
_righe_prime.add(new TRiga(anno, mese), data2row(anno, mese));
|
||||
}
|
||||
anno++;
|
||||
}
|
||||
return _righe.items()>0;
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::create()
|
||||
{
|
||||
TApplication::create();
|
||||
_msk = new TMask("at6600a");
|
||||
_rel = new TRelation(LF_DONAZ);
|
||||
_rel->add(LF_SOGGETTI, "CODICE==CODICE");
|
||||
_soggetti = new TLocalisamfile(LF_SOGGETTI);
|
||||
_donaz = new TLocalisamfile(LF_DONAZ);
|
||||
_atstatd = new TLocalisamfile(LF_ATSTATD);
|
||||
_sezioni = new TLocalisamfile(LF_SEZIONI);
|
||||
_colonne = new TAssoc_array();
|
||||
dispatch_e_menu(BAR_ITEM(1));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::destroy()
|
||||
{
|
||||
delete _rel;
|
||||
delete _msk;
|
||||
delete _soggetti;
|
||||
delete _donaz;
|
||||
delete _atstatd;
|
||||
delete _sezioni;
|
||||
delete _colonne;
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::menu(MENU_TAG m)
|
||||
{
|
||||
TMask& msk = get_mask();
|
||||
KEY tasto;
|
||||
tasto = msk.run();
|
||||
if (tasto == K_ENTER)
|
||||
{
|
||||
_dataini = msk.get(F_DATAINI);
|
||||
_datafin = msk.get(F_DATAFIN);
|
||||
_primedon = msk.get_bool(F_PRIMEDON);
|
||||
_sezini = _msk->get(F_SEZINI);
|
||||
_sotini = _msk->get(F_SOTINI);
|
||||
_sezfin = _msk->get(F_SEZFIN);
|
||||
_sotfin = _msk->get(F_SOTFIN);
|
||||
if (riepilogo())
|
||||
stampa();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void TRiepilogoDonazioni::crea_intestazione()
|
||||
{
|
||||
TPrintrow row;
|
||||
TString256 sep;
|
||||
sep = "RIEPILOGO DONAZIONI";
|
||||
if (_dataini.ok())
|
||||
{
|
||||
sep << " dal ";
|
||||
sep << _dataini.string();
|
||||
}
|
||||
if (_datafin.ok())
|
||||
{
|
||||
sep << " al ";
|
||||
sep << _datafin.string();
|
||||
}
|
||||
sep.center_just(80);
|
||||
row.put(sep);
|
||||
row.put("@>", 1);
|
||||
row.put("Pag. @#", 70);
|
||||
printer().setheaderline(2, row);
|
||||
row.reset();
|
||||
printer().setheaderline(3, row);
|
||||
sep = "Mese ";
|
||||
TTable tdn("TDN");
|
||||
int pos = 27;
|
||||
for (tdn.first(); !tdn.eof(); tdn.next())
|
||||
{
|
||||
sep.overwrite((const char*)tdn.get("CODTAB"),pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
sep.overwrite("Totale",pos);
|
||||
row.put(sep);
|
||||
printer().setheaderline(5, row);
|
||||
sep = "";
|
||||
sep.fill('-');
|
||||
row.reset();
|
||||
row.put(sep);
|
||||
printer().setheaderline(6, row);
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::stampa()
|
||||
{
|
||||
if (printer().open())
|
||||
{
|
||||
crea_intestazione();
|
||||
TRelation* relstat = new TRelation(LF_ATSTATD);
|
||||
TCursor* curstat = new TCursor(relstat, "", 2);
|
||||
TString16 oldsez = "**";
|
||||
TString16 oldsot = "**";
|
||||
double numero, numprime;
|
||||
TString16 actsez, actsot;
|
||||
TString16 tipodon;
|
||||
int anno, mese;
|
||||
long last = curstat->items();
|
||||
for ( *curstat=0; curstat->pos() < last; ++(*curstat) )
|
||||
{
|
||||
actsez = curstat->curr().get(ATS_CODSEZ);
|
||||
actsot = curstat->curr().get(ATS_CODSOT);
|
||||
anno = curstat->curr().get_int(ATS_ANNO);
|
||||
mese = curstat->curr().get_int(ATS_MESE);
|
||||
tipodon = curstat->curr().get(ATS_TIPODON);
|
||||
numero = (double)curstat->curr().get_int(ATS_NUMERO);
|
||||
numprime = (double)curstat->curr().get_int(ATS_NUMPRIME);
|
||||
if (actsez != oldsez || actsot != oldsot)
|
||||
{
|
||||
if (oldsez != "**" && oldsot != "**")
|
||||
{
|
||||
stampa_sezione(oldsez,oldsot);
|
||||
azzera_righe();
|
||||
}
|
||||
oldsez = actsez;
|
||||
oldsot = actsot;
|
||||
}
|
||||
TRiga& riga = (TRiga&)_righe[data2row(anno,mese)];
|
||||
real& colonna = (real&)_colonne->find((const char*)tipodon);
|
||||
real n = numero;
|
||||
riga.aggiorna_valore(colonna.integer(),n);
|
||||
if (_primedon)
|
||||
{
|
||||
TRiga& riga_prime = (TRiga&)_righe_prime[data2row(anno,mese)];
|
||||
n = numprime;
|
||||
riga_prime.aggiorna_valore(colonna.integer(), n);
|
||||
}
|
||||
}
|
||||
if (oldsez != "**" && oldsot != "**")
|
||||
stampa_sezione(oldsez,oldsot);
|
||||
delete curstat;
|
||||
delete relstat;
|
||||
printer().close();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void TRiepilogoDonazioni::azzera_righe()
|
||||
{
|
||||
int anno = _dataini.year();
|
||||
int meseini, mesefin;
|
||||
while (anno<=_datafin.year())
|
||||
{
|
||||
if (anno == _dataini.year())
|
||||
meseini = _dataini.month();
|
||||
else
|
||||
meseini = 1;
|
||||
if (anno == _datafin.year())
|
||||
mesefin = _datafin.month();
|
||||
else
|
||||
mesefin = 12;
|
||||
for (int mese=meseini;mese<=mesefin;mese++)
|
||||
{
|
||||
TRiga& riga = (TRiga&)_righe[data2row(anno,mese)];
|
||||
riga.azzera_valori();
|
||||
if (_primedon)
|
||||
{
|
||||
TRiga& riga_prime = (TRiga&)_righe_prime[data2row(anno,mese)];
|
||||
riga_prime.azzera_valori();
|
||||
}
|
||||
}
|
||||
anno++;
|
||||
}
|
||||
}
|
||||
|
||||
void TRiepilogoDonazioni::stampa_sezione(TString16 codsez, TString16 codsot)
|
||||
{
|
||||
TPrintrow row;
|
||||
TString256 rigastampa;
|
||||
rigastampa = "Sezione: ";
|
||||
rigastampa << codsez;
|
||||
if (codsot.not_empty())
|
||||
{
|
||||
rigastampa << "/";
|
||||
rigastampa << codsot;
|
||||
}
|
||||
rigastampa << " ";
|
||||
TLocalisamfile sezioni(LF_SEZIONI);
|
||||
sezioni.setkey(1);
|
||||
sezioni.zero();
|
||||
sezioni.put(SEZ_CODSEZ,codsez);
|
||||
sezioni.put(SEZ_CODSOT,codsot);
|
||||
if (sezioni.read() == NOERR)
|
||||
{
|
||||
TString80 den = sezioni.get(SEZ_DENSEZ);
|
||||
rigastampa << den;
|
||||
den = sezioni.get(SEZ_DENSOT);
|
||||
if (den.not_empty())
|
||||
{
|
||||
rigastampa << "/";
|
||||
rigastampa << den;
|
||||
}
|
||||
}
|
||||
rigastampa.center_just(80);
|
||||
row.put(rigastampa);
|
||||
printer().setheaderline(1, row);
|
||||
|
||||
TRiga rigatotali(0,0);
|
||||
int anno = _dataini.year();
|
||||
int meseini, mesefin;
|
||||
real totalemese = ZERO;
|
||||
TString16 valore;
|
||||
while (anno<=_datafin.year())
|
||||
{
|
||||
if (anno == _dataini.year())
|
||||
meseini = _dataini.month();
|
||||
else
|
||||
meseini = 1;
|
||||
if (anno == _datafin.year())
|
||||
mesefin = _datafin.month();
|
||||
else
|
||||
mesefin = 12;
|
||||
for (int mese=meseini;mese<=mesefin;mese++)
|
||||
{
|
||||
TRiga& riga = (TRiga&)_righe[data2row(anno,mese)];
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa.format("%s %4d", (const char*)int2month(mese), anno);
|
||||
totalemese = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
rigatotali.aggiorna_valore(i,riga[i]);
|
||||
totalemese+=riga[i];
|
||||
valore = "";
|
||||
valore.format("%8d",riga[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totalemese.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
anno++;
|
||||
}
|
||||
// stampa totali per sezione
|
||||
rigastampa = "";
|
||||
rigastampa.fill('-');
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa = "Totale periodo";
|
||||
totalemese = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
totalemese+=rigatotali[i];
|
||||
valore = "";
|
||||
valore.format("%8d",rigatotali[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totalemese.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
|
||||
if (_primedon)
|
||||
{
|
||||
rigatotali.azzera_valori();
|
||||
row.reset();
|
||||
printer().print(row);
|
||||
printer().print(row);
|
||||
printer().print(row);
|
||||
printer().print(row);
|
||||
//printer().skip(4);
|
||||
rigastampa = "RIEPILOGO PRIME DONAZIONI";
|
||||
rigastampa.center_just();
|
||||
row.put(rigastampa);
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
rigastampa = "";
|
||||
rigastampa.fill('-');
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
row.reset();
|
||||
printer().print(row);
|
||||
anno = _dataini.year();
|
||||
while (anno<=_datafin.year())
|
||||
{
|
||||
if (anno == _dataini.year())
|
||||
meseini = _dataini.month();
|
||||
else
|
||||
meseini = 1;
|
||||
if (anno == _datafin.year())
|
||||
mesefin = _datafin.month();
|
||||
else
|
||||
mesefin = 12;
|
||||
for (int mese=meseini;mese<=mesefin;mese++)
|
||||
{
|
||||
TRiga& riga = (TRiga&)_righe_prime[data2row(anno,mese)];
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa.format("%s %4d", (const char*)int2month(mese), anno);
|
||||
totalemese = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
rigatotali.aggiorna_valore(i,riga[i]);
|
||||
totalemese+=riga[i];
|
||||
valore = "";
|
||||
valore.format("%8d",riga[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totalemese.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
anno++;
|
||||
}
|
||||
// stampa totali per sezione
|
||||
rigastampa = "";
|
||||
rigastampa.fill('-');
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa = "Totale periodo";
|
||||
totalemese = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
totalemese+=rigatotali[i];
|
||||
valore = "";
|
||||
valore.format("%8d",rigatotali[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totalemese.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
printer().formfeed();
|
||||
}
|
||||
|
||||
bool TRiepilogoDonazioni::riepilogo()
|
||||
{
|
||||
if (crea_colonne() && crea_righe())
|
||||
{
|
||||
// cancello i risultati della elaborazione precedente
|
||||
TLocalisamfile stat(LF_ATSTATD);
|
||||
for (stat.first(); !stat.eof(); stat.next())
|
||||
stat.remove();
|
||||
stat.setkey(2);
|
||||
// filtro per data
|
||||
TRectype da(LF_DONAZ);
|
||||
TRectype a (LF_DONAZ);
|
||||
if (_dataini.ok())
|
||||
da.put(DON_DATADON, _dataini);
|
||||
if (_datafin.ok())
|
||||
a.put(DON_DATADON, _datafin);
|
||||
_cur = new TCursor(_rel, "", 2, &da, &a);
|
||||
TString256 filtro = "";
|
||||
|
||||
// filtro per sezione/sottogruppo
|
||||
if (_sezini.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
|
||||
}
|
||||
if (_sotini.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSOT >= \"%s\")",(const char*)_sotini);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSOT >= \"%s\")",(const char*)_sotini);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_sezfin.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
|
||||
}
|
||||
if (_sotfin.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSOT <= \"%s\")",(const char*)_sotfin);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSOT <= \"%s\")",(const char*)_sotfin);
|
||||
}
|
||||
}
|
||||
}
|
||||
_cur->setfilter((const char*) filtro, TRUE);
|
||||
TString16 codsez, codsot, tipodon;
|
||||
TDate datadon;
|
||||
int anno, mese;
|
||||
long numero;
|
||||
bool primadon;
|
||||
TRectype& recdon = _cur->curr();
|
||||
TRectype& recsog = _cur->curr(LF_SOGGETTI);
|
||||
long last = _cur->items();
|
||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||
for ( *_cur=0; _cur->pos() < last; ++(*_cur) )
|
||||
{
|
||||
prg.addstatus(1);
|
||||
codsez = recdon.get(DON_CODSEZ);
|
||||
codsot = recdon.get(DON_CODSOT);
|
||||
if (codsez.empty())
|
||||
{
|
||||
codsez = recsog.get(SOG_CODSEZ);
|
||||
codsot = recsog.get(SOG_CODSOT);
|
||||
}
|
||||
datadon = recdon.get_date(DON_DATADON);
|
||||
tipodon = recdon.get(DON_TIPODON);
|
||||
primadon = recdon.get_bool(DON_PRIMADON);
|
||||
anno = datadon.year();
|
||||
mese = datadon.month();
|
||||
stat.zero();
|
||||
stat.put(ATS_CODSEZ, codsez);
|
||||
stat.put(ATS_CODSOT, codsot);
|
||||
stat.put(ATS_ANNO, anno);
|
||||
stat.put(ATS_MESE, mese);
|
||||
stat.put(ATS_TIPODON, tipodon);
|
||||
if (stat.read() == NOERR)
|
||||
{
|
||||
numero = stat.get_long(ATS_NUMERO);
|
||||
numero++;
|
||||
stat.put(ATS_NUMERO, numero);
|
||||
if (_primedon && primadon)
|
||||
{
|
||||
numero = stat.get_long(ATS_NUMPRIME);
|
||||
numero++;
|
||||
stat.put(ATS_NUMPRIME, numero);
|
||||
}
|
||||
stat.rewrite();
|
||||
}
|
||||
else
|
||||
{
|
||||
stat.zero();
|
||||
stat.put(ATS_CODSEZ, codsez);
|
||||
stat.put(ATS_CODSOT, codsot);
|
||||
stat.put(ATS_ANNO, anno);
|
||||
stat.put(ATS_MESE, mese);
|
||||
stat.put(ATS_TIPODON, tipodon);
|
||||
numero = 1;
|
||||
stat.put(ATS_NUMERO, numero);
|
||||
if (_primedon && primadon)
|
||||
stat.put(ATS_NUMPRIME, numero);
|
||||
stat.write();
|
||||
}
|
||||
}
|
||||
return (stat.eod() > 0);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int at6600(int argc, char* argv[])
|
||||
{
|
||||
TRiepilogoDonazioni a;
|
||||
a.run(argc, argv, "Riepilogo mensile donazioni");
|
||||
return 0;
|
||||
}
|
15
at/at6600a.h
15
at/at6600a.h
@ -1,15 +0,0 @@
|
||||
// riepilogo mensile donazioni
|
||||
// definizione campi per maschera di selezione
|
||||
|
||||
#define F_SEZINI 101
|
||||
#define F_D_SEZINI 102
|
||||
#define F_SOTINI 103
|
||||
#define F_D_SOTINI 104
|
||||
#define F_SEZFIN 105
|
||||
#define F_D_SEZFIN 106
|
||||
#define F_SOTFIN 107
|
||||
#define F_D_SOTFIN 108
|
||||
|
||||
#define F_DATAINI 301
|
||||
#define F_DATAFIN 302
|
||||
#define F_PRIMEDON 303
|
153
at/at6600a.uml
153
at/at6600a.uml
@ -1,153 +0,0 @@
|
||||
#include "at6600a.h"
|
||||
|
||||
PAGE "Riepilogo mensile donazioni" -1 -1 78 12
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Scelta sezioni/sottogruppi"
|
||||
END
|
||||
|
||||
STRING F_SEZINI 2
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZINI
|
||||
INPUT CODSOT F_SOTINI
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZINI CODSEZ
|
||||
OUTPUT F_D_SEZINI DENSEZ
|
||||
OUTPUT F_SOTINI CODSOT
|
||||
OUTPUT F_D_SOTINI DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SEZINI 25
|
||||
BEGIN
|
||||
PROMPT 11 2 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SOTINI 2
|
||||
BEGIN
|
||||
PROMPT 2 3 " "
|
||||
COPY ALL F_SEZINI
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SOTINI 25
|
||||
BEGIN
|
||||
PROMPT 11 3 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZINI
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
INPUT DENSOT F_D_SOTINI
|
||||
COPY DISPLAY F_D_SEZINI
|
||||
COPY OUTPUT F_D_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SEZFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 2 "A "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZFIN
|
||||
INPUT CODSOT F_SOTFIN
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZFIN CODSEZ
|
||||
OUTPUT F_D_SEZFIN DENSEZ
|
||||
OUTPUT F_SOTFIN CODSOT
|
||||
OUTPUT F_D_SOTFIN DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione finale"
|
||||
END
|
||||
|
||||
STRING F_D_SEZFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 2 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione finale"
|
||||
END
|
||||
|
||||
STRING F_SOTFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 3 " "
|
||||
COPY ALL F_SEZFIN
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo finale"
|
||||
END
|
||||
|
||||
STRING F_D_SOTFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 3 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZFIN
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
INPUT DENSOT F_D_SOTFIN
|
||||
COPY DISPLAY F_D_SEZFIN
|
||||
COPY OUTPUT F_D_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo finale"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 1 5 "Opzioni per il riepilogo"
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 6 "Donazioni effettuate dal "
|
||||
HELP "Data iniziale"
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 40 6 "al "
|
||||
HELP "Data finale"
|
||||
END
|
||||
|
||||
BOOLEAN F_PRIMEDON
|
||||
BEGIN
|
||||
PROMPT 2 7 "Riepilogo per prime donazioni"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
580
at/at6700.cpp
580
at/at6700.cpp
@ -1,580 +0,0 @@
|
||||
#include <applicat.h>
|
||||
//#include <execp.h>
|
||||
#include <mask.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "at6.h"
|
||||
|
||||
// nomi campi maschera
|
||||
#include "at6700a.h"
|
||||
|
||||
// nomi dei campi
|
||||
#include "soggetti.h"
|
||||
#include "donaz.h"
|
||||
#include "atstatd.h"
|
||||
#include "sezioni.h"
|
||||
|
||||
// classe per la definizione di una riga di statistica
|
||||
class TRigaG : public TObject
|
||||
{
|
||||
TDate _data;
|
||||
TArray _valori;
|
||||
|
||||
protected:
|
||||
const TRigaG& copy(const TRigaG& riga);
|
||||
public:
|
||||
const TDate data() const { return _data; }
|
||||
TObject* dup() const { return new TRigaG(*this); }
|
||||
const TRigaG& operator = (const TRigaG& riga);
|
||||
const real& operator [] (int colonna) const;
|
||||
void aggiorna_valore(int colonna, const real& numero) ;
|
||||
void azzera_valori();
|
||||
// costruttore
|
||||
TRigaG(TDate data) {_data = data;}
|
||||
// costruttore di copia
|
||||
TRigaG(const TRigaG& riga) { copy(riga); }
|
||||
virtual ~TRigaG() {};
|
||||
};
|
||||
|
||||
const TRigaG& TRigaG::copy(const TRigaG& riga)
|
||||
{
|
||||
_data = riga._data;
|
||||
_valori = riga._valori;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
const TRigaG& TRigaG::operator = (const TRigaG& riga)
|
||||
{
|
||||
copy(riga);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
const real& TRigaG::operator [] (int colonna) const
|
||||
{
|
||||
real* valore = (real*)_valori.objptr(colonna);
|
||||
if (valore == NULL)
|
||||
return ZERO;
|
||||
else
|
||||
return *valore;
|
||||
}
|
||||
|
||||
void TRigaG::aggiorna_valore(int colonna, const real& numero)
|
||||
{
|
||||
real* valore = (real*)_valori.objptr(colonna);
|
||||
if (valore == NULL)
|
||||
_valori.add(new real(numero), colonna);
|
||||
else
|
||||
*valore += numero;
|
||||
}
|
||||
|
||||
void TRigaG::azzera_valori()
|
||||
{
|
||||
_valori.destroy();
|
||||
}
|
||||
|
||||
class TRiepilogoGiornaliero : public TApplication
|
||||
{
|
||||
TMask* _msk;
|
||||
TRelation* _rel;
|
||||
TCursor* _cur;
|
||||
TLocalisamfile* _sezioni;
|
||||
TLocalisamfile* _soggetti;
|
||||
TLocalisamfile* _donaz;
|
||||
TLocalisamfile* _atstatd;
|
||||
bool _primedon;
|
||||
TDate _dataini, _datafin;
|
||||
TAssoc_array* _colonne;
|
||||
TArray _righe; // array per riepilogo donazioni
|
||||
TArray _righe_prime; // array per riepilogo prime don
|
||||
TString16 _sezini, _sotini, _sezfin, _sotfin;
|
||||
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual bool menu(MENU_TAG m);
|
||||
virtual TMask& get_mask() { return *_msk; }
|
||||
virtual TRelation* get_relation() const { return _rel; }
|
||||
int data2row(const TDate data) { return data-_dataini; }
|
||||
bool riepilogo();
|
||||
bool stampa();
|
||||
bool crea_colonne();
|
||||
bool crea_righe();
|
||||
void azzera_righe();
|
||||
void stampa_sezione(TString16 codsez, TString16 codsot);
|
||||
void crea_intestazione();
|
||||
public:
|
||||
TRiepilogoGiornaliero() {}
|
||||
|
||||
};
|
||||
|
||||
HIDDEN inline TRiepilogoGiornaliero& app() { return (TRiepilogoGiornaliero&) main_app(); }
|
||||
|
||||
bool TRiepilogoGiornaliero::crea_colonne()
|
||||
{
|
||||
_colonne->destroy();
|
||||
TTable tdn("TDN");
|
||||
real contatore(ZERO);
|
||||
for (tdn.first(); !tdn.eof(); tdn.next())
|
||||
{
|
||||
real* oggetto = new real(contatore);
|
||||
_colonne->add((const char*)tdn.get("CODTAB"),(TObject*)oggetto);
|
||||
contatore+=1;
|
||||
}
|
||||
return !tdn.empty();
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::crea_righe()
|
||||
{
|
||||
TDate data = _dataini;
|
||||
while (data<=_datafin)
|
||||
{
|
||||
_righe.add(new TRigaG(data), data2row(data));
|
||||
if (_primedon)
|
||||
_righe_prime.add(new TRigaG(data), data2row(data));
|
||||
++data;
|
||||
}
|
||||
return _righe.items()>0;
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::create()
|
||||
{
|
||||
TApplication::create();
|
||||
_msk = new TMask("at6700a");
|
||||
_rel = new TRelation(LF_DONAZ);
|
||||
_rel->add(LF_SOGGETTI, "CODICE==CODICE");
|
||||
_soggetti = new TLocalisamfile(LF_SOGGETTI);
|
||||
_donaz = new TLocalisamfile(LF_DONAZ);
|
||||
_atstatd = new TLocalisamfile(LF_ATSTATD);
|
||||
_sezioni = new TLocalisamfile(LF_SEZIONI);
|
||||
_colonne = new TAssoc_array();
|
||||
dispatch_e_menu(BAR_ITEM(1));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::destroy()
|
||||
{
|
||||
delete _rel;
|
||||
delete _msk;
|
||||
delete _soggetti;
|
||||
delete _donaz;
|
||||
delete _atstatd;
|
||||
delete _sezioni;
|
||||
delete _colonne;
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::menu(MENU_TAG m)
|
||||
{
|
||||
TMask& msk = get_mask();
|
||||
KEY tasto;
|
||||
tasto = msk.run();
|
||||
if (tasto == K_ENTER)
|
||||
{
|
||||
_dataini = msk.get(F_DATAINI);
|
||||
_datafin = msk.get(F_DATAFIN);
|
||||
_primedon = msk.get_bool(F_PRIMEDON);
|
||||
_sezini = _msk->get(F_SEZINI);
|
||||
_sotini = _msk->get(F_SOTINI);
|
||||
_sezfin = _msk->get(F_SEZFIN);
|
||||
_sotfin = _msk->get(F_SOTFIN);
|
||||
if (riepilogo())
|
||||
stampa();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void TRiepilogoGiornaliero::crea_intestazione()
|
||||
{
|
||||
TPrintrow row;
|
||||
TString256 sep;
|
||||
sep = "GIORNALIERO DONAZIONI";
|
||||
if (_dataini.ok())
|
||||
{
|
||||
sep << " dal ";
|
||||
sep << _dataini.string();
|
||||
}
|
||||
if (_datafin.ok())
|
||||
{
|
||||
sep << " al ";
|
||||
sep << _datafin.string();
|
||||
}
|
||||
sep.center_just(80);
|
||||
row.put(sep);
|
||||
row.put("@>", 1);
|
||||
row.put("Pag. @#", 70);
|
||||
printer().setheaderline(2, row);
|
||||
row.reset();
|
||||
printer().setheaderline(3, row);
|
||||
sep = "Data ";
|
||||
TTable tdn("TDN");
|
||||
int pos = 27;
|
||||
for (tdn.first(); !tdn.eof(); tdn.next())
|
||||
{
|
||||
sep.overwrite((const char*)tdn.get("CODTAB"),pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
sep.overwrite("Totale",pos);
|
||||
row.put(sep);
|
||||
printer().setheaderline(5, row);
|
||||
sep = "";
|
||||
sep.fill('-');
|
||||
row.reset();
|
||||
row.put(sep);
|
||||
printer().setheaderline(6, row);
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::stampa()
|
||||
{
|
||||
if (printer().open())
|
||||
{
|
||||
crea_intestazione();
|
||||
TRelation* relstat = new TRelation(LF_ATSTATD);
|
||||
TCursor* curstat = new TCursor(relstat, "", 1);
|
||||
TString16 oldsez = "**";
|
||||
TString16 oldsot = "**";
|
||||
double numero, numprime;
|
||||
TString16 actsez, actsot;
|
||||
TString16 tipodon;
|
||||
TDate data;
|
||||
long last = curstat->items();
|
||||
for ( *curstat=0; curstat->pos() < last; ++(*curstat) )
|
||||
{
|
||||
actsez = curstat->curr().get(ATS_CODSEZ);
|
||||
actsot = curstat->curr().get(ATS_CODSOT);
|
||||
data = curstat->curr().get_date(ATS_DATA);
|
||||
tipodon = curstat->curr().get(ATS_TIPODON);
|
||||
numero = (double)curstat->curr().get_int(ATS_NUMERO);
|
||||
numprime = (double)curstat->curr().get_int(ATS_NUMPRIME);
|
||||
if (actsez != oldsez || actsot != oldsot)
|
||||
{
|
||||
if (oldsez != "**" && oldsot != "**")
|
||||
{
|
||||
stampa_sezione(oldsez,oldsot);
|
||||
azzera_righe();
|
||||
}
|
||||
oldsez = actsez;
|
||||
oldsot = actsot;
|
||||
}
|
||||
TRigaG& riga = (TRigaG&)_righe[data2row(data)];
|
||||
real& colonna = (real&)_colonne->find((const char*)tipodon);
|
||||
real n = numero;
|
||||
riga.aggiorna_valore(colonna.integer(),n);
|
||||
if (_primedon)
|
||||
{
|
||||
TRigaG& riga_prime = (TRigaG&)_righe_prime[data2row(data)];
|
||||
n = numprime;
|
||||
riga_prime.aggiorna_valore(colonna.integer(), n);
|
||||
}
|
||||
}
|
||||
if (oldsez != "**" && oldsot != "**")
|
||||
stampa_sezione(oldsez,oldsot);
|
||||
delete curstat;
|
||||
delete relstat;
|
||||
printer().close();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void TRiepilogoGiornaliero::azzera_righe()
|
||||
{
|
||||
TDate data = _dataini;
|
||||
while (data<=_datafin)
|
||||
{
|
||||
TRigaG& riga = (TRigaG&)_righe[data2row(data)];
|
||||
riga.azzera_valori();
|
||||
if (_primedon)
|
||||
{
|
||||
TRigaG& riga_prime = (TRigaG&)_righe_prime[data2row(data)];
|
||||
riga_prime.azzera_valori();
|
||||
}
|
||||
++data;
|
||||
}
|
||||
}
|
||||
|
||||
void TRiepilogoGiornaliero::stampa_sezione(TString16 codsez, TString16 codsot)
|
||||
{
|
||||
TPrintrow row;
|
||||
TString256 rigastampa;
|
||||
rigastampa = "Sezione: ";
|
||||
rigastampa << codsez;
|
||||
if (codsot.not_empty())
|
||||
{
|
||||
rigastampa << "/";
|
||||
rigastampa << codsot;
|
||||
}
|
||||
rigastampa << " ";
|
||||
TLocalisamfile sezioni(LF_SEZIONI);
|
||||
sezioni.setkey(1);
|
||||
sezioni.zero();
|
||||
sezioni.put(SEZ_CODSEZ,codsez);
|
||||
sezioni.put(SEZ_CODSOT,codsot);
|
||||
if (sezioni.read() == NOERR)
|
||||
{
|
||||
TString80 den = sezioni.get(SEZ_DENSEZ);
|
||||
rigastampa << den;
|
||||
den = sezioni.get(SEZ_DENSOT);
|
||||
if (den.not_empty())
|
||||
{
|
||||
rigastampa << "/";
|
||||
rigastampa << den;
|
||||
}
|
||||
}
|
||||
rigastampa.center_just(80);
|
||||
row.put(rigastampa);
|
||||
printer().setheaderline(1, row);
|
||||
|
||||
TRigaG rigatotali(NULLDATE);
|
||||
TDate data = _dataini;
|
||||
real totaledata = ZERO;
|
||||
TString16 valore;
|
||||
while (data<=_datafin)
|
||||
{
|
||||
TRigaG& riga = (TRigaG&)_righe[data2row(data)];
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa.format("%s", (const char*)data.string());
|
||||
totaledata = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
rigatotali.aggiorna_valore(i,riga[i]);
|
||||
totaledata+=riga[i];
|
||||
valore = "";
|
||||
valore.format("%8d",riga[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totaledata.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
++data;
|
||||
}
|
||||
// stampa totali per sezione
|
||||
rigastampa = "";
|
||||
rigastampa.fill('-');
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa = "Totale periodo";
|
||||
totaledata = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
totaledata+=rigatotali[i];
|
||||
valore = "";
|
||||
valore.format("%8d",rigatotali[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totaledata.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
|
||||
if (_primedon)
|
||||
{
|
||||
printer().formfeed();
|
||||
rigatotali.azzera_valori();
|
||||
data = _dataini;
|
||||
while (data<=_datafin)
|
||||
{
|
||||
TRigaG& riga = (TRigaG&)_righe_prime[data2row(data)];
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa.format("%s", (const char*)data.string());
|
||||
totaledata = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
rigatotali.aggiorna_valore(i,riga[i]);
|
||||
totaledata+=riga[i];
|
||||
valore = "";
|
||||
valore.format("%8d",riga[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totaledata.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
++data;
|
||||
}
|
||||
// stampa totali per sezione
|
||||
rigastampa = "";
|
||||
rigastampa.fill('-');
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
row.reset();
|
||||
rigastampa = "";
|
||||
rigastampa = "Totale periodo";
|
||||
totaledata = ZERO;
|
||||
int pos = 21;
|
||||
for (int i=0;i<_colonne->items();i++)
|
||||
{
|
||||
totaledata+=rigatotali[i];
|
||||
valore = "";
|
||||
valore.format("%8d",rigatotali[i].integer());
|
||||
rigastampa.overwrite((const char*)valore, pos);
|
||||
pos = pos+10;
|
||||
}
|
||||
valore = "";
|
||||
valore.format("%8d",totaledata.integer());
|
||||
rigastampa.overwrite((const char*)valore, pos+4);
|
||||
row.put((const char*) rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
row.reset();
|
||||
printer().setheaderline(3, row);
|
||||
printer().formfeed();
|
||||
}
|
||||
|
||||
bool TRiepilogoGiornaliero::riepilogo()
|
||||
{
|
||||
if (crea_colonne() && crea_righe())
|
||||
{
|
||||
// cancello i risultati della elaborazione precedente
|
||||
TLocalisamfile stat(LF_ATSTATD);
|
||||
for (stat.first(); !stat.eof(); stat.next())
|
||||
stat.remove();
|
||||
// filtro per data
|
||||
TRectype da(LF_DONAZ);
|
||||
TRectype a (LF_DONAZ);
|
||||
if (_dataini.ok())
|
||||
da.put(DON_DATADON, _dataini);
|
||||
if (_datafin.ok())
|
||||
a.put(DON_DATADON, _datafin);
|
||||
_cur = new TCursor(_rel, "", 2, &da, &a);
|
||||
TString256 filtro = "";
|
||||
|
||||
// filtro per sezione/sottogruppo
|
||||
if (_sezini.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
|
||||
}
|
||||
if (_sotini.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSOT >= \"%s\")",(const char*)_sotini);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSOT >= \"%s\")",(const char*)_sotini);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_sezfin.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
|
||||
}
|
||||
if (_sotfin.not_empty())
|
||||
{
|
||||
if (filtro.empty())
|
||||
filtro = format("(90->CODSOT <= \"%s\")",(const char*)_sotfin);
|
||||
else
|
||||
{
|
||||
filtro << " && ";
|
||||
filtro << format("(90->CODSOT <= \"%s\")",(const char*)_sotfin);
|
||||
}
|
||||
}
|
||||
}
|
||||
_cur->setfilter((const char*) filtro, TRUE);
|
||||
TString16 codsez, codsot, tipodon;
|
||||
int anno, mese, giorno;
|
||||
TDate data;
|
||||
long numero;
|
||||
bool primadon;
|
||||
TRectype& recdon = _cur->curr();
|
||||
TRectype& recsog = _cur->curr(LF_SOGGETTI);
|
||||
long last = _cur->items();
|
||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||
for ( *_cur=0; _cur->pos() < last; ++(*_cur) )
|
||||
{
|
||||
prg.addstatus(1);
|
||||
codsez = recdon.get(DON_CODSEZ);
|
||||
codsot = recdon.get(DON_CODSOT);
|
||||
if (codsez.empty())
|
||||
{
|
||||
codsez = recsog.get(SOG_CODSEZ);
|
||||
codsot = recsog.get(SOG_CODSOT);
|
||||
}
|
||||
data = recdon.get_date(DON_DATADON);
|
||||
anno = data.year();
|
||||
mese = data.month();
|
||||
giorno = data.day();
|
||||
tipodon = recdon.get(DON_TIPODON);
|
||||
primadon = recdon.get_bool(DON_PRIMADON);
|
||||
stat.zero();
|
||||
stat.put(ATS_CODSEZ, codsez);
|
||||
stat.put(ATS_CODSOT, codsot);
|
||||
//stat.put(ATS_DATA, data);
|
||||
stat.put(ATS_ANNO, anno);
|
||||
stat.put(ATS_MESE, mese);
|
||||
stat.put(ATS_GIORNO, giorno);
|
||||
stat.put(ATS_TIPODON, tipodon);
|
||||
if (stat.read() == NOERR)
|
||||
{
|
||||
numero = stat.get_long(ATS_NUMERO);
|
||||
numero++;
|
||||
stat.put(ATS_NUMERO, numero);
|
||||
if (_primedon && primadon)
|
||||
{
|
||||
numero = stat.get_long(ATS_NUMPRIME);
|
||||
numero++;
|
||||
stat.put(ATS_NUMPRIME, numero);
|
||||
}
|
||||
int err = stat.rewrite();
|
||||
}
|
||||
else
|
||||
{
|
||||
stat.zero();
|
||||
stat.put(ATS_CODSEZ, codsez);
|
||||
stat.put(ATS_CODSOT, codsot);
|
||||
stat.put(ATS_ANNO, anno);
|
||||
stat.put(ATS_MESE, mese);
|
||||
stat.put(ATS_GIORNO, giorno);
|
||||
stat.put(ATS_DATA, data);
|
||||
stat.put(ATS_TIPODON, tipodon);
|
||||
numero = 1;
|
||||
stat.put(ATS_NUMERO, numero);
|
||||
if (_primedon && primadon)
|
||||
stat.put(ATS_NUMPRIME, numero);
|
||||
int err = stat.write();
|
||||
}
|
||||
}
|
||||
return (stat.eod() > 0);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int at6700(int argc, char* argv[])
|
||||
{
|
||||
TRiepilogoGiornaliero a;
|
||||
a.run(argc, argv, "Riepilogo giornaliero donazioni");
|
||||
return 0;
|
||||
}
|
15
at/at6700a.h
15
at/at6700a.h
@ -1,15 +0,0 @@
|
||||
// riepilogo gironaliero donazioni
|
||||
// definizione campi per maschera di selezione
|
||||
|
||||
#define F_SEZINI 101
|
||||
#define F_D_SEZINI 102
|
||||
#define F_SOTINI 103
|
||||
#define F_D_SOTINI 104
|
||||
#define F_SEZFIN 105
|
||||
#define F_D_SEZFIN 106
|
||||
#define F_SOTFIN 107
|
||||
#define F_D_SOTFIN 108
|
||||
|
||||
#define F_DATAINI 301
|
||||
#define F_DATAFIN 302
|
||||
#define F_PRIMEDON 303
|
153
at/at6700a.uml
153
at/at6700a.uml
@ -1,153 +0,0 @@
|
||||
#include "at6700a.h"
|
||||
|
||||
PAGE "Riepilogo giornaliero donazioni" -1 -1 78 12
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Scelta sezioni/sottogruppi"
|
||||
END
|
||||
|
||||
STRING F_SEZINI 2
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZINI
|
||||
INPUT CODSOT F_SOTINI
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZINI CODSEZ
|
||||
OUTPUT F_D_SEZINI DENSEZ
|
||||
OUTPUT F_SOTINI CODSOT
|
||||
OUTPUT F_D_SOTINI DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SEZINI 25
|
||||
BEGIN
|
||||
PROMPT 11 2 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SOTINI 2
|
||||
BEGIN
|
||||
PROMPT 2 3 " "
|
||||
COPY ALL F_SEZINI
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_D_SOTINI 25
|
||||
BEGIN
|
||||
PROMPT 11 3 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZINI
|
||||
INPUT DENSEZ F_D_SEZINI
|
||||
INPUT DENSOT F_D_SOTINI
|
||||
COPY DISPLAY F_D_SEZINI
|
||||
COPY OUTPUT F_D_SEZINI
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo da cui partire"
|
||||
END
|
||||
|
||||
STRING F_SEZFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 2 "A "
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI
|
||||
INPUT CODSEZ F_SEZFIN
|
||||
INPUT CODSOT F_SOTFIN
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
OUTPUT F_SEZFIN CODSEZ
|
||||
OUTPUT F_D_SEZFIN DENSEZ
|
||||
OUTPUT F_SOTFIN CODSOT
|
||||
OUTPUT F_D_SOTFIN DENSOT
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sezione finale"
|
||||
END
|
||||
|
||||
STRING F_D_SEZFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 2 ""
|
||||
FLAGS "U"
|
||||
USE LF_SEZIONI KEY 2
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
DISPLAY "Sezione@25" DENSEZ
|
||||
DISPLAY "Sottogruppo@25" DENSOT
|
||||
DISPLAY "Cod.sez" CODSEZ
|
||||
DISPLAY "Cod.sot." CODSOT
|
||||
COPY OUTPUT F_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sezione finale"
|
||||
END
|
||||
|
||||
STRING F_SOTFIN 2
|
||||
BEGIN
|
||||
PROMPT 41 3 " "
|
||||
COPY ALL F_SEZFIN
|
||||
CHECKTYPE SEARCH
|
||||
HELP "Codice sottogruppo finale"
|
||||
END
|
||||
|
||||
STRING F_D_SOTFIN 25
|
||||
BEGIN
|
||||
PROMPT 49 3 ""
|
||||
FLAGS "U"
|
||||
COPY USE F_D_SEZFIN
|
||||
INPUT DENSEZ F_D_SEZFIN
|
||||
INPUT DENSOT F_D_SOTFIN
|
||||
COPY DISPLAY F_D_SEZFIN
|
||||
COPY OUTPUT F_D_SEZFIN
|
||||
CHECKTYPE NORMAL
|
||||
HELP "Sottogruppo finale"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 4
|
||||
BEGIN
|
||||
PROMPT 1 5 "Opzioni per il riepilogo"
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 6 "Donazioni effettuate dal "
|
||||
HELP "Data iniziale"
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 40 6 "al "
|
||||
HELP "Data finale"
|
||||
END
|
||||
|
||||
BOOLEAN F_PRIMEDON
|
||||
BEGIN
|
||||
PROMPT 2 7 "Riepilogo per prime donazioni"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
11
at/atstats.h
Executable file
11
at/atstats.h
Executable file
@ -0,0 +1,11 @@
|
||||
// definizione campi dell'archivio ATSTATS
|
||||
|
||||
#define ATSS_CODSEZ "CODSEZ"
|
||||
#define ATSS_CODSOT "CODSOT"
|
||||
#define ATSS_GRUPPO "GRUPPO"
|
||||
#define ATSS_RH "RH"
|
||||
#define ATSS_FASCIA "FASCIA"
|
||||
#define ATSS_SESSO "SESSO"
|
||||
#define ATSS_CATDON "CATDON"
|
||||
#define ATSS_NUMERO "NUMERO"
|
||||
#define ATSS_NUMERO2 "NUMERO2"
|
142
at/avis.men
Executable file
142
at/avis.men
Executable file
@ -0,0 +1,142 @@
|
||||
[AVIS_000]
|
||||
Caption = "Menu principale"
|
||||
Picture = <at00.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Archivi", [AVIS_001]
|
||||
Item_02 = "Tabelle", [AVIS_002]
|
||||
Item_03 = "Operazioni periodiche", [AVIS_003]
|
||||
Item_04 = "Stampe soggetti", [AVIS_004]
|
||||
Item_05 = "Stampe per convocazioni", [AVIS_005]
|
||||
Item_06 = "Stampe di controllo", [AVIS_006]
|
||||
Item_07 = "Benemerenze", [AVIS_007]
|
||||
Item_07 = "Statistiche", [AVIS_008]
|
||||
Item_09 = "Manutenzione", [AVIS_099]
|
||||
|
||||
[AVIS_001]
|
||||
Caption = "Archivi"
|
||||
Picture = <at01.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Soggetti", "at0 -0", ""
|
||||
Item_02 = "Giornaliero donazioni/controlli", "at0 -1", ""
|
||||
Item_03 = "Giornaliero controlli", "at0 -2", ""
|
||||
Item_04 = "Convocazioni su punto di prelievo", "at0 -3", ""
|
||||
Item_05 = "Spostamento convocazioni", "at0 -4", ""
|
||||
Item_06 = "Parametri di sezione", "at5 -0", ""
|
||||
|
||||
[AVIS_002]
|
||||
Caption = "Tabelle"
|
||||
Picture = <ba23.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Sezioni", "ba3 -3 batbsez 96", ""
|
||||
Item_02 = "Medici", "ba3 -3 batbmed 97", ""
|
||||
Item_03 = "Benemerenze", "ba3 -0 bnz", ""
|
||||
Item_04 = "Categorie donatori", "ba3 -0 ctd", ""
|
||||
Item_05 = "Categorie non donatori", "ba3 -0 ctn", ""
|
||||
Item_06 = "Gruppi aziendali", "ba3 -0 gaz", ""
|
||||
Item_07 = "Idoneita' alla donazione", "ba3 -0 ido", ""
|
||||
Item_08 = "Localita' postali", "ba3 -0 lcp", ""
|
||||
Item_09 = "Punti di prelievo", "ba3 -0 ldn", ""
|
||||
Item_10 = "Luoghi di lavoro", "ba3 -0 ldl", ""
|
||||
Item_11 = "Motivi per controlli sanitari", "ba3 -0 mtc", ""
|
||||
Item_12 = "Professioni", "ba3 -0 prf", ""
|
||||
Item_13 = "Tipi di donazione", "ba3 -0 tdn", ""
|
||||
Item_14 = "Tipi/Esiti controlli sanitari", "ba3 -0 tcs", ""
|
||||
|
||||
[AVIS_003]
|
||||
Caption = "Operazioni periodiche"
|
||||
Picture = <at01.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Chiusura", "at0 -5", ""
|
||||
Item_03 = "Sblocco sospesi", "at0 -6", ""
|
||||
Item_04 = "Sblocco esclusi", "at0 -7", ""
|
||||
Item_05 = "Modifica intervalli di don.", "at0 -8", ""
|
||||
|
||||
[AVIS_004]
|
||||
Caption = "Stampe soggetti"
|
||||
Picture = <at02.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Sospesi", "at2 -0", ""
|
||||
Item_02 = "Per data di nascita", "at2 -1", ""
|
||||
Item_03 = "Esclusi", "at2 -2", ""
|
||||
Item_04 = "Modificati", "at2 -3", ""
|
||||
Item_05 = "Idonei", "at2 -4", ""
|
||||
Item_06 = "Iscritti/dimessi", "at2 -5", ""
|
||||
Item_07 = "Per categorie", "at2 -6", ""
|
||||
Item_08 = "Soggetti che non donano dal", "at2 -7", ""
|
||||
Item_09 = "Soggetti per frequenza donazione", "at2 -8", ""
|
||||
Item_10 = "Tessere associative singole", "at4 -5", ""
|
||||
Item_12 = "Tessere associative complessive", "at4 -4", ""
|
||||
Item_13 = "Stampe singole", "at4 -6", ""
|
||||
Item_14 = "Stampe per codice", "at4 -7", ""
|
||||
|
||||
[AVIS_005]
|
||||
Caption = "Stampe per convocazioni"
|
||||
Picture = <at02.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Scadenze di donazione", "at4 -0", ""
|
||||
Item_02 = "Urgenze", "at4 -1", ""
|
||||
Item_03 = "Convocazioni per sezione", "at4 -2", ""
|
||||
Item_04 = "Convocazioni su punto di prelievo", "at4 -3", ""
|
||||
Item_04 = "Stampe singole", "at4 -6", ""
|
||||
|
||||
[AVIS_006]
|
||||
Caption = "Stampe di controllo"
|
||||
Picture = <ba25.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Donazioni", "at6 -2", ""
|
||||
Item_02 = "Controlli sanitari", "at6 -4", ""
|
||||
Item_03 = "Soggetti incompleti", "at6 -3", ""
|
||||
Item_04 = "Tabelle", [AVIS_016]
|
||||
|
||||
[AVIS_016]
|
||||
Caption = "Stampa di controllo tabelle"
|
||||
Picture = <ba25.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Sezioni", "at6 -1", ""
|
||||
Item_02 = "Medici", "at6 -0", ""
|
||||
Item_03 = "Categorie non donatori", "ba3 -1 ctn", ""
|
||||
Item_04 = "Gruppi aziendali", "ba3 -1 gaz", ""
|
||||
Item_05 = "Localita' postali", "ba3 -1 lcp", ""
|
||||
Item_06 = "Luoghi di lavoro", "ba3 -1 ldl", ""
|
||||
|
||||
[AVIS_007]
|
||||
Caption = "Benemerenze"
|
||||
Picture = <at02.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Proposta benemerenza singola", "at1 -0", ""
|
||||
Item_02 = "Attribuzione complessiva", "at1 -1", ""
|
||||
Item_03 = "Elenco ben. attribuite", "at1 -2", ""
|
||||
Item_04 = "Elenco ben. per gruppo az.", "at1 -3", ""
|
||||
Item_05 = "Stampa di controllo", "at1 -4", ""
|
||||
|
||||
[AVIS_008]
|
||||
Caption = "Statistiche"
|
||||
Picture = <at02.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Mensile donazioni per tipo", "at3 -3"
|
||||
Item_02 = "Mensile donazioni per gruppo e rh", "at3 -1"
|
||||
Item_03 = "Giornaliero donazioni per tipo", "at3 -4"
|
||||
Item_04 = "Donazioni/donatori", "at3 -5"
|
||||
Item_05 = "Soggetti per sesso, gruppo e rh", "at3 -6"
|
||||
Item_06 = "Soggetti per sesso e eta'", "at3 -0"
|
||||
Item_07 = "Soggetti per categoria", "at3 -2"
|
||||
|
||||
[AVIS_099]
|
||||
Caption = "Manutenzione"
|
||||
Picture = <ba04.bmp>
|
||||
Module = 0
|
||||
Flags = ""
|
||||
Item_01 = "Archivi", "ba1", ""
|
||||
Item_02 = "Utenti", "ba1 -3", ""
|
||||
Item_03 = "Attivazione", "ba1 -4", ""
|
||||
Item_04 = "Backup", "ba2 -1", ""
|
Loading…
x
Reference in New Issue
Block a user