Compare commits
	
		
			9 Commits
		
	
	
		
			2.3.99-17
			...
			fuchs-mueh
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						96aad6b797
	
				 | 
					
					
						|||
| 648799629a | |||
| 84e2530767 | |||
| ceb78772dd | |||
| 675ba60733 | |||
| d86a688836 | |||
| 171b23eebb | |||
| ae9a54bf02 | |||
| 84e61844ab | 
@@ -1,6 +1,7 @@
 | 
				
			|||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <QDebug>
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					#include <QDateTime>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ATBDuration
 | 
					class ATBDuration
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -16,7 +17,10 @@ public:
 | 
				
			|||||||
      , pun_netto(false)
 | 
					      , pun_netto(false)
 | 
				
			||||||
      , pun_brutto(false)
 | 
					      , pun_brutto(false)
 | 
				
			||||||
      , pun_fixed(false)
 | 
					      , pun_fixed(false)
 | 
				
			||||||
      , pun_requires_change(false)
 | 
					      , pun_mutable(false)
 | 
				
			||||||
 | 
					      , pun_round_to_next_24h_boundary(false)
 | 
				
			||||||
 | 
					      , pun_round_to_prev_24h_boundary(false)
 | 
				
			||||||
 | 
					      , pun_align_with_timepoint(QDateTime())
 | 
				
			||||||
      , pun_next_step_correction(0) {
 | 
					      , pun_next_step_correction(0) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -30,11 +34,14 @@ public:
 | 
				
			|||||||
            << "            pun_duration_saved: " << td.pun_duration_saved << "\n"
 | 
					            << "            pun_duration_saved: " << td.pun_duration_saved << "\n"
 | 
				
			||||||
            << "              pun_duration_min: " << td.pun_duration_min << "\n"
 | 
					            << "              pun_duration_min: " << td.pun_duration_min << "\n"
 | 
				
			||||||
            << "              pun_duration_max: " << td.pun_duration_max << "\n"
 | 
					            << "              pun_duration_max: " << td.pun_duration_max << "\n"
 | 
				
			||||||
 | 
					            << "          pun_interpolation_id: " << td.pun_interpolation_id << "\n"
 | 
				
			||||||
            << "                     pun_netto: " << td.pun_netto << "\n"
 | 
					            << "                     pun_netto: " << td.pun_netto << "\n"
 | 
				
			||||||
            << "                    pun_brutto: " << td.pun_brutto << "\n"
 | 
					            << "                    pun_brutto: " << td.pun_brutto << "\n"
 | 
				
			||||||
            << "                     pun_fixed: " << td.pun_fixed << "\n"
 | 
					            << "                     pun_fixed: " << td.pun_fixed << "\n"
 | 
				
			||||||
            << " pun_requires_change: " << td.pun_requires_change << "\n"
 | 
					            << "                   pun_mutable: " << td.pun_mutable << "\n"
 | 
				
			||||||
            << "pun_interpolation_id: " << td.pun_interpolation_id << "\n";
 | 
					            << "pun_round_to_next_24h_boundary: " << td.pun_round_to_next_24h_boundary << "\n"
 | 
				
			||||||
 | 
					            << "pun_round_to_prev_24h_boundary: " << td.pun_round_to_prev_24h_boundary << "\n"
 | 
				
			||||||
 | 
					            << "      pun_align_with_timepoint: " << td.pun_align_with_timepoint << endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return debug;
 | 
					        return debug;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -49,6 +56,9 @@ public:
 | 
				
			|||||||
	bool pun_netto;             // the timestep expressed by this duration is a netto timestep
 | 
						bool pun_netto;             // the timestep expressed by this duration is a netto timestep
 | 
				
			||||||
	bool pun_brutto;            // the timestep expressed by this duration is a brutto timestep
 | 
						bool pun_brutto;            // the timestep expressed by this duration is a brutto timestep
 | 
				
			||||||
	bool pun_fixed;             // the value given in tariff-file is fixed (constant)
 | 
						bool pun_fixed;             // the value given in tariff-file is fixed (constant)
 | 
				
			||||||
	bool pun_requires_change;   // the value has to be changes (controlled by other parameters)
 | 
						bool pun_mutable;           // the value could change
 | 
				
			||||||
 | 
						bool pun_round_to_next_24h_boundary;
 | 
				
			||||||
 | 
						bool pun_round_to_prev_24h_boundary;
 | 
				
			||||||
 | 
						QDateTime pun_align_with_timepoint;
 | 
				
			||||||
	int pun_next_step_correction;
 | 
						int pun_next_step_correction;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -923,12 +923,15 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
 | 
				
			|||||||
    bool const nextDay = false;
 | 
					    bool const nextDay = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // DEBUG
 | 
					    // DEBUG
 | 
				
			||||||
    if (DBG_LEVEL >= DBG_DEBUG) {
 | 
					    // if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
        qCritical() << "compute_duration_for_parking_ticket(2): ";
 | 
					        qCritical() << "\ncompute_duration_for_parking_ticket(2):";
 | 
				
			||||||
 | 
					        qCritical() << "                              start time:" << start_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
        qCritical() << "                    payment option index:" << paymentOptionIndex;
 | 
					        qCritical() << "                    payment option index:" << paymentOptionIndex;
 | 
				
			||||||
        qCritical() << "                                 prepaid:" << prepaid;
 | 
					        qCritical() << "                                 prepaid:" << prepaid;
 | 
				
			||||||
        qCritical() << "                                   price:" << price;
 | 
					        qCritical() << "                                   price:" << price;
 | 
				
			||||||
    }
 | 
					        qCritical() << "                             permit type:" << permitType.toString() << endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (start_parking_time.isValid()) {
 | 
					    if (start_parking_time.isValid()) {
 | 
				
			||||||
        QString cs = start_parking_time.toString(Qt::ISODate);
 | 
					        QString cs = start_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
@@ -1009,9 +1012,10 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // DEBUG
 | 
					            // DEBUG
 | 
				
			||||||
            qCritical() << "compute_duration_for_parking_ticket(): ";
 | 
					            qCritical() << "\ncompute_duration_for_parking_ticket():";
 | 
				
			||||||
 | 
					            qCritical() << "                           start time:" << start_parking_time.toString(Qt::ISODate);
 | 
				
			||||||
            qCritical() << "                              endTime:" << endTime;
 | 
					            qCritical() << "                              endTime:" << endTime;
 | 
				
			||||||
            qCritical() << "           ticketEndTime: " << ticketEndTime;
 | 
					            qCritical() << "                        ticketEndTime:" << ticketEndTime.toString(Qt::ISODate) << endl;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        return calcState.set(CalcState::State::INVALID_START_DATE);
 | 
					        return calcState.set(CalcState::State::INVALID_START_DATE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,9 +10,12 @@
 | 
				
			|||||||
#include <sstream>
 | 
					#include <sstream>
 | 
				
			||||||
#include <algorithm>
 | 
					#include <algorithm>
 | 
				
			||||||
#include <optional>
 | 
					#include <optional>
 | 
				
			||||||
 | 
					#include <iterator>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <QDateTime>
 | 
					#include <QDateTime>
 | 
				
			||||||
#include <QScopedArrayPointer>
 | 
					#include <QScopedArrayPointer>
 | 
				
			||||||
#include <QDebug>
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					#include <QTimeZone>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
double total_duration_min = 0.0f;
 | 
					double total_duration_min = 0.0f;
 | 
				
			||||||
double total_cost = 0.0f;
 | 
					double total_cost = 0.0f;
 | 
				
			||||||
@@ -175,6 +178,9 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            for (auto[itr, rangeEnd] = cfg->PaymentRate.equal_range(pop_id); itr != rangeEnd; ++itr) {
 | 
					            for (auto[itr, rangeEnd] = cfg->PaymentRate.equal_range(pop_id); itr != rangeEnd; ++itr) {
 | 
				
			||||||
                int const pra_price = itr->second.pra_price;
 | 
					                int const pra_price = itr->second.pra_price;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // qCritical() << DBG_HEADER << "pra_price" << pra_price;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                int const durationId = itr->second.pra_payment_unit_id;
 | 
					                int const durationId = itr->second.pra_payment_unit_id;
 | 
				
			||||||
                if (pop_accumulate_prices) {
 | 
					                if (pop_accumulate_prices) {
 | 
				
			||||||
                    price += pra_price;
 | 
					                    price += pra_price;
 | 
				
			||||||
@@ -2787,27 +2793,24 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
 | 
				
			|||||||
        int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations;
 | 
					        int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        m_timeSteps[paymentOptionIndex].clear();
 | 
					        m_timeSteps[paymentOptionIndex].clear();
 | 
				
			||||||
        Configuration::TariffDurationType::iterator prev_it = cfg->Duration.end();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        start = s;
 | 
					        QDateTime const start(s.date(),
 | 
				
			||||||
        start.setTime(QTime(s.time().hour(), s.time().minute(), 0));
 | 
					                              QTime(s.time().hour(), s.time().minute(), 0),
 | 
				
			||||||
 | 
					                              s.timeZone());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // qCritical() << "(" << __func__ << ":" << __LINE__ << ") start:" << start.toString(Qt::ISODate);
 | 
					        if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					            qCritical() << "(" << __func__ << ":" << __LINE__ << ") start:" << start.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (Configuration::TariffDurationType::iterator it = cfg->Duration.begin();
 | 
					        QDateTime current(start);
 | 
				
			||||||
             it != cfg->Duration.end();
 | 
					 | 
				
			||||||
             ++it) {
 | 
					 | 
				
			||||||
            it->second.pun_duration = it->second.pun_duration_saved;
 | 
					 | 
				
			||||||
            if (it->second.pun_requires_change) {
 | 
					 | 
				
			||||||
                if (it->second.pun_netto && !it->second.pun_brutto) {
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    int weekDay = start.date().dayOfWeek();
 | 
					 | 
				
			||||||
        bool casePrepay = false;
 | 
					        bool casePrepay = false;
 | 
				
			||||||
                    if (m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
					        int const weekDay = start.date().dayOfWeek();
 | 
				
			||||||
                        // handle possible prepay-condition, which applies only
 | 
					 | 
				
			||||||
                        // for the very first step
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        int const pop_prepay_option_id = cfg->getPaymentOptions(paymentOptionIndex).pop_prepay_option_id;
 | 
					        int const pop_prepay_option_id = cfg->getPaymentOptions(paymentOptionIndex).pop_prepay_option_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // compute prepay settings
 | 
				
			||||||
 | 
					        // assumption: prepay settings the same for all days
 | 
				
			||||||
        QDateTime prepayStart(start);
 | 
					        QDateTime prepayStart(start);
 | 
				
			||||||
        QDateTime prepayEnd(start);
 | 
					        QDateTime prepayEnd(start);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2820,117 +2823,198 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
 | 
				
			|||||||
            prepayEnd = prepayEnd.addDays(1);
 | 
					            prepayEnd = prepayEnd.addDays(1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << start.toString(Qt::ISODate);
 | 
					        if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << prepayStart.toString(Qt::ISODate);
 | 
					            qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepay start" << prepayStart.toString(Qt::ISODate);
 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << prepayEnd.toString(Qt::ISODate);
 | 
					            qCritical() << "(" << __func__ << ":" << __LINE__ << ")   prepay end" << prepayEnd.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					 | 
				
			||||||
                        if (prepayStart <= start && start <= prepayEnd) {
 | 
					 | 
				
			||||||
                            it->second.pun_duration = start.secsTo(prepayEnd) / 60;
 | 
					 | 
				
			||||||
                            it->second.pun_duration += it->second.pun_duration_saved ;
 | 
					 | 
				
			||||||
                            casePrepay = true;
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        //if (start >= prepayStart && ) {
 | 
					 | 
				
			||||||
                        //    it->second.pun_duration = start.secsTo(prepayEnd) / 60;
 | 
					 | 
				
			||||||
                        //    it->second.pun_duration += it->second.pun_duration_saved ;
 | 
					 | 
				
			||||||
                        //    casePrepay = true;
 | 
					 | 
				
			||||||
                        //}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << it->second.pun_duration;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (!casePrepay) {
 | 
					        int const prepayDurationInMinutes = start.secsTo(prepayEnd) / 60;
 | 
				
			||||||
                        // handle possible carryover-condition
 | 
					
 | 
				
			||||||
 | 
					        // compute carryover settings
 | 
				
			||||||
 | 
					        // assumption: carryover settings the same for all days
 | 
				
			||||||
        int const pop_carry_over_option_id = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_option_id;
 | 
					        int const pop_carry_over_option_id = cfg->getPaymentOptions(paymentOptionIndex).pop_carry_over_option_id;
 | 
				
			||||||
        QDateTime carryOverStart(start);
 | 
					        QDateTime carryOverStart(start);
 | 
				
			||||||
        QDateTime carryOverEnd(start);
 | 
					        QDateTime carryOverEnd(start);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << carryOverStart.toString(Qt::ISODate);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        carryOverStart.setTime(cfg->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start);
 | 
					        carryOverStart.setTime(cfg->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_start);
 | 
				
			||||||
        carryOverEnd.setTime(cfg->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_end);
 | 
					        carryOverEnd.setTime(cfg->TariffCarryOverOptions.find(pop_carry_over_option_id)->second.carryover[weekDay].static_end);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        //while (carryOverStart > carryOverEnd) {
 | 
					 | 
				
			||||||
                        //    carryOverEnd = carryOverEnd.addDays(1);
 | 
					 | 
				
			||||||
                        //}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (start <= carryOverEnd) {
 | 
					        if (start <= carryOverEnd) {
 | 
				
			||||||
            carryOverStart = carryOverStart.addDays(-1);
 | 
					            carryOverStart = carryOverStart.addDays(-1);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            carryOverEnd = carryOverEnd.addDays(1);
 | 
					            carryOverEnd = carryOverEnd.addDays(1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        int durationInSecs = it->second.pun_duration_saved * 60;
 | 
					        if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					            qCritical() << "(" << __func__ << ":" << __LINE__ << ") carry over start" << carryOverStart.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					            qCritical() << "(" << __func__ << ":" << __LINE__ << ")   carry over end" << carryOverEnd.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        //qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << durationInSecs;
 | 
					        // int cnt = 0;
 | 
				
			||||||
                        //qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << start.addSecs(durationInSecs).toString(Qt::ISODate);
 | 
					 | 
				
			||||||
                        //qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << carryOverStart.toString(Qt::ISODate);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (Configuration::TariffDurationType::iterator it = cfg->Duration.begin();
 | 
				
			||||||
 | 
					             it != cfg->Duration.end();
 | 
				
			||||||
 | 
					             ++it) {
 | 
				
			||||||
            it->second.pun_duration = it->second.pun_duration_saved;
 | 
					            it->second.pun_duration = it->second.pun_duration_saved;
 | 
				
			||||||
                        if (start >= carryOverStart) {
 | 
					
 | 
				
			||||||
                            it->second.pun_duration += start.secsTo(carryOverEnd) / 60;
 | 
					            // if (++cnt > 2) continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id" << it->second.pun_id;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (it->second.pun_mutable) {
 | 
				
			||||||
 | 
					                if (it->second.pun_netto) {
 | 
				
			||||||
 | 
					                    if (it->second.pun_round_to_next_24h_boundary == false) {
 | 
				
			||||||
 | 
					                        //int weekDay = start.date().dayOfWeek();
 | 
				
			||||||
 | 
					                        if (m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
				
			||||||
 | 
					                            // handle possible prepay-condition, which applies only
 | 
				
			||||||
 | 
					                            // for the very first step
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepay start" << prepayStart.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ")   prepay end" << prepayEnd.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (prepayStart <= start && start <= prepayEnd) {
 | 
				
			||||||
 | 
					                                it->second.pun_duration = prepayDurationInMinutes;
 | 
				
			||||||
 | 
					                                it->second.pun_duration += it->second.pun_duration_saved ;
 | 
				
			||||||
 | 
					                                casePrepay = true;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << it->second.pun_duration;
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepay" << casePrepay;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if (!casePrepay) {
 | 
				
			||||||
 | 
					                            // handle possible carryover-condition
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            int const durationInSecs = it->second.pun_duration_saved * 60;
 | 
				
			||||||
 | 
					                            it->second.pun_duration = it->second.pun_duration_saved;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (current >= carryOverStart && current < carryOverEnd) {
 | 
				
			||||||
 | 
					                                it->second.pun_duration += current.secsTo(carryOverEnd) / 60;
 | 
				
			||||||
                            } else {
 | 
					                            } else {
 | 
				
			||||||
                                // start < carryOverStart
 | 
					                                // start < carryOverStart
 | 
				
			||||||
                            if (start.addSecs(durationInSecs) >= carryOverStart) {
 | 
					                                QDateTime const &newCurrent = current.addSecs(durationInSecs);
 | 
				
			||||||
 | 
					                                if (newCurrent > carryOverStart && newCurrent <= carryOverEnd) {
 | 
				
			||||||
                                    // cross carry over section
 | 
					                                    // cross carry over section
 | 
				
			||||||
                                    it->second.pun_next_step_correction = carryOverStart.secsTo(carryOverEnd) / 60;
 | 
					                                    it->second.pun_next_step_correction = carryOverStart.secsTo(carryOverEnd) / 60;
 | 
				
			||||||
                                    it->second.pun_duration += it->second.pun_next_step_correction;
 | 
					                                    it->second.pun_duration += it->second.pun_next_step_correction;
 | 
				
			||||||
                                prev_it = it;
 | 
					 | 
				
			||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
 | 
					                            // qCritical() << "(" << __func__ << ":" << __LINE__ << ")";
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        if (pop_accumulate_durations) {
 | 
					                        if (pop_accumulate_durations) {
 | 
				
			||||||
 | 
					                            m_timeSteps[paymentOptionIndex] << it->second.pun_duration;
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
                            if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
					                            if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
				
			||||||
                                int d = m_timeSteps[paymentOptionIndex].last();
 | 
					                                int d = m_timeSteps[paymentOptionIndex].last();
 | 
				
			||||||
                                m_timeSteps[paymentOptionIndex] << (d + it->second.pun_duration);
 | 
					                                m_timeSteps[paymentOptionIndex] << (d + it->second.pun_duration);
 | 
				
			||||||
                        } else {
 | 
					 | 
				
			||||||
                            m_timeSteps[paymentOptionIndex] << it->second.pun_duration;
 | 
					 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                } else {
 | 
					                        current = current.addSecs(m_timeSteps[paymentOptionIndex].last() * 60);
 | 
				
			||||||
                    qCritical() << "(" << __func__ << ":" << __LINE__ << ")"
 | 
					
 | 
				
			||||||
                                << "no change required, but set to brutto, which does not have to be changed";
 | 
					                        if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                            qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << m_timeSteps[paymentOptionIndex];
 | 
				
			||||||
 | 
					                            qCritical() << "(" << __func__ << ":" << __LINE__ << ") current" << current.toString(Qt::ISODate);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    } else { // if (it->pun_round_to_next_24h_boundary == false) {
 | 
				
			||||||
 | 
					                        if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                            qCritical() << "(" << __func__ << ":" << __LINE__ << ") round-to-next-24h-boundary";
 | 
				
			||||||
 | 
					                            qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepay" << casePrepay;
 | 
				
			||||||
 | 
					                            qCritical() << "(" << __func__ << ":" << __LINE__ << ") current" << current.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if (casePrepay) {
 | 
				
			||||||
 | 
					                            // the last time step contains the (dynamic) prepay duration
 | 
				
			||||||
 | 
					                            // so it is possible to compute the last duration
 | 
				
			||||||
 | 
					                            int lastDuration =  m_timeSteps[paymentOptionIndex].last() - prepayDurationInMinutes;
 | 
				
			||||||
 | 
					                            // qCritical() << "(" << __func__ << ":" << __LINE__ << ") last duration " << lastDuration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            int const minutesToAdd = 1440 - lastDuration;
 | 
				
			||||||
 | 
					                            current = current.addSecs(minutesToAdd * 60);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") minutes to add " << minutesToAdd;
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") current" << current.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (pop_accumulate_durations) {
 | 
				
			||||||
 | 
					                                m_timeSteps[paymentOptionIndex] << minutesToAdd;
 | 
				
			||||||
                            } else {
 | 
					                            } else {
 | 
				
			||||||
                if (it->second.pun_fixed) {     // no change required: must be true
 | 
					                                if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
				
			||||||
 | 
					                                    int d = m_timeSteps[paymentOptionIndex].last();
 | 
				
			||||||
 | 
					                                    m_timeSteps[paymentOptionIndex] << (d + minutesToAdd);
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            // qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << m_timeSteps[paymentOptionIndex];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            casePrepay = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        } else {
 | 
				
			||||||
 | 
					                            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id" << it->second.pun_id;
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") current" << current.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_duration" << it->second.pun_duration;
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            int secs = s.secsTo(current);
 | 
				
			||||||
 | 
					                            int const dayInSecs = 1440 * 60;
 | 
				
			||||||
 | 
					                            int const rest = secs % dayInSecs;
 | 
				
			||||||
 | 
					                            int const minutesToAdd = (dayInSecs - rest) / 60;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            current = current.addSecs(minutesToAdd * 60);
 | 
				
			||||||
 | 
					                            it->second.pun_duration = minutesToAdd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") minutes to add " << minutesToAdd;
 | 
				
			||||||
 | 
					                                qCritical() << "(" << __func__ << ":" << __LINE__ << ") current" << current.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                            if (pop_accumulate_durations) {
 | 
				
			||||||
 | 
					                                m_timeSteps[paymentOptionIndex] << minutesToAdd;
 | 
				
			||||||
 | 
					                            } else {
 | 
				
			||||||
 | 
					                                if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
				
			||||||
 | 
					                                    int d = m_timeSteps[paymentOptionIndex].last();
 | 
				
			||||||
 | 
					                                    m_timeSteps[paymentOptionIndex] << (d + minutesToAdd);
 | 
				
			||||||
 | 
					                                }
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                            // qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << m_timeSteps[paymentOptionIndex];
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } else { // if (it->second.pun_netto) {
 | 
				
			||||||
 | 
					                    qCritical() << "(" << __func__ << ":" << __LINE__ << ") TODO";
 | 
				
			||||||
 | 
					                    qCritical() << "(" << __func__ << ":" << __LINE__ << ")\n" << it->second;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            } else { // mutable == false
 | 
				
			||||||
                if (it->second.pun_brutto) {    // no handling for prepay and carry-over
 | 
					                if (it->second.pun_brutto) {    // no handling for prepay and carry-over
 | 
				
			||||||
                    if (pop_accumulate_durations) {
 | 
					                    if (pop_accumulate_durations) {
 | 
				
			||||||
                            int correction = 0;
 | 
					                        m_timeSteps[paymentOptionIndex] << it->second.pun_duration;
 | 
				
			||||||
                            if (prev_it != cfg->Duration.end()) {
 | 
					                    } else {
 | 
				
			||||||
                                correction = prev_it->second.pun_next_step_correction;
 | 
					 | 
				
			||||||
                                prev_it->second.pun_next_step_correction = 0;
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
					                        if (!m_timeSteps[paymentOptionIndex].isEmpty()) {
 | 
				
			||||||
                            int d = m_timeSteps[paymentOptionIndex].last();
 | 
					                            int d = m_timeSteps[paymentOptionIndex].last();
 | 
				
			||||||
                                it->second.pun_duration -= correction;
 | 
					 | 
				
			||||||
                            m_timeSteps[paymentOptionIndex] << (d + it->second.pun_duration);
 | 
					                            m_timeSteps[paymentOptionIndex] << (d + it->second.pun_duration);
 | 
				
			||||||
                            } else {
 | 
					 | 
				
			||||||
                                it->second.pun_duration -= correction;
 | 
					 | 
				
			||||||
                                m_timeSteps[paymentOptionIndex] << it->second.pun_duration;
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    } else
 | 
					 | 
				
			||||||
                    if (it->second.pun_netto) {
 | 
					 | 
				
			||||||
                        qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << "TODO";
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << "fixed is false, but no change required";
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0
 | 
					                    // qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << m_timeSteps[paymentOptionIndex];
 | 
				
			||||||
        for (int i = 0; i < m_timeSteps[paymentOptionIndex].size(); ++i) {
 | 
					 | 
				
			||||||
            QDateTime nextTime = start;
 | 
					 | 
				
			||||||
            // nextTime.setTime(QTime(0, 0, 0));
 | 
					 | 
				
			||||||
            int const secs = m_timeSteps[paymentOptionIndex][i] * 60;
 | 
					 | 
				
			||||||
            nextTime = nextTime.addSecs(secs);
 | 
					 | 
				
			||||||
            qCritical() << "(" << __func__ << ":" << __LINE__ << ") step"
 | 
					 | 
				
			||||||
                        << i << secs << m_timeSteps[0][i] << "->" << nextTime.toString(Qt::ISODate);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    qCritical() << "(" << __func__ << ":" << __LINE__ << ") TODO";
 | 
				
			||||||
 | 
					                    qCritical() << "(" << __func__ << ":" << __LINE__ << ")\n" << it->second;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        qCritical() << "(" << __func__ << ":" << __LINE__ << ") payment option time step config:" << "TimeStepConfig::STATIC";
 | 
					        qCritical() << "(" << __func__ << ":" << __LINE__ << ") payment option time step config:" << "TimeStepConfig::STATIC";
 | 
				
			||||||
@@ -2953,10 +3037,9 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
 | 
				
			|||||||
    //qCritical() << "(" << __func__ << ":" << __LINE__ << ")                   NEW timeSteps:" << m_timeSteps;
 | 
					    //qCritical() << "(" << __func__ << ":" << __LINE__ << ")                   NEW timeSteps:" << m_timeSteps;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (DBG_LEVEL >= DBG_DEBUG) {
 | 
					    if (DBG_LEVEL >= DBG_DEBUG) {
 | 
				
			||||||
        qCritical() << "(" << __func__ << ":" << __LINE__ << ")                   NEW timeSteps:" << m_timeSteps;
 | 
					        QDateTime nextTime(s);
 | 
				
			||||||
 | 
					        qCritical() << "(" << __func__ << ":" << __LINE__ << ") start" << nextTime.toString(Qt::ISODate);
 | 
				
			||||||
        for (int i = 0; i < m_timeSteps[paymentOptionIndex].size(); ++i) {
 | 
					        for (int i = 0; i < m_timeSteps[paymentOptionIndex].size(); ++i) {
 | 
				
			||||||
            QDateTime nextTime = s;
 | 
					 | 
				
			||||||
            // nextTime.setTime(QTime(0, 0, 0));
 | 
					            // nextTime.setTime(QTime(0, 0, 0));
 | 
				
			||||||
            int const secs = m_timeSteps[paymentOptionIndex][i] * 60;
 | 
					            int const secs = m_timeSteps[paymentOptionIndex][i] * 60;
 | 
				
			||||||
            nextTime = nextTime.addSecs(secs);
 | 
					            nextTime = nextTime.addSecs(secs);
 | 
				
			||||||
@@ -2983,7 +3066,7 @@ uint32_t Calculator::GetPriceForTimeStep(Configuration *cfg, int timeStep, int p
 | 
				
			|||||||
    uint32_t price = 0;
 | 
					    uint32_t price = 0;
 | 
				
			||||||
    int pun_duration = 0;
 | 
					    int pun_duration = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    qCritical() << "(" << __func__ << ":" << __LINE__ << ") paymentOptionIndex" << paymentOptionIndex;
 | 
					    //qCritical() << "(" << __func__ << ":" << __LINE__ << ") paymentOptionIndex" << paymentOptionIndex;
 | 
				
			||||||
    //qCritical() << "(" << __func__ << ":" << __LINE__ << ") timeStep" << timeStep;
 | 
					    //qCritical() << "(" << __func__ << ":" << __LINE__ << ") timeStep" << timeStep;
 | 
				
			||||||
    //qCritical() << "(" << __func__ << ":" << __LINE__ << ") pop_id" << pop_id;
 | 
					    //qCritical() << "(" << __func__ << ":" << __LINE__ << ") pop_id" << pop_id;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
 | 
				
			|||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            qCritical() << " -" << mb_name;
 | 
					            // qCritical() << " -" << mb_name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Get array for each JSON object member
 | 
					            // Get array for each JSON object member
 | 
				
			||||||
            auto mb_array = document[mb_name].GetArray();
 | 
					            auto mb_array = document[mb_name].GetArray();
 | 
				
			||||||
@@ -797,9 +797,25 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
 | 
				
			|||||||
                                Duration.pun_fixed = k->value.GetBool();
 | 
					                                Duration.pun_fixed = k->value.GetBool();
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        else if (strcmp(inner_obj_name, "pun_requires_change") == 0) {
 | 
					                        else if (strcmp(inner_obj_name, "pun_mutable") == 0) {
 | 
				
			||||||
                            if (k->value.IsBool()) {
 | 
					                            if (k->value.IsBool()) {
 | 
				
			||||||
                                Duration.pun_requires_change = k->value.GetBool();
 | 
					                                Duration.pun_mutable = k->value.GetBool();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        else if (strcmp(inner_obj_name, "pun_round_to_next_24h_boundary") == 0) {
 | 
				
			||||||
 | 
					                            if (k->value.IsBool()) {
 | 
				
			||||||
 | 
					                                Duration.pun_round_to_next_24h_boundary = k->value.GetBool();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        else if (strcmp(inner_obj_name, "pun_round_to_prev_24h_boundary") == 0) {
 | 
				
			||||||
 | 
					                            if (k->value.IsBool()) {
 | 
				
			||||||
 | 
					                                Duration.pun_round_to_prev_24h_boundary = k->value.GetBool();
 | 
				
			||||||
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                        else if (strcmp(inner_obj_name, "pun_align_with_timepoint") == 0) {
 | 
				
			||||||
 | 
					                            if (k->value.IsString()) {
 | 
				
			||||||
 | 
					                                QDateTime const &dt = QDateTime::fromString(k->value.GetString(), Qt::ISODate);
 | 
				
			||||||
 | 
					                                Duration.pun_align_with_timepoint = dt;
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
@@ -922,7 +938,7 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json)
 | 
				
			|||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case MemberType::PrepaidOptionType:
 | 
					                case MemberType::PrepaidOptionType:
 | 
				
			||||||
                    cfg->TariffPrepayOptions.insert(pair<int, ATBPrepay>(TariffPrepayOption.id, TariffPrepayOption));
 | 
					                    cfg->TariffPrepayOptions.insert(pair<int, ATBPrepay>(TariffPrepayOption.id, TariffPrepayOption));
 | 
				
			||||||
                    qCritical() << TariffPrepayOption;
 | 
					                    //qCritical() << TariffPrepayOption;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                default:
 | 
					                default:
 | 
				
			||||||
                     break;
 | 
					                     break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -742,7 +742,13 @@ int main() {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    if (zone == 3) {
 | 
					    if (zone == 3) {
 | 
				
			||||||
        //input.open("/opt/ptu5/opt/customer_502/etc/psa_tariff/tariff03.json");
 | 
					        //input.open("/opt/ptu5/opt/customer_502/etc/psa_tariff/tariff03.json");
 | 
				
			||||||
        input.open("/home/linux/customer_502/etc/psa_tariff/tariff03.json");
 | 
					        //input.open("/home/linux/customer_502/etc/psa_tariff/tariff01.json");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // schnals
 | 
				
			||||||
 | 
					        // input.open("/opt/ptu5/opt/customer_505/etc/psa_tariff/tariff01.json");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // muehlbach
 | 
				
			||||||
 | 
					        input.open("/opt/ptu5/opt/customer_504/etc/psa_tariff/tariff01.json");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    std::stringstream sstr;
 | 
					    std::stringstream sstr;
 | 
				
			||||||
@@ -916,7 +922,9 @@ int main() {
 | 
				
			|||||||
            QDateTime end;
 | 
					            QDateTime end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            QDateTime s(QDateTime::currentDateTime());
 | 
					            QDateTime s(QDateTime::currentDateTime());
 | 
				
			||||||
            s.setTime(QTime(18, 0, 0));
 | 
					            s.setTime(QTime(10, 0, 0));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            pop_min_time = get_minimal_parkingtime(&cfg, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING), paymentOptionIndex);
 | 
					            pop_min_time = get_minimal_parkingtime(&cfg, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING), paymentOptionIndex);
 | 
				
			||||||
            pop_max_time = get_maximal_parkingtime(&cfg, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING), paymentOptionIndex);
 | 
					            pop_max_time = get_maximal_parkingtime(&cfg, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING), paymentOptionIndex);
 | 
				
			||||||
@@ -938,16 +946,18 @@ int main() {
 | 
				
			|||||||
            qCritical() << "       pop_min_price " << pop_min_price;
 | 
					            qCritical() << "       pop_min_price " << pop_min_price;
 | 
				
			||||||
            qCritical() << "       pop_max_price " << pop_max_price;
 | 
					            qCritical() << "       pop_max_price " << pop_max_price;
 | 
				
			||||||
            qCritical() << "pop_daily_card_price " << pop_daily_card_price;
 | 
					            qCritical() << "pop_daily_card_price " << pop_daily_card_price;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
            CalcState calcState;
 | 
					            CalcState calcState;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0
 | 
					#if 1
 | 
				
			||||||
            for (int i = 1; i < 11; ++i) {
 | 
					            qCritical() << "start" << s.toString(Qt::ISODate);
 | 
				
			||||||
 | 
					            //for (int i = 1; i < 11; ++i) {
 | 
				
			||||||
 | 
					            for (int i = 0; i < 21; ++i) {
 | 
				
			||||||
                calcState = compute_duration_for_parking_ticket(&cfg, s,
 | 
					                calcState = compute_duration_for_parking_ticket(&cfg, s,
 | 
				
			||||||
                                                    (double)i*200,
 | 
					                                                    (double)i*10,
 | 
				
			||||||
                                                    end, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING_PKW));
 | 
					                                                    end, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING_PKW));
 | 
				
			||||||
                qCritical() << "RUN" << i << ": start" << s.toString(Qt::ISODate)
 | 
					                qCritical() << "RUN" << i << ": start" << s.toString(Qt::ISODate)
 | 
				
			||||||
                            << ": price" << i*200 << "->" << end.toString(Qt::ISODate) << calcState.toString();
 | 
					                            << ": price" << i*10 << "->" << end.toString(Qt::ISODate) << calcState.toString();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
            struct price_t price;
 | 
					            struct price_t price;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user