From 47b6984395e4cebfe65c5b0f8e811b2bf8441758 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 25 Aug 1995 07:40:33 +0000 Subject: [PATCH] Gli importi accettano anche sezioni nulle su importi nulli git-svn-id: svn://10.65.10.50/trunk@1738 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/real.cpp | 4 +++- include/scadenze.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/real.cpp b/include/real.cpp index 8ce1036ee..f54b13910 100755 --- a/include/real.cpp +++ b/include/real.cpp @@ -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; diff --git a/include/scadenze.h b/include/scadenze.h index e28da0b41..276199e86 100755 --- a/include/scadenze.h +++ b/include/scadenze.h @@ -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"