2749cef346
state modificate le impostazioni e chiede di rigenerare le maschere git-svn-id: svn://10.65.10.50/trunk@1832 c028cbd2-c16b-5b4b-a496-9718f37d4682
32 lines
637 B
C++
Executable File
32 lines
637 B
C++
Executable File
#ifndef __SCONTI_H
|
|
#define __SCONTI_H
|
|
|
|
#ifndef __REAL_H
|
|
#include <real.h>
|
|
#endif
|
|
|
|
#define CHKVALID CHECK( _valid, "Tentativo di usare uno sconto non valido!" )
|
|
|
|
class TSconto : public TObject
|
|
{
|
|
private:
|
|
|
|
TString _exp;
|
|
bool _valid;
|
|
int _errorpos;
|
|
real _part;
|
|
static const real cento;
|
|
|
|
public:
|
|
|
|
TString& get( void ){ CHKVALID; return _exp; }
|
|
void set( const TString& exp, bool signal = FALSE );
|
|
bool is_valid( ){ return _valid; }
|
|
real sconto( );
|
|
char * scontostr( int len = 0, int dec = UNDEFINED, char pad = ' ' ){ CHKVALID; real p(sconto()); return p.stringa( len, dec, pad ); }
|
|
|
|
};
|
|
|
|
#undef CHKVALID
|
|
#endif
|