Gli importi accettano anche sezioni nulle su importi nulli

git-svn-id: svn://10.65.10.50/trunk@1738 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-08-25 07:40:33 +00:00
parent 5e8580ea89
commit 47b6984395
2 changed files with 3 additions and 4 deletions

View File

@ -1004,7 +1004,7 @@ const TImporto& TImporto::add_to(TToken_string& s, int pos) const
const TImporto& TImporto::operator =(TToken_string& sv)
{
_valore = real(sv.get(0));
if (_valore == ZERO)
if (_valore.is_zero())
{
_valore = real(sv.get());
_sezione = 'A';
@ -1017,6 +1017,8 @@ const TImporto& TImporto::operator =(TToken_string& sv)
const TImporto& TImporto::set(char s, const real& v)
{
if (s <= ' ' && v.is_zero()) // Accetta sezioni nulle per importi nulli
s = 'D';
CHECKD(s == 'D' || s == 'A', "Sezione errata per importo: codice ", (int)s);
_sezione = s; _valore = v;
return *this;

View File

@ -13,10 +13,7 @@
#define SCAD_TIPOPAG "TIPOPAG"
#define SCAD_ULTCLASS "ULTCLASS"
#define SCAD_IMPORTO "IMPORTO"
#define SCAD_CODVAL "CODVAL"
#define SCAD_CAMBIO "CAMBIO"
#define SCAD_IMPORTOVAL "IMPORTOVAL"
#define SCAD_DATACAMBIO "DATACAM"
#define SCAD_DATASCAD "DATASCAD"
#define SCAD_NSOLL "NSOLL"
#define SCAD_DATASOLL "DATASOLL"