52a0e9cd8f
git-svn-id: svn://10.65.10.50/trunk@5063 c028cbd2-c16b-5b4b-a496-9718f37d4682
54 lines
1.2 KiB
C++
Executable File
54 lines
1.2 KiB
C++
Executable File
#ifndef __SVLIB01_H
|
|
#define __SVLIB01_H
|
|
|
|
#ifndef __ASSOC_H
|
|
#include "assoc.h"
|
|
#endif
|
|
|
|
#ifndef __VELIB_H
|
|
#include "..\ve\velib.h"
|
|
#endif
|
|
|
|
|
|
class TStats_agg : public TObject
|
|
{
|
|
enum TFrequenza_statistiche { fs_giornaliera, fs_settimanale, fs_quindicinale,
|
|
fs_mensile, fs_bimestrale, fs_trimestrale };
|
|
|
|
class TStats_data : public TObject
|
|
{
|
|
public:
|
|
real _quantita, _valore;
|
|
};
|
|
|
|
long _ditta;
|
|
TAssoc_array _data;
|
|
|
|
TFrequenza_statistiche _frequenza;
|
|
bool _merce, _prestazioni, _omaggi, _omaggio_is_merce;
|
|
bool _art_nocode, _art_noanag, _art_noanag_grp;
|
|
bool _agente, _cliente, _articolo, _giacenza, _magazzino;
|
|
|
|
protected:
|
|
void test_firm() const;
|
|
void put_key(TRectype& stat, TToken_string& key) const;
|
|
TStats_agg::TStats_data& find(const TRiga_documento& rdoc);
|
|
bool can_add(const TRiga_documento& rdoc) const;
|
|
|
|
|
|
public:
|
|
void init();
|
|
void reset();
|
|
bool sub(const TRiga_documento& rdoc);
|
|
bool add(const TRiga_documento& rdoc);
|
|
bool update();
|
|
|
|
// Converte una data nella classe temporale definita dalla frequenza delle statisitiche
|
|
int date2period(const TDate& datadoc) const;
|
|
|
|
TStats_agg();
|
|
virtual ~TStats_agg() { }
|
|
};
|
|
|
|
#endif
|