wip
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -14,7 +14,8 @@ struct operation {
|
||||
wxString description;
|
||||
wxString category;
|
||||
bool fix_cost;
|
||||
wxString account;
|
||||
wxString account;
|
||||
bool checked;
|
||||
} ;
|
||||
|
||||
struct Account {
|
||||
|
||||
Reference in New Issue
Block a user