Fix a bug : date wasn't set for last NULL operation
This commit is contained in:
parent
fe2e6c4bf4
commit
292591c098
|
@ -300,7 +300,7 @@ void GridAccount::InsertOperationWithWeek(User* user, Operation& op, int line, b
|
|||
if (op.id && !fix)
|
||||
ComputeWeeks();
|
||||
}
|
||||
|
||||
#include <QtDebug>
|
||||
void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix, int month, int year)
|
||||
{
|
||||
std::vector<Operation>::iterator it;
|
||||
|
@ -404,19 +404,13 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (curDate.month() == month &&
|
||||
curDate.year() == year)
|
||||
{
|
||||
if (!fix)
|
||||
setItem(line, OP_DATE, new QTableWidgetItem(v.sprintf("%02d/%02d/%d", curDate.day(), month+1, year)));
|
||||
}
|
||||
|
||||
if (fix)
|
||||
{
|
||||
SET_ROW_COLOR(line, view::OWN_YELLOW, Qt::black);
|
||||
}
|
||||
else
|
||||
{
|
||||
setItem(line, OP_DATE, new QTableWidgetItem(v.sprintf("%02d/%02d/%d", curDate.day(), month+1, year)));
|
||||
SET_ROW_COLOR(line, view::OWN_GREEN, Qt::black);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user