diff --git a/library/include/mobilisis/calculate_price.h b/library/include/mobilisis/calculate_price.h index fabd009..8b4475b 100644 --- a/library/include/mobilisis/calculate_price.h +++ b/library/include/mobilisis/calculate_price.h @@ -137,6 +137,11 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket( parking_tariff_t *tariff, QString const &start_parking_time, uint8_t paymentMethod); + +CalcState CALCULATE_LIBRARY_API compute_duration_for_24hour_daily_ticket( + parking_tariff_t *tariff, + QString const &start_parking_time, + uint8_t paymentMethod); //#ifdef __cplusplus //} // extern "C" //#endif diff --git a/library/include/mobilisis/calculator_functions.h b/library/include/mobilisis/calculator_functions.h index 33c0514..664892f 100644 --- a/library/include/mobilisis/calculator_functions.h +++ b/library/include/mobilisis/calculator_functions.h @@ -29,4 +29,7 @@ public: // Daily ticket QString GetDailyTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over); + + // 24-hour daily ticket + QString Get24HourTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over); }; diff --git a/library/include/mobilisis/payment_opt.h b/library/include/mobilisis/payment_opt.h index 0655755..4a35969 100644 --- a/library/include/mobilisis/payment_opt.h +++ b/library/include/mobilisis/payment_opt.h @@ -15,4 +15,5 @@ public: double pop_min_price; int pop_carry_over; int pop_daily_card_price; + int pop_multi_hour_price; }; diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index 66103fd..99fe57e 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -284,3 +284,12 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket(parking_tariff return calcState.set(CalcState::State::SUCCESS); } +CalcState CALCULATE_LIBRARY_API compute_duration_for_24hour_daily_ticket(parking_tariff_t *tariff, QString const &start_parking_time,uint8_t paymentMethod) +{ + CalcState calcState; + QString result = calculator.Get24HourTicketDuration(tariff, start_parking_time, PaymentOption::Option1,false); + qDebug() << "24HourDailyTicket() => " + result; + + return calcState.set(CalcState::State::SUCCESS); +} + diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 8fdef0d..a2395d5 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -10,6 +10,7 @@ double total_duration_min = 0.0f; double total_cost = 0.0f; bool overtime = false; +int protection_counter = 0; #ifdef _WIN32 inline struct tm* localtime_r(const time_t *clock, struct tm* result){ @@ -19,6 +20,41 @@ inline struct tm* localtime_r(const time_t *clock, struct tm* result){ } #endif +QString Calculator::Get24HourTicketDuration(Configuration *cfg, QString start_datetime, uint8_t payment_option, bool carry_over) +{ + if(start_datetime.isNull() || start_datetime.isEmpty()) return "Invalid date-time"; + protection_counter = 0; + + double day_price = 0.0f; + int current_special_day_id = -1; + + QDateTime inputDateTime = QDateTime::fromString(start_datetime, Qt::ISODate); + QTime worktime_from; + QTime worktime_to; + + int daily_24hour_card_price = cfg->PaymentOption.find(payment_option)->second.pop_multi_hour_price; + if(daily_24hour_card_price <= 0) return "24-hour daily ticket: price zero or less"; + + bool is_special_day = Utilities::CheckSpecialDay(cfg, start_datetime.toStdString().c_str(), ¤t_special_day_id, &day_price); + + if(is_special_day) + { + worktime_from = QTime::fromString(cfg->SpecialDaysWorktime.find(current_special_day_id)->second.pedwt_time_from.c_str(), Qt::ISODate); + worktime_to = QTime::fromString(cfg->SpecialDaysWorktime.find(current_special_day_id)->second.pedwt_time_to.c_str(),Qt::ISODate); + return "24-hour ticket cannot be bought on special day"; + } + + // Check next special day + inputDateTime = inputDateTime.addSecs(86400); + while(Utilities::CheckSpecialDay(cfg, inputDateTime.toString(Qt::ISODate).toLocal8Bit(), ¤t_special_day_id, &day_price)) + { + protection_counter++; + if(protection_counter >=7) return NULL; + inputDateTime = inputDateTime.addSecs(86400); + } + return inputDateTime.toString(Qt::ISODate) + ", price = " + to_string(daily_24hour_card_price).c_str(); +} + QString Calculator::GetDailyTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over) { if(start_datetime.isNull() || start_datetime.isEmpty()) return NULL; @@ -113,6 +149,7 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, bool nextDay, bool prepaid) { + // Get input date QDateTime inputDate = QDateTime::fromString(start_datetime,Qt::ISODate); @@ -201,7 +238,10 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, if (price_per_unit < 0) price_per_unit = 1.0f; - if((price/price_per_unit) < minMin) return "PARKING NOT ALLOWED"; + // Commented on 07.06.2023 + //if((price/price_per_unit) < minMin) + // return "PARKING NOT ALLOWED"; + LOG_DEBUG("Calculated price per minute: ", price_per_unit); if (price_per_unit < 0) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index ea5f587..8b88cb3 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -155,6 +155,7 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) else if (strcmp(inner_obj_name, "pop_min_price") == 0) PaymentOption.pop_min_price = k->value.GetDouble(); else if (strcmp(inner_obj_name, "pop_carry_over") == 0) PaymentOption.pop_carry_over = k->value.GetInt(); else if (strcmp(inner_obj_name, "pop_daily_card_price") == 0) PaymentOption.pop_daily_card_price = k->value.GetInt(); + else if (strcmp(inner_obj_name, "pop_multi_hour_price") == 0) PaymentOption.pop_multi_hour_price = k->value.GetInt(); break; case MemberType::DurationType: if (strcmp(inner_obj_name, "pun_id") == 0) Duration.pun_id = k->value.GetInt(); diff --git a/main/main.cpp b/main/main.cpp index 0952851..4a8811f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -29,30 +29,32 @@ extern "C" char* strptime(const char* s, int main() { parking_tariff_t *tariff = 0; - if (init_tariff(&tariff, "C:\\Users\\MROD\\Documents\\QtCreator\\build-MOBILISIS-Calculator-Desktop_Qt_5_12_12_MSVC2017_32bit-Debug\\main\\etc\\psa_tariff\\zone1.json")) + if (init_tariff(&tariff, "C:\\Users\\MROD\\Documents\\QtCreator\\Old\\build-MOBILISIS-Calculator-Desktop_Qt_5_12_12_MSVC2017_32bit-Debug\\main\\etc\\psa_tariff\\tariff01.json")) { struct price_t price; memset(&price, 0x00, sizeof(price)); - QDateTime start = QDateTime::fromString("2023-05-11T07:50:00",Qt::ISODate); //QDateTime::currentDateTime(); + QDateTime start = QDateTime::fromString("2023-06-02T13:03:00.000Z",Qt::ISODate); //QDateTime::currentDateTime(); time_t start_parking_time = start.toSecsSinceEpoch() / 60; - time_t end_parking_time = start_parking_time + 615; + time_t end_parking_time = start_parking_time + 1230; - if (compute_price_for_parking_ticket(tariff, - start_parking_time, - end_parking_time, - &price)) - { - qDebug() << "GetCostFromDuration() => price=" << price.netto; - } +// if (compute_price_for_parking_ticket(tariff, +// start_parking_time, +// end_parking_time, +// &price)) +// { +// qDebug() << "GetCostFromDuration() => price=" << price.netto; +// } - QString duration; - if(compute_duration_for_parking_ticket(tariff,start_parking_time,3090,duration)) - { - qDebug() << "GetDurationFromCost() => duration=" << duration; - } +// QString duration; +// if(compute_duration_for_parking_ticket(tariff,start_parking_time,1650,duration)) +// { +// qDebug() << "GetDurationFromCost() => duration=" << duration; +// } // Daily ticket - compute_duration_for_daily_ticket(tariff,start.toString(Qt::ISODate),3); +// compute_duration_for_daily_ticket(tariff,start.toString(Qt::ISODate),3); + + compute_duration_for_24hour_daily_ticket(tariff,start.toString(Qt::ISODate),3); //Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over // // tests diff --git a/tariffs/tariff01.json b/tariffs/tariff01.json index 3500620..2ee41de 100644 --- a/tariffs/tariff01.json +++ b/tariffs/tariff01.json @@ -1 +1,807 @@ -{"Currency":[{"pcu_id":2,"pcu_sign":"Ft","pcu_major":"HUF","pcu_minor":"","pcu_active":true}],"PaymentMethod":[{"pme_id":1,"pme_label":"progressive"},{"pme_id":2,"pme_label":"degressive"},{"pme_id":3,"pme_label":"linear"},{"pme_id":4,"pme_label":"steps"}],"PaymentOption":[{"pop_id":17,"pop_label":"Zone 1","pop_payment_method_id":3,"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":240,"pop_min_price":55,"pop_carry_over":1}],"PaymentRate":[{"pra_payment_option_id":17,"pra_payment_unit_id":3,"pra_price":220}],"Duration":[{"pun_id":1,"pun_label":"1h","pun_duration":60},{"pun_id":2,"pun_label":"1 min","pun_duration":1},{"pun_id":3,"pun_label":"15 min","pun_duration":15},{"pun_id":4,"pun_label":"1d","pun_duration":1440},{"pun_id":6,"pun_label":"2h","pun_duration":120},{"pun_id":7,"pun_label":"3h","pun_duration":180},{"pun_id":11,"pun_label":"4h","pun_duration":240},{"pun_id":17,"pun_label":"30 min","pun_duration":30},{"pun_id":18,"pun_label":"1.5h","pun_duration":90},{"pun_id":20,"pun_label":"10min","pun_duration":10}],"WeekDaysWorktime":[{"pwd_id":540,"pwd_period_week_day_id":32,"pwd_period_day_in_week_id":1,"pwd_time_from":"08:00:00","pwd_time_to":"18:00:00"},{"pwd_id":541,"pwd_period_week_day_id":32,"pwd_period_day_in_week_id":2,"pwd_time_from":"08:00:00","pwd_time_to":"18:00:00"},{"pwd_id":542,"pwd_period_week_day_id":32,"pwd_period_day_in_week_id":3,"pwd_time_from":"08:00:00","pwd_time_to":"18:00:00"},{"pwd_id":543,"pwd_period_week_day_id":32,"pwd_period_day_in_week_id":4,"pwd_time_from":"08:00:00","pwd_time_to":"18:00:00"},{"pwd_id":544,"pwd_period_week_day_id":32,"pwd_period_day_in_week_id":5,"pwd_time_from":"08:00:00","pwd_time_to":"18:00:00"}],"PeriodYear":[{"pye_id":1,"pye_label":"Summer","pye_start_month":6,"pye_start_day":1,"pye_end_month":9,"pye_end_day":30},{"pye_id":2,"pye_label":"Winter","pye_start_month":10,"pye_start_day":1,"pye_end_month":5,"pye_end_day":31},{"pye_id":8,"pye_label":"Whole year","pye_start_month":1,"pye_start_day":1,"pye_end_month":12,"pye_end_day":31}],"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":2180,"pedwt_period_exc_day_id":2017,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2181,"pedwt_period_exc_day_id":2018,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2182,"pedwt_period_exc_day_id":2019,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2183,"pedwt_period_exc_day_id":2020,"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":2185,"pedwt_period_exc_day_id":2023,"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":2196,"pedwt_period_exc_day_id":2035,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2198,"pedwt_period_exc_day_id":2036,"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":2219,"pedwt_period_exc_day_id":2041,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2220,"pedwt_period_exc_day_id":2042,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2221,"pedwt_period_exc_day_id":2043,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2222,"pedwt_period_exc_day_id":2044,"pedwt_time_from":"00:00:00","pedwt_time_to":"00:00:00","pedwt_price":0},{"pedwt_id":2223,"pedwt_period_exc_day_id":2045,"pedwt_time_from":"00:00:00","pedwt_time_to":"01:00:00","pedwt_price":0},{"pedwt_id":2224,"pedwt_period_exc_day_id":2046,"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}],"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_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_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_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_year":0},{"ped_id":2017,"ped_label":"Holiday (Hungary)","ped_date_start":"2022-12-27","ped_date_end":"2022-12-27","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2018,"ped_label":"Holiday (Hungary)","ped_date_start":"2022-12-28","ped_date_end":"2022-12-28","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2019,"ped_label":"Holiday (Hungary)","ped_date_start":"2022-12-29","ped_date_end":"2022-12-29","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2020,"ped_label":"Holiday (Hungary)","ped_date_start":"2022-12-30","ped_date_end":"2022-12-30","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_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_id":2023,"ped_label":"Holiday (Hungary)","ped_date_start":"2023-01-02","ped_date_end":"2023-01-02","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_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_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_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_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_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_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_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_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_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_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":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":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_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_id":2041,"ped_label":"Holiday (Hungary)","ped_date_start":"2024-12-27","ped_date_end":"2024-12-27","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2042,"ped_label":"Holiday (Hungary)","ped_date_start":"2024-12-28","ped_date_end":"2024-12-28","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2043,"ped_label":"Holiday (Hungary)","ped_date_start":"2024-12-29","ped_date_end":"2024-12-29","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2044,"ped_label":"Holiday (Hungary)","ped_date_start":"2024-12-30","ped_date_end":"2024-12-30","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2045,"ped_label":"Holiday (Hungary)","ped_date_start":"2024-12-31","ped_date_end":"2024-12-31","ped_period_special_day_id":1,"ped_year":0},{"ped_id":2046,"ped_label":"Holiday (Hungary)","ped_date_start":"2025-01-02","ped_date_end":"2025-01-02","ped_period_special_day_id":1,"ped_year":2025}]} +{ + "Currency": [ + { + "pcu_id": 2, + "pcu_sign": "Ft", + "pcu_major": "HUF", + "pcu_minor": "", + "pcu_active": true + } + ], + "PaymentMethod": [ + { + "pme_id": 1, + "pme_label": "progressive" + }, + { + "pme_id": 2, + "pme_label": "degressive" + }, + { + "pme_id": 3, + "pme_label": "linear" + }, + { + "pme_id": 4, + "pme_label": "steps" + } + ], + "PaymentOption": [ + { + "pop_id": 1049, + "pop_label": "Zone Lila", + "pop_payment_method_id": 3, + "pop_day_end_time": "16:25:00", + "pop_day_night_end_time": "16:25:00", + "pop_price_night": 0, + "pop_min_time": 15, + "pop_max_time": 300, + "pop_min_price": 0, + "pop_carry_over": 1, + "pop_daily_card_price": 900, + "pop_multi_hour_price":500 + + } + ], + "PaymentRate": [ + { + "pra_payment_option_id": 1049, + "pra_payment_unit_id": 1, + "pra_price": 150 + } + ], + "Duration": [ + { + "pun_id": 1, + "pun_label": "1h", + "pun_duration": 60 + }, + { + "pun_id": 3, + "pun_label": "15 min", + "pun_duration": 15 + }, + { + "pun_id": 4, + "pun_label": "1 min", + "pun_duration": 1 + } + ], + "WeekDaysWorktime": [ + { + "pwd_id": 621, + "pwd_period_week_day_id": 36, + "pwd_period_day_in_week_id": 1, + "pwd_time_from": "08:00:00", + "pwd_time_to": "18:00:00" + }, + { + "pwd_id": 622, + "pwd_period_week_day_id": 36, + "pwd_period_day_in_week_id": 2, + "pwd_time_from": "08:00:00", + "pwd_time_to": "18:00:00" + }, + { + "pwd_id": 623, + "pwd_period_week_day_id": 36, + "pwd_period_day_in_week_id": 3, + "pwd_time_from": "08:00:00", + "pwd_time_to": "18:00:00" + }, + { + "pwd_id": 624, + "pwd_period_week_day_id": 36, + "pwd_period_day_in_week_id": 4, + "pwd_time_from": "08:00:00", + "pwd_time_to": "18:00:00" + }, + { + "pwd_id": 625, + "pwd_period_week_day_id": 36, + "pwd_period_day_in_week_id": 5, + "pwd_time_from": "08: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 + } + ], + "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 + }, + { + "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_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_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_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_year": 0 + }, + { + "ped_id": 2021, + "ped_label": "Holiday (Hungary)", + "ped_date_start": "2022-12-31", + "ped_date_end": "2022-12-31", + "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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_id": 2050, + "ped_label": "Uskrs", + "ped_date_start": "2023-04-16", + "ped_date_end": "2023-04-16", + "ped_period_special_day_id": 1, + "ped_year": 0 + }, + { + "ped_id": 2051, + "ped_label": "Uskrs", + "ped_date_start": "2023-04-16", + "ped_date_end": "2023-04-16", + "ped_period_special_day_id": 1, + "ped_year": 0 + }, + { + "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_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_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_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_year": 0 + }, + { + "ped_id": 2056, + "ped_label": "Holiday (Hungary)", + "ped_date_start": "2022-12-31", + "ped_date_end": "2022-12-31", + "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_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_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_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_year": 0 + }, + { + "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 + } + ] +}