Minor: more detailed debug output
This commit is contained in:
parent
f7af631de6
commit
38eca50d83
@ -674,13 +674,24 @@ Ticket Calculator::private_GetDurationFromCost(Configuration *cfg,
|
|||||||
|
|
||||||
// Check prepaid
|
// Check prepaid
|
||||||
if (!prepaid) {
|
if (!prepaid) {
|
||||||
if ((current.time() < worktime_from) || (current.time() > worktime_to)) {
|
if (current.time() < worktime_from) {
|
||||||
qDebug() << "[STOP] * Ticket is not valid * ";
|
qDebug() << "[STOP] TICKET IS NOT VALID: "
|
||||||
|
<< QString("%1 (current) < %2 (start)")
|
||||||
|
.arg(current.toString(Qt::ISODate)
|
||||||
|
.arg(worktime_from.toString(Qt::ISODate)));
|
||||||
|
return Ticket();
|
||||||
|
} else
|
||||||
|
if (current.time() > worktime_to) {
|
||||||
|
qDebug() << "[STOP] TICKET IS NOT VALID: "
|
||||||
|
<< QString("%1 (current) > %2 (end)")
|
||||||
|
.arg(current.toString(Qt::ISODate)
|
||||||
|
.arg(worktime_to.toString(Qt::ISODate)));
|
||||||
return Ticket();
|
return Ticket();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "* PREPAID MODE ACTIVE *";
|
|
||||||
if (current.time() < worktime_from) {
|
if (current.time() < worktime_from) {
|
||||||
|
qDebug() << "*** PREPAID *** Current time is before time range start, fast-forward to start"
|
||||||
|
<< worktime_from.toString(Qt::ISODate);
|
||||||
current.setTime(worktime_from);
|
current.setTime(worktime_from);
|
||||||
end = current;
|
end = current;
|
||||||
} else if(current.time() > lastWorktimeTo) {
|
} else if(current.time() > lastWorktimeTo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user