Patch level :

Files correlati     : agalib
Ricompilazione Demo : [ ]
Commento            :
Corretta gestione chiavi sospese


git-svn-id: svn://10.65.10.50/branches/R_10_00@22425 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-09-23 08:27:52 +00:00
parent 4f095b2624
commit 4972385cec

View File

@ -1375,23 +1375,18 @@ int Tdninst::check_customer() const
if (em.ok() && em.year_assist() > 2100 && em.find_serno(serno)) if (em.ok() && em.year_assist() > 2100 && em.find_serno(serno))
{ {
error = 0; error = 0;
const TDate oggi(TODAY);
TToken_string l(80, '='); TToken_string l(80, '=');
TString16 str;
TDate ds;
while (em.line(l) && error == 0) while (em.line(l) && error == 0)
{ {
if (l.empty() || l[0] == '[') if (l.empty() || l[0] == '[')
break; break;
if (parse_date(l, str, ds)) if (l[0]=='*' || l.starts_with("MustCall"))
{ {
if (ds >= oggi) const TDate oggi(TODAY);
{ TString16 str;
if (str == "*") TDate ds;
error = 2; else if (parse_date(l, str, ds) && oggi >= ds)
if (str == "MustCall") error = (l[0] == '*') ? 2 : 1;
error = 1;
}
} }
} }
} }