campo-sirio/ve/sconti.h
alex ac6e4946de Versione beta
git-svn-id: svn://10.65.10.50/trunk@3680 c028cbd2-c16b-5b4b-a496-9718f37d4682
1996-09-26 15:37:19 +00:00

75 lines
2.4 KiB
C++
Executable File

#ifndef __SCONTI_H
#define __SCONTI_H
#ifndef __REAL_H
#include <real.h>
#endif
#ifndef __TCLIFOR_H
#include "tclifor.h"
#endif
#ifndef __MASK_H
#include <mask.h>
#endif
#ifndef __CONFIG_H
#include <config.h>
#endif
class TCond_vendita : public TObject
{
TString80 _sconto;
TString16 _codiva;
bool _ivarid;
real _prezzo;
real _provv;
real _molt_sconto;
TCliFor * _clifo;
TLocalisamfile _condv;
TLocalisamfile _rcondv;
TLocalisamfile * _anamag;
TLocalisamfile _sconti;
TLocalisamfile * _umart;
TConfig * _config_ditta;
TMask * _testa;
TMask * _riga;
bool _load_mask;
bool cerca(int tiporicerca);
protected:
void set_prezzo(const real & prezzo,const char * val_rif = "");
void set_provv(const real & provv);
void set_iva(const TString & codiva);
TCliFor & clifo() const { CHECK(_clifo, "Cliente/fornitore non inizializzato"); return * _clifo; }
TConfig & config_ditta() const { CHECK(_config_ditta, "Configurazione ditta non inizializzata"); return * _config_ditta; }
TMask & testa() const { CHECK(_testa, "Maschera testata non inizializzata"); return * _testa; }
TMask & riga() const { CHECK(_testa, "Maschera testata non inizializzata"); return * _riga; }
TLocalisamfile & anamag() const { CHECK(_anamag, "Anagrafica di magazzino non inizializzata") ; return *_anamag; }
TLocalisamfile & umart() const { CHECK(_umart, "Anagrafica di unita' di misura magazzino non inizializzata") ; return *_umart; }
public:
bool set_sconto( const char * exp, bool signal = FALSE );
const TString& get_sconto() const { return _sconto; }
real sconto_val() const { return _molt_sconto;}
real get_prezzo() const { return _prezzo; }
real get_provv() const { return _provv; }
const TString & get_iva() const { return _codiva; }
void set_config( TConfig * ditta){ _config_ditta = ditta; }
void set_testa( TMask * testa ){ _testa = testa; }
void set_riga( TMask * riga ){ _riga = riga; }
void set_anamag(TLocalisamfile & anamag) { _anamag = &anamag; }
void set_umart(TLocalisamfile & umart) { _umart = &umart; }
void ricerca(bool load_um_only = FALSE, bool load_scagl_only = FALSE);
bool gestum() const { return _condv.get_bool("GESTUM"); }
TCond_vendita(TCliFor * clifo = NULL, TConfig * _ditta = NULL, TMask * testa = NULL, TMask * riga = NULL,
TLocalisamfile * anamag = NULL, TLocalisamfile * umart = NULL);
~TCond_vendita() {}
};
#endif