Use prepared query for value replacement allowing to use non escaped characters
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2010-2012 Grégory Soutadé
|
||||
Copyright 2010-2016 Grégory Soutadé
|
||||
|
||||
This file is part of KissCount.
|
||||
|
||||
@@ -913,7 +913,7 @@ void GridAccount::OnOperationModified(int row, int col)
|
||||
{
|
||||
User* user = _kiss->GetUser();
|
||||
Operation new_op, cur_op, op_tmp, op_tmp2;
|
||||
int op_complete = 6;
|
||||
int op_complete = 6, new_op_id;
|
||||
QString value, v ;
|
||||
QDate date;
|
||||
bool need_insertion = false, transfertCompleted = false;
|
||||
@@ -1111,12 +1111,20 @@ void GridAccount::OnOperationModified(int row, int col)
|
||||
new_op._virtual = false;
|
||||
new_op.parent = 0;
|
||||
|
||||
new_op_id = _kiss->AddOperation(new_op);
|
||||
|
||||
if (!new_op_id)
|
||||
{
|
||||
_inModification = false ;
|
||||
return;
|
||||
}
|
||||
|
||||
RemoveRow(new_op, row, false);
|
||||
NULLop.id = 0;
|
||||
InsertOperation(user, NULLop, row, new_op.fix_cost, _curMonth, _curYear);
|
||||
|
||||
new_op.id = _kiss->AddOperation(new_op);
|
||||
|
||||
new_op.id = new_op_id;
|
||||
|
||||
if (transfertCompleted)
|
||||
_transfertCompletionIndex = (_transfertCompletionIndex + 1) % 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user