Add methods for PaymentMethod::Steps
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <iostream>
|
||||
#include "configuration.h"
|
||||
#include "payment_method.h"
|
||||
#include <QDateTime>
|
||||
using namespace std;
|
||||
|
||||
@@ -30,4 +31,19 @@ public:
|
||||
|
||||
// Daily ticket
|
||||
QDateTime GetDailyTicketDuration(Configuration* cfg, const QDateTime start_datetime, uint8_t payment_option, bool carry_over);
|
||||
|
||||
|
||||
private:
|
||||
// Introduced for PaymentMethod::Steps (e.g. Schoenau)
|
||||
// For tariff of following structure: only steps, no special days, nonstop.
|
||||
uint32_t GetCostFromDuration(Configuration const* cfg, QDateTime const &start, quint64 durationMinutes, uint8_t paymentMethod = PaymentMethod::Steps);
|
||||
uint32_t GetCostFromDuration(Configuration const* cfg, QDateTime const &start, QDateTime const &end, uint8_t paymentMethod = PaymentMethod::Steps);
|
||||
|
||||
|
||||
//
|
||||
// helper functions for PaymentMethod::Steps
|
||||
//
|
||||
QList<int> GetTimeSteps(Configuration const *cfg, int paymentMethod);
|
||||
//
|
||||
uint32_t GetPriceForTimeStep(Configuration const *cfg, uint8_t paymentMethod, int timeStep);
|
||||
};
|
||||
|
Reference in New Issue
Block a user