Fix a bug : Don't add operation if amount not set

This commit is contained in:
Grégory Soutadé 2015-06-04 20:18:35 +02:00
parent f0e0aba4f3
commit 20be059f27
1 changed files with 16 additions and 11 deletions

View File

@ -1008,7 +1008,8 @@ void GridAccount::OnOperationModified(int row, int col)
op_complete--;
new_op.formula = _displayedOperations[row].formula;
}
else
{
value = item(row, CREDIT)->text();
if (value.length())
{
@ -1021,6 +1022,10 @@ void GridAccount::OnOperationModified(int row, int col)
op_complete--;
new_op.formula = _displayedOperations[row].formula;
}
else
// Don't add operation if amount not set
op_complete += 100;
}
value = item(row, CATEGORY)->text();
if (value.length())