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
|
||||
if (!prepaid) {
|
||||
if ((current.time() < worktime_from) || (current.time() > worktime_to)) {
|
||||
qDebug() << "[STOP] * Ticket is not valid * ";
|
||||
if (current.time() < worktime_from) {
|
||||
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();
|
||||
}
|
||||
} else {
|
||||
qDebug() << "* PREPAID MODE ACTIVE *";
|
||||
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);
|
||||
end = current;
|
||||
} else if(current.time() > lastWorktimeTo) {
|
||||
|
Loading…
Reference in New Issue
Block a user