Patch level : 2.0 512

Files correlati     : cg2.exe
Ricompilazione Demo : [ ]
Commento            :

CM
Pagamento con saldaconto, la procedura perde il colore del campo attivo
appena mi sposto dal campo dare/avere dove mi riporta l'importo della
testata


git-svn-id: svn://10.65.10.50/trunk@11291 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-06-26 14:51:30 +00:00
parent 7eb0233e22
commit dac36e61ea
2 changed files with 15 additions and 22 deletions

View File

@ -27,14 +27,14 @@ TDate::TDate(long l) : _val(l)
{ {
if (_val == TODAY) if (_val == TODAY)
{ {
_val = NULLDATE;
time_t lt; time_t lt;
if (time(&lt) == -1) if (time(&lt) != -1)
return; {
struct tm * timeloc = localtime(&lt); struct tm * timeloc = localtime(&lt);
if (timeloc != NULL) if (timeloc != NULL)
_val = makedata(timeloc->tm_mday, timeloc->tm_mon+1, timeloc->tm_year + 1900); _val = makedata(timeloc->tm_mday, timeloc->tm_mon+1, timeloc->tm_year + 1900);
else }
_val = NULLDATE;
} }
else else
{ {
@ -102,7 +102,7 @@ TDate::TDate(const char* s)
} }
#ifdef DBG #ifdef DBG
if (d < 1 || d > 31 || m < 1 || m > 12 && y < 0) if (d < 1 || d > 31 || m < 1 || m > 12 || y < 0)
yesnofatal_box("Lamentati con Guy se la data %s non viene accettata!", s); yesnofatal_box("Lamentati con Guy se la data %s non viene accettata!", s);
#endif #endif
_val = makedata(d, m, y); _val = makedata(d, m, y);
@ -190,16 +190,8 @@ TDate& TDate::operator =(const char* s)
TDate& TDate::operator =(long val) TDate& TDate::operator =(long val)
{ {
if (val < 0L) if (val < 0L)
{ *this = TDate(val);
long lt; else
val = 0L;
if (time(&lt) != -1)
{
struct tm *timeloc = localtime(&lt);
if (timeloc != NULL)
val = makedata(timeloc->tm_mday, timeloc->tm_mon+1, timeloc->tm_year + 1900);
}
}
_val = val; _val = val;
return *this; return *this;
} }

View File

@ -53,7 +53,8 @@ public:
}; };
TRow_property::TRow_property() TRow_property::TRow_property()
: _back(NORMAL_BACK_COLOR), _fore(NORMAL_COLOR), _cell_prop(NULL) // : _back(NORMAL_BACK_COLOR), _fore(NORMAL_COLOR), _cell_prop(NULL)
: _back(0), _fore(0), _cell_prop(NULL)
{ {
} }
@ -92,7 +93,7 @@ void TRow_property::get(int col, COLOR & back, COLOR & fore) const
{ {
if (col > 0) if (col > 0)
{ {
if (!_cell_prop) if (_cell_prop == NULL)
{ {
back = _back; back = _back;
fore = _fore; fore = _fore;
@ -1986,7 +1987,7 @@ void TSpreadsheet::set_back_and_fore_color(COLOR back, COLOR fore, int row, int
void TSpreadsheet::get_back_and_fore_color(COLOR& back, COLOR& fore, int row, int col) void TSpreadsheet::get_back_and_fore_color(COLOR& back, COLOR& fore, int row, int col)
{ {
TRow_property* prop = get_property(row, FALSE); TRow_property* prop = get_property(row, FALSE);
if (prop) if (prop != NULL)
prop->get(col, back, fore); prop->get(col, back, fore);
} }