Fix bug : negative amount on debit/credit (GridAccount)

Fix bug : bad computation of next year due to previous commit
This commit is contained in:
Grégory Soutadé 2010-12-03 19:03:48 +01:00
parent e85648ee84
commit 37b4dabbe1
2 changed files with 6 additions and 6 deletions

View File

@ -108,13 +108,11 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea
} }
else else
{ {
if (month == 11)
year++;
_yearTo->Select(year-2000); _yearTo->Select(year-2000);
OnYearToChange(event); OnYearToChange(event);
if (_ops[year].size())
{
month = _ops[year][0];
_yearTo->Select(year-1999);
}
if (month == -1) if (month == -1)
_monthTo->Select(0); _monthTo->Select(0);

View File

@ -722,6 +722,8 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
pEditor->DecRef(); pEditor->DecRef();
} }
if (new_op.amount < 0) new_op.amount *= -1;
value = GetCellValue(row, CATEGORY); value = GetCellValue(row, CATEGORY);
if (value.Length()) if (value.Length())
{ {