Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.2 patch 1262 git-svn-id: svn://10.65.10.50/trunk@17628 c028cbd2-c16b-5b4b-a496-9718f37d4682
107 lines
2.8 KiB
C++
Executable File
107 lines
2.8 KiB
C++
Executable File
#ifndef __VDLIB_H
|
|
#define __VDLIB_H
|
|
|
|
#ifndef __ISAM_H
|
|
#include <isam.h>
|
|
#endif
|
|
|
|
#ifndef __REPORT_H
|
|
#include <report.h>
|
|
#endif
|
|
|
|
class TTurno_vendita : public TObject
|
|
{
|
|
TRectype _rec;
|
|
int _err;
|
|
int _anno;
|
|
TString16 _codnum;
|
|
int _cassa;
|
|
long _orafine;
|
|
TDate _datafine;
|
|
TReport _rep;
|
|
TString _superuser;
|
|
|
|
protected:
|
|
// @ cmember leggi il turno
|
|
void leggi(long progr = 0L);
|
|
|
|
public:
|
|
// @ cmember codice di errore
|
|
int error() const {return _err;}
|
|
// @ cmember data ultimo turno;
|
|
const TDate & ultima_data() const {return _datafine;}
|
|
// @ cmember ora inizio turno;
|
|
const long ora_inizio() const;
|
|
// @ cmember ora fine ultimo turno;
|
|
const long ora_fine() const {return _orafine;}
|
|
// @ cmember turno aperto
|
|
bool aperto() const;
|
|
// @ cmember turno riaperto
|
|
bool riaperto() const {return aperto() && ora_fine() > 0L;}
|
|
// @ cmember turno chiuso
|
|
bool chiuso() const {return !aperto();}
|
|
// @ cmember numero cassa
|
|
int ncassa() const {return _cassa;}
|
|
// @ cmember operatore
|
|
const TString & user() const;
|
|
// @ cmember superutente
|
|
const TString & superuser() const { return _superuser;}
|
|
// @ cmember aggiorna superutente
|
|
void set_superuser(const TString & superuser = EMPTY_STRING) { _superuser = superuser; }
|
|
// @ cmember numero turno
|
|
int nturno() const;
|
|
// @ cmember report
|
|
TReport & report() {return _rep;}
|
|
// @ cmember apri il turno
|
|
bool apri(const bool select_prev = false);
|
|
// @ cmember riapri il turno
|
|
bool riapri();
|
|
// @ cmember chiudi il turno
|
|
bool chiudi();
|
|
// @ cmember ritona il valore attuale della cassa
|
|
const real cassa_attuale();
|
|
// @ cmember aggiorna cassa finale e riscrive il turno;
|
|
bool aggiorna(const long ndoc, const real & saldo);
|
|
// @ cmember Costruttore
|
|
TTurno_vendita();
|
|
// @ cmember Distruttore
|
|
virtual ~TTurno_vendita() {}
|
|
};
|
|
|
|
class TOperatore : public TObject
|
|
{
|
|
TRectype _rec;
|
|
|
|
protected:
|
|
|
|
public:
|
|
bool ok() const { return !_rec.empty(); }
|
|
// @ cmember massimo scontrino
|
|
real max_scontrino() const {return _rec.get_real("R0");}
|
|
// @ cmember massimo abbuono
|
|
real max_abbuono() const {return _rec.get_real("R1");}
|
|
// @ cmember puo cambiare prezzi
|
|
bool can_change_price() const {return _rec.get_bool("B0");} //
|
|
// @ cmember sottocosto
|
|
bool can_sotto_costo() const {return _rec.get_bool("B1");}
|
|
// @ cmember modifica omaggi
|
|
bool can_change_omaggi() const {return _rec.get_bool("B2");}
|
|
// @ cmember modifica sconti
|
|
bool can_change_sconti() const {return _rec.get_bool("B3");} //
|
|
// @ cmember resi
|
|
bool can_resi() const {return _rec.get_bool("B4");}
|
|
// @ cmember fatturazione
|
|
bool can_invoice() const {return _rec.get_bool("B5");} //
|
|
// @ cmember massimo sconto
|
|
real max_sconto() const {return _rec.get_real("R2");}
|
|
// @ cmember Provvigione
|
|
real provvigione() const {return _rec.get_real("R3");}
|
|
|
|
// @ cmember Costruttore
|
|
TOperatore(const char * user);
|
|
// @ cmember Distruttore
|
|
virtual ~TOperatore() {}
|
|
};
|
|
|
|
#endif
|