Compare commits

...

10 Commits

6 changed files with 1055 additions and 587 deletions

View File

@ -55,17 +55,18 @@ private:
PaymentMethod getPaymentMethodId(Configuration const *cfg);
int getMinimalParkingTime(Configuration const *cfg, PaymentMethod methodId);
int getMaximalParkingTime(Configuration const *cfg, PaymentMethod methodId);
uint32_t getMinimalParkingPrice(Configuration const *cfg, PaymentMethod methodId);
Ticket private_GetCostFromDuration(Configuration const* cfg,
QDateTime const &start,
QDateTime &end,
int &durationMinutes,
bool nextDay = false,
bool prepaid = false,
bool overtime = false);
int durationMinutes,
bool prepaid = false);
Ticket private_GetDurationFromCost(Configuration *cfg,
QDateTime const &start,
uint32_t price,
bool prepaid = false);
bool checkDurationMinutes(bool overTime,
int minParkingTime, int maxParkingTime,
bool checkDurationMinutes(int minParkingTime, int maxParkingTime,
int durationMinutes);
//
@ -78,6 +79,9 @@ private:
int findNextWorkTimeRange(QDateTime const &dt,
QScopedArrayPointer<TariffTimeRange> const &worktime,
size_t size);
uint32_t computeWeekDaysPrice(Configuration const *cfg, PaymentMethod id) const;
double computeWeekDaysDurationUnit(Configuration const *cfg, PaymentMethod id) const;
};
#endif // CALCULATOR_FUNCTIONS_H_INCLUDED

View File

@ -13,7 +13,8 @@
#define VALID (1)
#define INVALID_FROM_DATETIME (2)
#define INVALID_UNTIL_DATETIME (3)
#define STATUS_END (4)
#define INVALID_PRICE (4)
#define STATUS_END (5)
class Ticket {
enum {CODE=0, CODE_STR=1, CODE_DESC=3};
@ -44,7 +45,8 @@ public:
{NOT_INITIALIZED , "NOT_INITIALIZED" , "Ticket not initialized" },
{VALID , "VALID" , "Ticket is valid" },
{INVALID_FROM_DATETIME , "INVALID_FROM_DATETIME" , "Ticket has invalid start datetime"},
{INVALID_UNTIL_DATETIME, "INVALID_UNTIL_DATETIME", "Ticket has invalid end datetime" }
{INVALID_UNTIL_DATETIME, "INVALID_UNTIL_DATETIME", "Ticket has invalid end datetime" },
{INVALID_PRICE , "INVALID_PRICE" , "PARKING NOT ALLOWED: Ticket has invalid price" }
};
private:

View File

