Work on PreferencesPanel and fix a bug in Database (bad request for AddOperation)
This commit is contained in:
@@ -591,12 +591,12 @@ int Database::AddOperation(User* user, Operation& op, bool checkTransfert)
|
||||
|
||||
ESCAPE_CHARS(op.description);
|
||||
|
||||
req = "INSERT INTO operation ('user', 'parent', 'account', 'year', 'month', 'day', 'amount', 'description', 'category', 'fix_cost', 'formula', 'transfert', 'meta', 'virtual') VALUES ('%1', '%2', '%3', '%4', '%5', '%6', '%7', '%8'" ;
|
||||
req = "INSERT INTO operation ('user', 'parent', 'account', 'year', 'month', 'day', 'amount', 'description', 'category', 'fix_cost', 'formula', 'transfert', 'meta', 'virtual', 'checked') VALUES ('%1', '%2', '%3', '%4', '%5', '%6', '%7', '%8'" ;
|
||||
req = req.arg(QString::number(user->_id), (op.parent) ? QString::number(op.parent): "", QString::number(op.account), QString::number(op.year),
|
||||
QString::number(op.month), QString::number(op.day), DoubleToString(op.amount), op.description);
|
||||
req += ", '%1', '%2', '%3', '%4', '%5', '%6')";
|
||||
req += ", '%1', '%2', '%3', '%4', '%5', '%6', '%7')";
|
||||
req = req.arg(QString::number(op.category), QString::number(op.fix_cost), op.formula, (op.transfert) ? QString::number(op.transfert): "",
|
||||
QString::number(op.meta), QString::number(op._virtual));
|
||||
QString::number(op.meta), QString::number(op._virtual), QString::number(op.checked));
|
||||
|
||||
if (!query.exec(req))
|
||||
{
|
||||
|
Reference in New Issue
Block a user