Fix some bugs and resize images
This commit is contained in:
@@ -448,7 +448,25 @@ void Database::SetAccountAmount(int month, int year, wxString accountId, double
|
||||
req += _(" AND year='") + wxString::Format(_("%d"), year) + _("'");
|
||||
req += _(" AND month='") + wxString::Format(_("%d"), month) + _("'");
|
||||
|
||||
EXECUTE_SQL_UPDATE(req, );
|
||||
try
|
||||
{
|
||||
if (!_db.ExecuteUpdate(req))
|
||||
{
|
||||
req = _("INSERT INTO account_amount ('account', 'year', 'month', 'amount') VALUES ('") ;
|
||||
req += accountId + _("'");
|
||||
req += _(" ,'") + wxString::Format(_("%d"), year) + _("'");
|
||||
req += _(" ,'") + wxString::Format(_("%d"), month) + _("'");
|
||||
req += _(" ,'") + DoubleToString(amount) + _("'");
|
||||
req += _(")");
|
||||
EXECUTE_SQL_UPDATE(req, );
|
||||
}
|
||||
}
|
||||
catch (wxSQLite3Exception e)
|
||||
{
|
||||
std::cerr << req.mb_str() << "\n" ;
|
||||
std::cerr << e.GetMessage().mb_str() << "\n" ;
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
wxString Database::AddAccount(User* user, struct Account ac)
|
||||
|
||||
Reference in New Issue
Block a user