KissCount

KissCount Commit Details

Date:2015-06-04 20:18:35 (5 years 1 month ago)
Author:Grégory Soutadé
Branch:dev, master, qt5
Commit:20be059f27a3d84aa95082ad8f1633e3b01c8ab0
Parents: f0e0aba4f3321cd4458a5b87a3da6a0562280718
Message:Fix a bug : Don't add operation if amount not set

Changes:
Msrc/view/grid/GridAccount.cpp (1 diff)

File differences

src/view/grid/GridAccount.cpp
10081008
10091009
10101010
1011
1012
1013
1011
10141012
1015
1016
1017
1018
1019
1020
1021
1022
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
10231028
10241029
10251030
op_complete--;
new_op.formula = _displayedOperations[row].formula;
}
value = item(row, CREDIT)->text();
if (value.length())
else
{
new_op.amount = value.replace(".", "").toInt();
if (new_op.amount < 0)
{
new_op.amount *= -1.0;
setItem(row, DEBIT, new QTableWidgetItem(value.sprintf("%.2lf", (double)new_op.amount/100)));
}
op_complete--;
new_op.formula = _displayedOperations[row].formula;
value = item(row, CREDIT)->text();
if (value.length())
{
new_op.amount = value.replace(".", "").toInt();
if (new_op.amount < 0)
{
new_op.amount *= -1.0;
setItem(row, DEBIT, new QTableWidgetItem(value.sprintf("%.2lf", (double)new_op.amount/100)));
}
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();

Archive Download the corresponding diff file