Fix bug : negative amount on debit/credit (GridAccount)
Fix bug : bad computation of next year due to previous commit
This commit is contained in:
		| @@ -108,13 +108,11 @@ GenerateDialog::GenerateDialog(KissCount* kiss, wxUI *parent, int month, int yea | |||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         _yearTo->Select(year-2000); |         if (month == 11) | ||||||
|  | 	    year++; | ||||||
|  |  | ||||||
|  | 	_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); | ||||||
|   | |||||||
| @@ -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()) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user