private_GetDurationFromCost():

remove superfluous check if there are special days listed in
json-tariff-file.
This commit is contained in:
Gerhard Hoffmann 2023-12-12 10:56:58 +01:00
parent ba3dfcd3d6
commit c8218bd7af

View File

@ -508,21 +508,6 @@ Ticket Calculator::private_GetDurationFromCost(Configuration *cfg,
// Get input date // Get input date
QDateTime current = start; 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, cost);
uint64_t const durationSeconds = durationMinutes * 60;
current = current.addSecs(durationSeconds);
return
Ticket(start, current, durationMinutes, durationMinutes,
cost, Ticket::s[VALID]);
}
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg); static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
static const bool carryOverNotSet = isCarryOverNotSet(cfg, paymentMethodId); static const bool carryOverNotSet = isCarryOverNotSet(cfg, paymentMethodId);
static const uint32_t minParkingTimeMinutes = std::max(getMinimalParkingTime(cfg, paymentMethodId), 0); static const uint32_t minParkingTimeMinutes = std::max(getMinimalParkingTime(cfg, paymentMethodId), 0);