Auto fill operation amount if it was the same for the last 3 operations
This commit is contained in:
@@ -1050,6 +1050,12 @@ void GridAccount::OnOperationModified(int row, int col)
|
||||
new_op.fix_cost = (new_op.category == user->GetCategoryId("Fix"));
|
||||
if (op_tmp.transfert != 0)
|
||||
transfertCompleted = true;
|
||||
|
||||
/* Non null value --> set amount */
|
||||
if (op_tmp.amount > 0)
|
||||
setItem(row, CREDIT, new QTableWidgetItem(value.sprintf("%.2lf", (double)op_tmp.amount/100)));
|
||||
else if (op_tmp.amount < 0)
|
||||
setItem(row, DEBIT, new QTableWidgetItem(value.sprintf("%.2lf", (double)-op_tmp.amount/100)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user