Fix a bug in search (absolute amounts) and remove automatic dating for new fix operation

This commit is contained in:
2010-07-26 21:03:22 +02:00
parent cc70c0f804
commit 7e41063b42
3 changed files with 13 additions and 7 deletions

View File

@@ -160,7 +160,8 @@ void GridAccount::InsertOperation(User* user, Operation* op, int line, bool fix,
else
{
SetCellEditor(line, DATE, new CalendarEditor(0, curMonth, curYear));
if (curDate.GetMonth() == curMonth &&
if (!fix &&
curDate.GetMonth() == curMonth &&
curDate.GetYear() == curYear)
{
SetCellValue(line, DATE, wxString::Format(wxT("%02d/%02d/%d"), curDate.GetDay(), curMonth+1, curYear));
@@ -171,8 +172,9 @@ void GridAccount::InsertOperation(User* user, Operation* op, int line, bool fix,
if (fix)
SET_ROW_COLOR(line, OWN_YELLOW)
else
SET_ROW_COLOR(line, OWN_GREEN);
else
SET_ROW_COLOR(line, OWN_GREEN);
SetReadOnly(line, CHECKED, true);
SetReadOnly(line, DELETE, true);
}