This commit is contained in:
2010-06-16 19:15:49 +02:00
parent 721a0afc29
commit 936d7a95eb
5 changed files with 51 additions and 24 deletions

View File

@@ -251,6 +251,7 @@ void Database::LoadYear(User* user, int year)
op.description = set.GetAsString(_("description"));
op.category = set.GetAsString(_("category"));
op.fix_cost = set.GetBool(_("fix_cost"));
op.checked = set.GetBool(_("checked"));
(*user->_operations[op.year])[op.month].push_back(op);
}
@@ -291,6 +292,10 @@ void Database::UpdateOperation(struct operation op)
req += _(", amount='") + wxString::Format(_("%.2lf"), op.amount) + _("'");
req += _(", description=\"") + op.description + _("\"");
req += _(", category='") + op.category + _("'");
if (op.checked)
req += _(", checked='1'");
else
req += _(", checked='0'");
req += _(" WHERE id='") + op.id + _("'");
//std::cout << req.mb_str() << "\n";

View File

@@ -14,7 +14,8 @@ struct operation {
wxString description;
wxString category;
bool fix_cost;
wxString account;
wxString account;
bool checked;
} ;
struct Account {