@ -408,15 +408,15 @@ double Calculator::GetCostFromDuration(Configuration* cfg,
QDateTime start = start_datetime;
Ticket t = private_GetCostFromDuration(cfg, start,
end_datetime, durationMinutes,
nextDay, prepaid);
durationMinutes,
prepaid);
if (t) {
qCritical().noquote() << t;
return t.getPrice();
}
return -1;
end_datetime = t.getValidUntil();
return t.getPrice();
}
int Calculator::getMinimalParkingTime(Configuration const *cfg, PaymentMethod methodId) {
@ -427,20 +427,22 @@ int Calculator::getMaximalParkingTime(Configuration const *cfg, PaymentMethod me
return std::max((int)cfg->PaymentOption.find(methodId)->second.pop_max_time, 0);
}
bool Calculator::checkDurationMinutes(bool overtime,
int minParkingTime,
uint32_t Calculator::getMinimalParkingPrice(Configuration const *cfg, PaymentMethod methodId) {
return std::max((int)cfg->PaymentOption.find(methodId)->second.pop_min_price, 0);
}
bool Calculator::checkDurationMinutes(int minParkingTime,
int maxParkingTime,
int durationMinutes) {
if (!overtime) {
if (durationMinutes > maxParkingTime) {
qWarning() << QString("Total duration >= max_min (%1 >= %2)").arg(durationMinutes).arg(maxParkingTime);
return false;
}
if (durationMinutes < minParkingTime) {
qWarning() << QString("Total duration <= minMin (%1 <= %2)").arg(durationMinutes).arg(minParkingTime);
return false;
}
if (durationMinutes > maxParkingTime) {
qWarning() << QString("Total duration >= max_min (%1 >= %2)").arg(durationMinutes).arg(maxParkingTime);
return false;
}
if (durationMinutes < minParkingTime) {
qWarning() << QString("Total duration <= minMin (%1 <= %2)").arg(durationMinutes).arg(minParkingTime);
return false;
}
return true;
}
@ -459,8 +461,8 @@ int Calculator::findWorkTimeRange(QDateTime const &dt,
}
int Calculator::findNextWorkTimeRange(QDateTime const &dt,
QScopedArrayPointer<TariffTimeRange> const &worktime,
size_t size) {
QScopedArrayPointer<TariffTimeRange> const &worktime,
size_t size) {
int nextWorkTimeRange = -1;
for (size_t w = 0; w < size; ++w) {
QTime const &worktime_from = worktime[w].getTimeFrom();
@ -473,24 +475,33 @@ int Calculator::findNextWorkTimeRange(QDateTime const &dt,
return nextWorkTimeRange;
}
uint32_t Calculator::computeWeekDaysPrice(Configuration const *cfg, PaymentMethod id) const {
int pop_id = cfg->PaymentOption.find(id)->second.pop_id;
return cfg->PaymentRate.find(pop_id)->second.pra_price;
}
double Calculator::computeWeekDaysDurationUnit(Configuration const *cfg, PaymentMethod id) const {
int pop_id = cfg->PaymentOption.find(id)->second.pop_id;
int durationId = cfg->PaymentRate.find(pop_id)->second.pra_payment_unit_id;
return (double)(cfg->Duration.find(durationId)->second.pun_duration);
}
using namespace Utilities;
Ticket Calculator::private_GetCostFromDuration(Configuration const* cfg,
QDateTime const &start,
QDateTime &end,
int &durationMinutes,
bool nextDay,
bool prepaid,
bool overtime) {
int durationMinutes, // Netto
bool prepaid) {
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
static const bool carryOverNotSet = isCarryOverNotSet(cfg, paymentMethodId);
static int const minParkingTimeMinutes = getMinimalParkingTime(cfg, paymentMethodId);
static int const maxParkingTimeMinutes = getMaximalParkingTime(cfg, paymentMethodId);
static bool const checkMinMaxMinutes = (minParkingTimeMinutes < maxParkingTimeMinutes);
static const int minParkingTimeMinutes = getMinimalParkingTime(cfg, paymentMethodId);
static const int maxParkingTimeMinutes = getMaximalParkingTime(cfg, paymentMethodId);
static const bool checkMinMaxMinutes = (minParkingTimeMinutes < maxParkingTimeMinutes);
static const int durationMinutesNetto = durationMinutes;
static const uint32_t weekDaysPrice = computeWeekDaysPrice(cfg, paymentMethodId);
static const double weekDaysDurationUnit = computeWeekDaysDurationUnit(cfg, paymentMethodId);
static const double specialDaysDurationUnit = 60.0;
if (!checkMinMaxMinutes) {
qCritical() << QString(
@ -499,208 +510,369 @@ Ticket Calculator::private_GetCostFromDuration(Configuration const* cfg,
return Ticket();
}
if (!checkDurationMinutes(overtime, minParkingTimeMinutes,
if (!checkDurationMinutes(minParkingTimeMinutes,
maxParkingTimeMinutes, durationMinutes)) {
return Ticket();
}
QDateTime inputDate = start;
int const weekdayId = inputDate.date().dayOfWeek();
uint32_t price = 0;
double durationUnit = 60.0;
int current_special_day_id = -1;
// there might be more than 1 worktime ranges per day
int const timeRanges = std::max((int)cfg->WeekDaysWorktime.count(weekdayId), 1);
QScopedArrayPointer<TariffTimeRange> worktime(new TariffTimeRange[timeRanges]);
int ranges = 0;
if(Utilities::CheckSpecialDay(cfg, inputDate, &current_special_day_id, &price)) {
// Set special day price:
durationUnit = 60.0;
worktime[ranges].setTimeRange(SpecialDaysWorkTimeFrom(cfg, current_special_day_id),
SpecialDaysWorkTimeUntil(cfg, current_special_day_id));
ranges = 1;
} else {
// Set new price for the normal day: do not use a floating-point type
// for the price, rather compute with integers. Only at the very end of
// the computation the price is divided by durationUnit.
int pop_id = cfg->PaymentOption.find(paymentMethodId)->second.pop_id;
price = cfg->PaymentRate.find(pop_id)->second.pra_price;
int durationId = cfg->PaymentRate.find(pop_id)->second.pra_payment_unit_id;
durationUnit = cfg->Duration.find(durationId)->second.pun_duration;
// If no working day found, skip it (recursively call method again)
if (cfg->WeekDaysWorktime.count(weekdayId) <= 0) {
// When no workday found, go to next available day
qDebug() << "No workday found, trying to find next available day";
inputDate = inputDate.addDays(1);
return private_GetCostFromDuration(cfg, inputDate, end, durationMinutes, true, prepaid, overtime);
}
using WTIterator = std::multimap<int, ATBWeekDaysWorktime>::const_iterator;
std::pair<WTIterator, WTIterator> p = cfg->WeekDaysWorktime.equal_range(weekdayId);
for (WTIterator itr = p.first; itr != p.second; ++itr) {
worktime[ranges].setTimeRange(WeekDaysWorkTimeFrom(itr),
WeekDaysWorkTimeUntil(itr));
ranges += 1;
}
}
uint32_t costFromDuration = 0;
QTime const &lastWorktimeTo = worktime[ranges-1].getTimeUntil();
int currentRange = -1;
double durationUnit = 0.0;
int specialDayId = -1;
bool isSpecialDay = false;
Ticket ticket;
QDateTime end = start;
QDateTime current;
int totalTimeRanges = 0;
if (nextDay) { // this means the function has been called recursively
currentRange = 0;
inputDate.setTime(worktime[currentRange].getTimeFrom());
} else {
// check if inputDate is located inside a valid worktime-range...
currentRange = findWorkTimeRange(inputDate, worktime, ranges);
if (currentRange == -1) { // no...
if (!prepaid) { // parking is not allowed
return Ticket(start, end, durationMinutesNetto, 0,
0, Ticket::s[INVALID_FROM_DATETIME]);
}
// find the next worktime-range (on the same day), and start from there
currentRange = findNextWorkTimeRange(inputDate, worktime, ranges);
inputDate.setTime(worktime[currentRange].getTimeFrom());
}
}
for (current = start; durationMinutes > 0; current = current.addDays(1)) {
int const weekdayId = current.date().dayOfWeek();
for (int w = currentRange; w < ranges; ++w) {
if (durationMinutes > 0) {
QTime const &worktime_from = worktime[w].getTimeFrom();
QTime const &worktime_to = worktime[w].getTimeUntil();
specialDayId = -1;
qCritical() << "from" << worktime_from;
qCritical() << "until" << worktime_to;
// find worktime ranges for the current day
int const timeRanges = std::max((int)cfg->WeekDaysWorktime.count(weekdayId), 1);
QScopedArrayPointer<TariffTimeRange> worktime(new TariffTimeRange[timeRanges]);
int ranges = 0;
//if (w > 0) { // durationMinutes are always meant as netto time and
// // the time between worktime-ranges are free.
// inputDate.setTime(worktime_from);
//}
if((isSpecialDay = Utilities::CheckSpecialDay(cfg, current, &specialDayId, &price))) {
// Set special day price:
durationUnit = specialDaysDurationUnit;
worktime[ranges].setTimeRange(SpecialDaysWorkTimeFrom(cfg, specialDayId),
SpecialDaysWorkTimeUntil(cfg, specialDayId));
ranges = 1;
} else {
// Set new price for the normal day: do not use a floating-point type
// for the price, rather compute with integers. Only at the very end of
// the computation the price is divided by durationUnit.
price = weekDaysPrice;
durationUnit = weekDaysDurationUnit;
// TODO: hier muss dann der preis hin
if (price == 0) {
inputDate = inputDate.addDays(1);
inputDate.setTime(worktime_from);
Ticket t = private_GetCostFromDuration(
cfg, // TODO: erklaerung
inputDate,
end, durationMinutes,
true, prepaid);
if (!t.isValid()) {
return t;
}
costFromDuration += t.getPrice();
// If no working day found, skip it (epsecially Sundays!)
if (cfg->WeekDaysWorktime.count(weekdayId) <= 0) {
qDebug() << "No workday found, trying to find next available day";
end = current;
current.setTime(QTime()); // start at midnight on the next day
continue;
}
// If overtime flag is set
// TODO: ueberpruefen, kann man wohl nach oben ziehen
//if (overtime || nextDay) {
// inputDate.setTime(worktime_from);
// overtime = false;
//}
using WTIterator = std::multimap<int, ATBWeekDaysWorktime>::const_iterator;
std::pair<WTIterator, WTIterator> p = cfg->WeekDaysWorktime.equal_range(weekdayId);
qCritical() << "inputDate.time()=" << inputDate.time();
// Check prepaid
if (!prepaid) {
if ((inputDate.time() < worktime_from) || (inputDate.time() > worktime_to)) {
qDebug() << "[STOP] * Ticket is not valid * ";
return Ticket();
}
} else {
qDebug() << "* PREPAID MODE ACTIVE *";
if (inputDate.time() < worktime_from) {
inputDate.setTime(worktime_from);
//} else if(inputDate.time() > worktime_to) {
} else if(inputDate.time() > lastWorktimeTo) {
qDebug() << " *** PREPAID *** Current time is past the time range end, searching for next available day";
// wieso ist hier overtime nicht gesetzt
inputDate = inputDate.addDays(1);
Ticket t = private_GetCostFromDuration(
cfg, inputDate, end,
durationMinutes, true, prepaid);
if (!t.isValid()) {
return t;
}
costFromDuration += t.getPrice();
continue;
}
for (WTIterator itr = p.first; itr != p.second; ++itr) {
worktime[ranges].setTimeRange(WeekDaysWorkTimeFrom(itr),
WeekDaysWorkTimeUntil(itr));
ranges += 1;
}
}
while(durationMinutes > 0) {
// Check for active year period
if (!IsYearPeriodActive(cfg, inputDate)) {
return Ticket();
}
QTime const &lastWorktimeTo = worktime[ranges-1].getTimeUntil();
qDebug() << "inputDate" << inputDate.toString(Qt::ISODate);
// find worktime range to start with
if(inputDate.time() >= lastWorktimeTo) {
// Go to next day if minutes not spent
if (carryOverNotSet) {
// no carry_over, so stop computation
break;
int currentRange = 0;
if (!isSpecialDay) {
if (start != current) { // on next day
current.setTime(worktime[currentRange].getTimeFrom());
} else {
// check if inputDate is located inside a valid worktime-range...
currentRange = findWorkTimeRange(current, worktime, ranges);
if (currentRange == -1) { // no...
if (!prepaid) { // parking is not allowed
return Ticket(start, QDateTime(), durationMinutesNetto, 0,
0, Ticket::s[INVALID_FROM_DATETIME]);
}
qDebug() << "Reached end of worktime, searching for the next working day";
inputDate = inputDate.addDays(1);
inputDate.setTime(QTime());
overtime = true;
Ticket t = private_GetCostFromDuration(
cfg, inputDate, end,
durationMinutes, true, prepaid, overtime);
if (!t.isValid()) {
return t;
}
costFromDuration += t.getPrice();
break; // stop while, and continue in outer loop
} else {
if(inputDate.time() < worktime_to) {
// Increment input date minutes for each monetary unit
inputDate = inputDate.addSecs(60);
qDebug() << "inputDate" << inputDate.toString(Qt::ISODate);
durationMinutes -= 1;
//costFromDuration += price_per_unit;
costFromDuration += price;
} else break;
// find the next worktime-range (on the same day), and start from there
currentRange = findNextWorkTimeRange(current, worktime, ranges);
current.setTime(worktime[currentRange].getTimeFrom());
}
}
}
}
for (int w = currentRange; w < ranges; ++w, ++totalTimeRanges) {
if (durationMinutes > 0) {
QTime const &worktime_from = worktime[w].getTimeFrom();
QTime const &worktime_to = worktime[w].getTimeUntil();
if (inputDate >= end) {
end = inputDate;
}
if (totalTimeRanges) {
// durationMinutes are always meant as netto time and
// the time between worktime-ranges are free.
current.setTime(worktime_from);
}
if (nextDay == false) {
qDebug() << "GetCostFromDuration(): Valid until:" << end.toString(Qt::ISODate);
}
if (price == 0) {
// inputDate = inputDate.addDays(1);
// inputDate.setTime(worktime_from);
end = current;
current.setTime(QTime());
continue;
}
if (current.time() == worktime_to) {
end = current;
current.setTime(QTime());
continue;
}
// Check prepaid
if (!prepaid) {
if ((current.time() < worktime_from) || (current.time() > worktime_to)) {
qDebug() << "[STOP] * Ticket is not valid * ";
return Ticket();
}
} else {
qDebug() << "* PREPAID MODE ACTIVE *";
if (current.time() < worktime_from) {
current.setTime(worktime_from);
end = current;
} else if(current.time() > lastWorktimeTo) {
qDebug() << " *** PREPAID *** Current time is past the time range end, searching for next available day";
end = current;
current.setTime(QTime());
continue;
}
}
while(durationMinutes > 0) {
// Check for active year period
if (!IsYearPeriodActive(cfg, current)) {
return Ticket();
}
if(current.time() >= lastWorktimeTo) {
// Go to next day if minutes not spent
if (carryOverNotSet) {
// no carry_over, so stop computation
break;
}
current.setTime(QTime());
break; // stop while, and continue in outer loop
} else {
if(current.time() < worktime_to) {
// Increment input date minutes for each monetary unit
current = current.addSecs(60);
end = current;
durationMinutes -= 1;
//costFromDuration += price_per_unit;
costFromDuration += price;
} else break;
}
} // while(durationMinutes > 0) {
} // if (durationMinutes > 0) {
} // for (int w = currentRange; w < ranges; ++w, ++totalTimeRanges) {
} // for (current = start; durationMinutes > 0; current = current.addDays(1)) {
int durationMinutesBrutto = start.secsTo(end) / 60;
return
Ticket(start, end,
durationMinutesNetto,
start.secsTo(end) / 60,
nextDay ?
costFromDuration :
llround(Utilities::CalculatePricePerUnit(costFromDuration, durationUnit)),
Ticket(start, end, durationMinutesNetto, durationMinutesBrutto,
llround(Utilities::CalculatePricePerUnit(costFromDuration, durationUnit)),
Ticket::s[VALID]);
}
Ticket Calculator::private_GetDurationFromCost(Configuration *cfg,
QDateTime const &start,
uint32_t price,
bool prepaid) {
// Get input date
QDateTime current = start;
// use tariff with structure as for instance Schnau, Koenigsee:
// without given YearPeriod, SpecialDays and SpecialDaysWorktime
if (cfg->YearPeriod.size() == 0
&& cfg->SpecialDays.size() == 0
&& cfg->SpecialDaysWorktime.size() == 0)
{
uint64_t const durationMinutes = GetDurationForPrice(cfg, price);
uint64_t const durationSeconds = durationMinutes * 60;
current = current.addSecs(durationSeconds);
return
Ticket(start, current, durationMinutes, durationMinutes,
price, Ticket::s[VALID]);
}
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
static const bool carryOverNotSet = isCarryOverNotSet(cfg, paymentMethodId);
static const uint32_t minParkingTimeMinutes = std::max(getMinimalParkingTime(cfg, paymentMethodId), 0);
static const uint32_t maxParkingTimeMinutes = std::max(getMaximalParkingTime(cfg, paymentMethodId), 0);
static const uint32_t minParkingPrice = getMinimalParkingPrice(cfg, paymentMethodId);
static const bool checkMinMaxMinutes = (minParkingTimeMinutes < maxParkingTimeMinutes);
static const uint32_t weekDaysPrice = computeWeekDaysPrice(cfg, paymentMethodId);
static const double weekDaysDurationUnit = computeWeekDaysDurationUnit(cfg, paymentMethodId);
static const double specialDaysDurationUnit = 60.0;
if(price < minParkingPrice) {
uint64_t const durationMinutes = GetDurationForPrice(cfg, price);
return Ticket(start, current, durationMinutes, durationMinutes,
price, Ticket::s[INVALID_PRICE]);
}
if (minParkingTimeMinutes >= maxParkingTimeMinutes) {
// TODO
return Ticket();
}
if (maxParkingTimeMinutes <= minParkingTimeMinutes) {
// TODO
return Ticket();
}
uint32_t durationMinutesNetto = 0;
int moneyLeft = price;
//double durationUnit = 0.0;
int specialDayId = -1;
bool isSpecialDay = false;
QDateTime end = start;
int totalTimeRanges = 0;
for (current = start; moneyLeft > 0; current = current.addDays(1)) {
int const weekdayId = current.date().dayOfWeek();
specialDayId = -1;
// find worktime ranges for the current day
int const timeRanges = std::max((int)cfg->WeekDaysWorktime.count(weekdayId), 1);
QScopedArrayPointer<TariffTimeRange> worktime(new TariffTimeRange[timeRanges]);
int ranges = 0;
if((isSpecialDay = Utilities::CheckSpecialDay(cfg, current, &specialDayId, &price))) {
// Set special day price:
// durationUnit = specialDaysDurationUnit;
worktime[ranges].setTimeRange(SpecialDaysWorkTimeFrom(cfg, specialDayId),
SpecialDaysWorkTimeUntil(cfg, specialDayId));
ranges = 1;
} else {
// Set new price for the normal day: do not use a floating-point type
// for the price, rather compute with integers. Only at the very end of
// the computation the price is divided by durationUnit.
price = weekDaysPrice;
// durationUnit = weekDaysDurationUnit;
// If no working day found, skip it (epsecially Sundays!)
if (cfg->WeekDaysWorktime.count(weekdayId) <= 0) {
qDebug() << "No workday found, trying to find next available day";
end = current;
current.setTime(QTime()); // start at midnight on the next day
continue;
}
using WTIterator = std::multimap<int, ATBWeekDaysWorktime>::const_iterator;
std::pair<WTIterator, WTIterator> p = cfg->WeekDaysWorktime.equal_range(weekdayId);
for (WTIterator itr = p.first; itr != p.second; ++itr) {
worktime[ranges].setTimeRange(WeekDaysWorkTimeFrom(itr),
WeekDaysWorkTimeUntil(itr));
ranges += 1;
}
}
QTime const &lastWorktimeTo = worktime[ranges-1].getTimeUntil();
// find worktime range to start with
int currentRange = 0;
if (!isSpecialDay) {
if (start != current) { // on next day
current.setTime(worktime[currentRange].getTimeFrom());
} else {
// check if inputDate is located inside a valid worktime-range...
currentRange = findWorkTimeRange(current, worktime, ranges);
if (currentRange == -1) { // no...
if (!prepaid) { // parking is not allowed
return Ticket(start, QDateTime(), durationMinutesNetto, 0,
0, Ticket::s[INVALID_FROM_DATETIME]);
}
// find the next worktime-range (on the same day), and start from there
currentRange = findNextWorkTimeRange(current, worktime, ranges);
current.setTime(worktime[currentRange].getTimeFrom());
}
}
}
for (int w = currentRange; w < ranges; ++w, ++totalTimeRanges) {
if (moneyLeft > 0) {
QTime const &worktime_from = worktime[w].getTimeFrom();
QTime const &worktime_to = worktime[w].getTimeUntil();
if (totalTimeRanges) {
// durationMinutes are always meant as netto time and
// the time between worktime-ranges are free.
current.setTime(worktime_from);
}
if (price == 0) {
// inputDate = inputDate.addDays(1);
// inputDate.setTime(worktime_from);
end = current;
current.setTime(QTime());
continue;
}
if (current.time() == worktime_to) {
end = current;
current.setTime(QTime());
continue;
}
// Check prepaid
if (!prepaid) {
if ((current.time() < worktime_from) || (current.time() > worktime_to)) {
qDebug() << "[STOP] * Ticket is not valid * ";
return Ticket();
}
} else {
qDebug() << "* PREPAID MODE ACTIVE *";
if (current.time() < worktime_from) {
current.setTime(worktime_from);
end = current;
} else if(current.time() > lastWorktimeTo) {
qDebug() << " *** PREPAID *** Current time is past the time range end, searching for next available day";
end = current;
current.setTime(QTime());
continue;
}
}
while(moneyLeft > 0) {
// Check for active year period
if (!IsYearPeriodActive(cfg, current)) {
return Ticket();
}
if(durationMinutesNetto > maxParkingTimeMinutes) {
durationMinutesNetto = maxParkingTimeMinutes;
break;
}
if(current.time() >= lastWorktimeTo) {
// Go to next day if minutes not spent
if (carryOverNotSet) {
// no carry_over, so stop computation
break;
}
current.setTime(QTime());
break; // stop while, and continue in outer loop
} else {
if(current.time() < worktime_to) {
// Increment input date minutes for each monetary unit
if(moneyLeft > 1) {
current = current.addSecs(60);
}
end = current;
if(price > 0) {
durationMinutesNetto +=1;
}
moneyLeft -= price;
} else break;
}
} // while(durationMinutes > 0) {
} // if (durationMinutes > 0) {
} // for (int w = currentRange; w < ranges; ++w, ++totalTimeRanges) {
} // for (current = start; durationMinutes > 0; current = current.addDays(1)) {
int durationMinutesBrutto = start.secsTo(end) / 60;
return
Ticket(start, end, durationMinutesNetto, durationMinutesBrutto,
price, Ticket::s[VALID]);
}
QList<int> Calculator::GetTimeSteps(Configuration *cfg) const {
QList<int> timeSteps;

View File

@ -7,9 +7,6 @@ Ticket::Ticket()
, m_durationMinutesNetto(0)
, m_durationMinutesBrutto(0)
, m_price() {
qDebug() << *this;
qDebug() << m_status;
}
Ticket::Ticket(QDateTime const &s, QDateTime const &e,

View File

@ -1,9 +1,12 @@
{
"Project" : "Korneuburg",
"Version" : "1.0.0",
"Info" : "",
"Currency": [
{
"pcu_id": 2,
"pcu_sign": "Ft",
"pcu_major": "HUF",
"pcu_sign": "",
"pcu_major": "EUR",
"pcu_minor": "",
"pcu_active": true
}
@ -29,30 +32,30 @@
"PaymentOption": [
{
"pop_id": 1049,
"pop_label": "Zone Lila",
"pop_label": "Zone 1",
"pop_payment_method_id": 3,
"pop_day_end_time": "16:25:00",
"pop_day_night_end_time": "16:25:00",
"pop_day_end_time": "00:00:00",
"pop_day_night_end_time": "00:00:00",
"pop_price_night": 0,
"pop_min_time": 15,
"pop_max_time": 300,
"pop_min_price": 0,
"pop_min_time": 30,
"pop_max_time": 180,
"pop_min_price": 60,
"pop_carry_over": 1,
"pop_daily_card_price": 900
"pop_daily_card_price": 0
}
],
"PaymentRate": [
{
"pra_payment_option_id": 1049,
"pra_payment_unit_id": 1,
"pra_price": 150
"pra_price": 10
}
],
"Duration": [
{
"pun_id": 1,
"pun_label": "1h",
"pun_duration": 60
"pun_label": "5 min",
"pun_duration": 5
},
{
"pun_id": 3,
@ -71,6 +74,13 @@
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 1,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
},
{
"pwd_id": 621,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 1,
"pwd_time_from": "14:00:00",
"pwd_time_to": "18:00:00"
},
{
@ -78,6 +88,13 @@
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 2,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
},
{
"pwd_id": 622,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 2,
"pwd_time_from": "14:00:00",
"pwd_time_to": "18:00:00"
},
{
@ -85,6 +102,13 @@
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 3,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
},
{
"pwd_id": 623,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 3,
"pwd_time_from": "14:00:00",
"pwd_time_to": "18:00:00"
},
{
@ -92,6 +116,13 @@
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 4,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
},
{
"pwd_id": 624,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 4,
"pwd_time_from": "14:00:00",
"pwd_time_to": "18:00:00"
},
{
@ -99,73 +130,21 @@
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 5,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
},
{
"pwd_id": 625,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 5,
"pwd_time_from": "14:00:00",
"pwd_time_to": "18:00:00"
}
],
"PeriodYear": [
{
"pye_id": 8,
"pye_label": "Whole year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 9,
"pye_label": "Whole year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 10,
"pye_label": "Whole year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 11,
"pye_label": "Whole Year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 12,
"pye_label": "Whole Year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 13,
"pye_label": "Whole Year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 14,
"pye_label": "Whole Year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
},
{
"pye_id": 15,
"pye_label": "Whole year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
"pwd_id": 626,
"pwd_period_week_day_id": 36,
"pwd_period_day_in_week_id": 6,
"pwd_time_from": "08:00:00",
"pwd_time_to": "12:00:00"
}
],
"SpecialDaysWorktime": [
@ -385,421 +364,266 @@
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2260,
"pedwt_period_exc_day_id": 2061,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2261,
"pedwt_period_exc_day_id": 2062,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2262,
"pedwt_period_exc_day_id": 2063,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2263,
"pedwt_period_exc_day_id": 2064,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2264,
"pedwt_period_exc_day_id": 2065,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2265,
"pedwt_period_exc_day_id": 2066,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2266,
"pedwt_period_exc_day_id": 2067,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2267,
"pedwt_period_exc_day_id": 2068,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2268,
"pedwt_period_exc_day_id": 2069,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2269,
"pedwt_period_exc_day_id": 2070,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2270,
"pedwt_period_exc_day_id": 2071,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
}
],
"SpecialDays": [
{
"ped_id": 11,
"ped_label": "Christmas 1st day",
"ped_date_start": "2022-12-25",
"ped_date_end": "2022-12-25",
"ped_period_special_day_id": 2,
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2023-12-08",
"ped_date_end": "2023-12-08",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 13,
"ped_label": "Christmas 2nd day",
"ped_date_start": "2022-12-26",
"ped_date_end": "2022-12-26",
"ped_period_special_day_id": 2,
"ped_label": "Christtag",
"ped_date_start": "2023-12-25",
"ped_date_end": "2023-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 14,
"ped_label": "Republic Day (Hungary)",
"ped_date_start": "2022-10-23",
"ped_date_end": "2022-10-23",
"ped_period_special_day_id": 2,
"ped_label": "Stefanitag",
"ped_date_start": "2023-12-26",
"ped_date_end": "2023-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2016,
"ped_label": "Christmas (Sunday)",
"ped_date_start": "2022-12-24",
"ped_date_end": "2022-12-24",
"ped_period_special_day_id": 2,
"ped_label": "Neujahr",
"ped_date_start": "2024-01-01",
"ped_date_end": "2024-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2021,
"ped_label": "Holiday (Hungary)",
"ped_date_start": "2022-12-31",
"ped_date_end": "2022-12-31",
"ped_label": "Heilig Drei Koenige",
"ped_date_start": "2024-01-06",
"ped_date_end": "2024-01-06",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2022,
"ped_label": "NewYear",
"ped_date_start": "2023-01-01",
"ped_date_end": "2023-01-01",
"ped_period_special_day_id": 2,
"ped_year": 0
"ped_label": "Ostermontag",
"ped_date_start": "2024-01-04",
"ped_date_end": "2024-01-04",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2024,
"ped_label": "Good Friday",
"ped_date_start": "2023-04-07",
"ped_date_end": "2023-04-07",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Staatsfeiertag",
"ped_date_start": "2024-05-01",
"ped_date_end": "2024-05-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2025,
"ped_label": "Easter Sunday",
"ped_date_start": "2023-04-09",
"ped_date_end": "2023-04-09",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Christi Himmelfahrt",
"ped_date_start": "2024-05-09",
"ped_date_end": "2024-05-09",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2026,
"ped_label": "Easter Monday",
"ped_date_start": "2023-04-10",
"ped_date_end": "2023-04-10",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Pfingst Montag",
"ped_date_start": "2024-05-20",
"ped_date_end": "2024-05-20",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2027,
"ped_label": "Whit Sunday",
"ped_date_start": "2023-05-28",
"ped_date_end": "2023-05-28",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Fronleichnam",
"ped_date_start": "2024-05-30",
"ped_date_end": "2024-05-30",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2028,
"ped_label": "Whit Monday",
"ped_date_start": "2023-05-29",
"ped_date_end": "2023-05-29",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Maria Himmelfahrt",
"ped_date_start": "2024-08-15",
"ped_date_end": "2024-08-15",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2029,
"ped_label": "Revolution Day (Hungary)",
"ped_date_start": "2023-03-15",
"ped_date_end": "2023-03-15",
"ped_period_special_day_id": 2,
"ped_label": "Nationalfeiertag",
"ped_date_start": "2024-10-26",
"ped_date_end": "2024-10-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2030,
"ped_label": "Labour Day",
"ped_date_start": "2023-05-01",
"ped_date_end": "2023-05-01",
"ped_period_special_day_id": 2,
"ped_label": "Allerheiligen",
"ped_date_start": "2024-11-01",
"ped_date_end": "2024-11-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2031,
"ped_label": "Saint Stephens Day (Hungary)",
"ped_date_start": "2023-08-20",
"ped_date_end": "2023-08-20",
"ped_period_special_day_id": 2,
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2024-08-12",
"ped_date_end": "2024-08-12",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2032,
"ped_label": "All Saints Day",
"ped_date_start": "2023-11-01",
"ped_date_end": "2023-11-01",
"ped_period_special_day_id": 2,
"ped_label": "Christtag",
"ped_date_start": "2024-12-25",
"ped_date_end": "2024-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2034,
"ped_label": "Good Friday",
"ped_date_start": "2024-03-29",
"ped_date_end": "2024-03-29",
"ped_period_special_day_id": 2,
"ped_year": 2024
"ped_label": "Stefanitag",
"ped_date_start": "2024-12-26",
"ped_date_end": "2024-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2035,
"ped_label": "Easter",
"ped_date_start": "2024-03-31",
"ped_date_end": "2024-03-31",
"ped_period_special_day_id": 2,
"ped_year": 2024
"ped_label": "Neujahr",
"ped_date_start": "2025-01-01",
"ped_date_end": "2025-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2036,
"ped_label": "Easter Monday",
"ped_date_start": "2024-04-01",
"ped_date_end": "2024-04-01",
"ped_period_special_day_id": 2,
"ped_year": 2024
"ped_label": "Heilig Drei Koenige",
"ped_date_start": "2025-06-01",
"ped_date_end": "2025-06-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2037,
"ped_label": "Whit Monday",
"ped_date_start": "2024-05-20",
"ped_date_end": "2024-05-20",
"ped_period_special_day_id": 2,
"ped_year": 2024
"ped_label": "Ostermontag",
"ped_date_start": "2025-04-21",
"ped_date_end": "2025-04-21",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2038,
"ped_label": "Whit Sunday",
"ped_date_start": "2024-05-19",
"ped_date_end": "2024-05-19",
"ped_period_special_day_id": 2,
"ped_year": 2024
"ped_label": "Staatsfeiertag",
"ped_date_start": "2025-05-01",
"ped_date_end": "2025-05-01",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2050,
"ped_label": "Uskrs",
"ped_date_start": "2023-04-16",
"ped_date_end": "2023-04-16",
"ped_label": "Christi Himmelfahrt",
"ped_date_start": "2025-05-29",
"ped_date_end": "2025-05-29",
"ped_period_special_day_id": 1,
"ped_year": 0
"ped_year": 2025
},
{
"ped_id": 2051,
"ped_label": "Uskrs",
"ped_date_start": "2023-04-16",
"ped_date_end": "2023-04-16",
"ped_label": "Pfingstmontag",
"ped_date_start": "2025-06-09",
"ped_date_end": "2025-06-09",
"ped_period_special_day_id": 1,
"ped_year": 0
"ped_year": 2025
},
{
"ped_id": 2052,
"ped_label": "Christmas 1st day",
"ped_date_start": "2022-12-25",
"ped_date_end": "2022-12-25",
"ped_period_special_day_id": 2,
"ped_year": 0
"ped_label": "Fronlaeichnam",
"ped_date_start": "2025-06-19",
"ped_date_end": "2025-06-19",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2053,
"ped_label": "Christmas 2nd day",
"ped_date_start": "2022-12-26",
"ped_date_end": "2022-12-26",
"ped_period_special_day_id": 2,
"ped_label": "Mariae Himmelfahrt",
"ped_date_start": "2025-08-15",
"ped_date_end": "2025-08-15",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2054,
"ped_label": "Republic Day (Hungary)",
"ped_date_start": "2022-10-23",
"ped_date_end": "2022-10-23",
"ped_period_special_day_id": 2,
"ped_label": "Nationalfeiertag",
"ped_date_start": "2025-10-26",
"ped_date_end": "2025-10-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2055,
"ped_label": "Christmas (Sunday)",
"ped_date_start": "2022-12-24",
"ped_date_end": "2022-12-24",
"ped_period_special_day_id": 2,
"ped_label": "Allerheiligen",
"ped_date_start": "2025-11-01",
"ped_date_end": "2025-11-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2056,
"ped_label": "Holiday (Hungary)",
"ped_date_start": "2022-12-31",
"ped_date_end": "2022-12-31",
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2025-12-08",
"ped_date_end": "2025-12-08",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2057,
"ped_label": "NewYear",
"ped_date_start": "2023-01-01",
"ped_date_end": "2023-01-01",
"ped_period_special_day_id": 2,
"ped_label": "Christtag",
"ped_date_start": "2025-12-25",
"ped_date_end": "2025-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2058,
"ped_label": "Good Friday",
"ped_date_start": "2023-04-07",
"ped_date_end": "2023-04-07",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Stefanitag",
"ped_date_start": "2025-12-26",
"ped_date_end": "2025-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2059,
"ped_label": "Easter Sunday",
"ped_date_start": "2023-04-09",
"ped_date_end": "2023-04-09",
"ped_period_special_day_id": 2,
"ped_year": 2023
"ped_label": "Neujahr",
"ped_date_start": "2026-01-01",
"ped_date_end": "2026-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2060,
"ped_label": "Easter Monday",
"ped_date_start": "2023-04-10",
"ped_date_end": "2023-04-10",
"ped_period_special_day_id": 2,
"ped_year": 2023
},
{
"ped_id": 2061,
"ped_label": "Whit Sunday",
"ped_date_start": "2023-05-28",
"ped_date_end": "2023-05-28",
"ped_period_special_day_id": 2,
"ped_year": 2023
},
{
"ped_id": 2062,
"ped_label": "Whit Monday",
"ped_date_start": "2023-05-29",
"ped_date_end": "2023-05-29",
"ped_period_special_day_id": 2,
"ped_year": 2023
},
{
"ped_id": 2063,
"ped_label": "Revolution Day (Hungary)",
"ped_date_start": "2023-03-15",
"ped_date_end": "2023-03-15",
"ped_period_special_day_id": 2,
"ped_label": "Heilige Drei Koenige",
"ped_date_start": "2026-01-06",
"ped_date_end": "2026-01-06",
"ped_period_special_day_id": 1,
"ped_year": 0
},
}
],
"PeriodYear": [
{
"ped_id": 2064,
"ped_label": "Labour Day",
"ped_date_start": "2023-05-01",
"ped_date_end": "2023-05-01",
"ped_period_special_day_id": 2,
"ped_year": 0
},
{
"ped_id": 2065,
"ped_label": "Saint Stephens Day (Hungary)",
"ped_date_start": "2023-08-20",
"ped_date_end": "2023-08-20",
"ped_period_special_day_id": 2,
"ped_year": 0
},
{
"ped_id": 2066,
"ped_label": "All Saints Day",
"ped_date_start": "2023-11-01",
"ped_date_end": "2023-11-01",
"ped_period_special_day_id": 2,
"ped_year": 0
},
{
"ped_id": 2067,
"ped_label": "Good Friday",
"ped_date_start": "2024-03-29",
"ped_date_end": "2024-03-29",
"ped_period_special_day_id": 2,
"ped_year": 2024
},
{
"ped_id": 2068,
"ped_label": "Easter",
"ped_date_start": "2024-03-31",
"ped_date_end": "2024-03-31",
"ped_period_special_day_id": 2,
"ped_year": 2024
},
{
"ped_id": 2069,
"ped_label": "Easter Monday",
"ped_date_start": "2024-04-01",
"ped_date_end": "2024-04-01",
"ped_period_special_day_id": 2,
"ped_year": 2024
},
{
"ped_id": 2070,
"ped_label": "Whit Monday",
"ped_date_start": "2024-05-20",
"ped_date_end": "2024-05-20",
"ped_period_special_day_id": 2,
"ped_year": 2024
},
{
"ped_id": 2071,
"ped_label": "Whit Sunday",
"ped_date_start": "2024-05-19",
"ped_date_end": "2024-05-19",
"ped_period_special_day_id": 2,
"ped_year": 2024
"pye_id": 8,
"pye_label": "Whole year",
"pye_start_month": 1,
"pye_start_day": 1,
"pye_end_month": 12,
"pye_end_day": 31
}
]
}

View File

@ -40,7 +40,7 @@
"pop_min_time": 30,
"pop_max_time": 180,
"pop_min_price": 60,
"pop_carry_over": 0,
"pop_carry_over": 1,
"pop_daily_card_price": 0
}
],
@ -147,6 +147,475 @@
"pwd_time_to": "12:00:00"
}
],
"SpecialDaysWorktime": [
{
"pedwt_id": 2156,
"pedwt_period_exc_day_id": 2024,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2158,
"pedwt_period_exc_day_id": 2025,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2160,
"pedwt_period_exc_day_id": 2026,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2162,
"pedwt_period_exc_day_id": 2027,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2164,
"pedwt_period_exc_day_id": 2028,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2170,
"pedwt_period_exc_day_id": 2030,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2172,
"pedwt_period_exc_day_id": 2032,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2174,
"pedwt_period_exc_day_id": 11,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2175,
"pedwt_period_exc_day_id": 13,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2178,
"pedwt_period_exc_day_id": 2022,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2179,
"pedwt_period_exc_day_id": 14,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2184,
"pedwt_period_exc_day_id": 2021,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2188,
"pedwt_period_exc_day_id": 2031,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2189,
"pedwt_period_exc_day_id": 2029,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2194,
"pedwt_period_exc_day_id": 2034,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2200,
"pedwt_period_exc_day_id": 2037,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2202,
"pedwt_period_exc_day_id": 2038,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2226,
"pedwt_period_exc_day_id": 2016,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2245,
"pedwt_period_exc_day_id": 2035,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2246,
"pedwt_period_exc_day_id": 2036,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2249,
"pedwt_period_exc_day_id": 2050,
"pedwt_time_from": "08:00:00",
"pedwt_time_to": "16:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2250,
"pedwt_period_exc_day_id": 2051,
"pedwt_time_from": "08:00:00",
"pedwt_time_to": "16:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2251,
"pedwt_period_exc_day_id": 2052,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2252,
"pedwt_period_exc_day_id": 2053,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2253,
"pedwt_period_exc_day_id": 2054,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2254,
"pedwt_period_exc_day_id": 2055,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2255,
"pedwt_period_exc_day_id": 2056,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2256,
"pedwt_period_exc_day_id": 2057,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2257,
"pedwt_period_exc_day_id": 2058,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2258,
"pedwt_period_exc_day_id": 2059,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
},
{
"pedwt_id": 2259,
"pedwt_period_exc_day_id": 2060,
"pedwt_time_from": "00:00:00",
"pedwt_time_to": "00:00:00",
"pedwt_price": 0
}
],
"SpecialDays": [
{
"ped_id": 11,
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2023-12-08",
"ped_date_end": "2023-12-08",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 13,
"ped_label": "Christtag",
"ped_date_start": "2023-12-25",
"ped_date_end": "2023-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 14,
"ped_label": "Stefanitag",
"ped_date_start": "2023-12-26",
"ped_date_end": "2023-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2016,
"ped_label": "Neujahr",
"ped_date_start": "2024-01-01",
"ped_date_end": "2024-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2021,
"ped_label": "Heilig Drei Koenige",
"ped_date_start": "2024-01-06",
"ped_date_end": "2024-01-06",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2022,
"ped_label": "Ostermontag",
"ped_date_start": "2024-01-04",
"ped_date_end": "2024-01-04",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2024,
"ped_label": "Staatsfeiertag",
"ped_date_start": "2024-05-01",
"ped_date_end": "2024-05-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2025,
"ped_label": "Christi Himmelfahrt",
"ped_date_start": "2024-05-09",
"ped_date_end": "2024-05-09",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2026,
"ped_label": "Pfingst Montag",
"ped_date_start": "2024-05-20",
"ped_date_end": "2024-05-20",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2027,
"ped_label": "Fronleichnam",
"ped_date_start": "2024-05-30",
"ped_date_end": "2024-05-30",
"ped_period_special_day_id": 1,
"ped_year": 2024
},
{
"ped_id": 2028,
"ped_label": "Maria Himmelfahrt",
"ped_date_start": "2024-08-15",
"ped_date_end": "2024-08-15",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2029,
"ped_label": "Nationalfeiertag",
"ped_date_start": "2024-10-26",
"ped_date_end": "2024-10-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2030,
"ped_label": "Allerheiligen",
"ped_date_start": "2024-11-01",
"ped_date_end": "2024-11-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2031,
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2024-08-12",
"ped_date_end": "2024-08-12",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2032,
"ped_label": "Christtag",
"ped_date_start": "2024-12-25",
"ped_date_end": "2024-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2034,
"ped_label": "Stefanitag",
"ped_date_start": "2024-12-26",
"ped_date_end": "2024-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2035,
"ped_label": "Neujahr",
"ped_date_start": "2025-01-01",
"ped_date_end": "2025-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2036,
"ped_label": "Heilig Drei Koenige",
"ped_date_start": "2025-06-01",
"ped_date_end": "2025-06-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2037,
"ped_label": "Ostermontag",
"ped_date_start": "2025-04-21",
"ped_date_end": "2025-04-21",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2038,
"ped_label": "Staatsfeiertag",
"ped_date_start": "2025-05-01",
"ped_date_end": "2025-05-01",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2050,
"ped_label": "Christi Himmelfahrt",
"ped_date_start": "2025-05-29",
"ped_date_end": "2025-05-29",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2051,
"ped_label": "Pfingstmontag",
"ped_date_start": "2025-06-09",
"ped_date_end": "2025-06-09",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2052,
"ped_label": "Fronlaeichnam",
"ped_date_start": "2025-06-19",
"ped_date_end": "2025-06-19",
"ped_period_special_day_id": 1,
"ped_year": 2025
},
{
"ped_id": 2053,
"ped_label": "Mariae Himmelfahrt",
"ped_date_start": "2025-08-15",
"ped_date_end": "2025-08-15",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2054,
"ped_label": "Nationalfeiertag",
"ped_date_start": "2025-10-26",
"ped_date_end": "2025-10-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2055,
"ped_label": "Allerheiligen",
"ped_date_start": "2025-11-01",
"ped_date_end": "2025-11-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2056,
"ped_label": "Mariae Empfaengnis",
"ped_date_start": "2025-12-08",
"ped_date_end": "2025-12-08",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2057,
"ped_label": "Christtag",
"ped_date_start": "2025-12-25",
"ped_date_end": "2025-12-25",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2058,
"ped_label": "Stefanitag",
"ped_date_start": "2025-12-26",
"ped_date_end": "2025-12-26",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2059,
"ped_label": "Neujahr",
"ped_date_start": "2026-01-01",
"ped_date_end": "2026-01-01",
"ped_period_special_day_id": 1,
"ped_year": 0
},
{
"ped_id": 2060,
"ped_label": "Heilige Drei Koenige",
"ped_date_start": "2026-01-06",
"ped_date_end": "2026-01-06",
"ped_period_special_day_id": 1,
"ped_year": 0
}
],
"PeriodYear": [
{
"pye_id": 8,