campo-sirio/ve/sconti.h
alex 10b13bec8e Correzzioni al 24/07/96
git-svn-id: svn://10.65.10.50/trunk@3244 c028cbd2-c16b-5b4b-a496-9718f37d4682
1996-07-25 13:05:29 +00:00

64 lines
1.5 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
{
TString _sconto;
real _prezzo;
bool _valid;
int _errorpos;
real _part;
TCliFor* _clifo;
// TRelation _condv;
// Invece che la relazione uso i due files, poichè mi interessa sempre
// solo una delle righe
TLocalisamfile _condv;
TLocalisamfile _rcondv;
TLocalisamfile _anamag;
TLocalisamfile _sconti;
TConfig _ditta;
TMask* _testa;
TMask* _riga;
bool cerca( int tiporicerca );
public:
TString& get_sconto( void ) { return _sconto; }
void set_sconto( const char * exp, bool signal = FALSE );
real get_prezzo() { return _prezzo; }
void set_prezzo(const real & prezzo) { _prezzo = prezzo; }
bool is_valid( ){ return _valid; }
real sconto_val( );
const char * sconto_str( int len = 0, int dec = UNDEFINED, char pad = ' ' ){ real p(sconto_val()); return p.stringa( len, dec, pad ); }
TCliFor& clifo( ){ return *_clifo; }
void set_testa( TMask& testa ){ _testa = &testa; }
TMask& testa( ){ return *_testa; }
void set_riga( TMask& riga ){ _riga = &riga; }
TMask& riga( ){ return *_riga; }
void calcola( );
bool gestum() { return _condv.get_bool("GESTUM"); }
TCond_vendita( TCliFor& clifo, TMask * testa = NULL, TMask * riga = NULL );
~TCond_vendita() {}
};
#endif