GetDurationFromCost():
Minor: removed some debug ouput
This commit is contained in:
		@@ -135,14 +135,20 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
 | 
			
		||||
    static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
 | 
			
		||||
    int const paymentOptionIndex = cfg->getPaymentOptionIndex(permitType.get());
 | 
			
		||||
 | 
			
		||||
    qCritical() << DBG_HEADER << "          start:" << inputDate.toString(Qt::ISODate);
 | 
			
		||||
    qCritical() << DBG_HEADER << "   option index:" << paymentOptionIndex;
 | 
			
		||||
    qCritical() << DBG_HEADER << "paymentMethodId:" << static_cast<int>(paymentMethodId);
 | 
			
		||||
    qCritical() << DBG_HEADER << "        prepaid:" << prepaid;
 | 
			
		||||
    qCritical() << DBG_HEADER << "   cost (price):" << cost;
 | 
			
		||||
    if (DBG_LEVEL >= DBG_DEBUG) {
 | 
			
		||||
        qCritical() << DBG_HEADER << "          start:" << inputDate.toString(Qt::ISODate);
 | 
			
		||||
        qCritical() << DBG_HEADER << "   option index:" << paymentOptionIndex;
 | 
			
		||||
        qCritical() << DBG_HEADER << "paymentMethodId:" << static_cast<int>(paymentMethodId);
 | 
			
		||||
        qCritical() << DBG_HEADER << "        prepaid:" << prepaid;
 | 
			
		||||
        qCritical() << DBG_HEADER << "   cost (price):" << cost;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    QList<int> tsteps = Calculator::GetInstance().GetTimeSteps(cfg, paymentOptionIndex, inputDate);
 | 
			
		||||
    qCritical() << DBG_HEADER << "     time steps:" << tsteps;
 | 
			
		||||
    if (DBG_LEVEL >= DBG_DEBUG) {
 | 
			
		||||
        qCritical() << DBG_HEADER << "     time steps:" << tsteps;
 | 
			
		||||
    } else {
 | 
			
		||||
        Q_UNUSED(tsteps);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (paymentMethodId == PaymentMethod::Degressive) {
 | 
			
		||||
 | 
			
		||||
@@ -287,6 +293,9 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
 | 
			
		||||
                        QTime pwd_time_from = QTime::fromString(QString::fromStdString(iter->second.pwd_time_from), Qt::ISODate);
 | 
			
		||||
                        QTime pwd_time_to = QTime::fromString(QString::fromStdString(iter->second.pwd_time_to), Qt::ISODate);
 | 
			
		||||
 | 
			
		||||
                        //qCritical() << DBG_HEADER << "from" << pwd_time_from.toString(Qt::ISODate);
 | 
			
		||||
                        //qCritical() << DBG_HEADER << "  to" << pwd_time_to.toString(Qt::ISODate);
 | 
			
		||||
 | 
			
		||||
                        if (inputDate.time() < pwd_time_from) {
 | 
			
		||||
                            inputDate.setTime(pwd_time_from);
 | 
			
		||||
                            useWeekDaysWorkTimeOfOtherDay = false;
 | 
			
		||||
@@ -465,6 +474,7 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg,
 | 
			
		||||
                                                    QTime pwd_time_from = QTime::fromString(QString::fromStdString(iter->second.pwd_time_from), Qt::ISODate);
 | 
			
		||||
                                                    if (next_working_time_from < pwd_time_from) {
 | 
			
		||||
                                                        next_working_time_from = pwd_time_from;
 | 
			
		||||
                                                        qCritical() << DBG_HEADER << "next working time from" << next_working_time_from.toString(Qt::ISODate);
 | 
			
		||||
                                                        break;
 | 
			
		||||
                                                    }
 | 
			
		||||
                                                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user