Add getPaymentOptionIndexIfSpecialDay().

Add isSpecialDay(), isSpecialDay((), specialDayId(),
specialDay(), isSpecialDay(), specialDayId(), specialDay(),
isDayIncluded(), isDayIncludedAsSpecialDay() and isDayIncludedAsSpecialDay().
This commit is contained in:
Gerhard Hoffmann 2024-04-19 13:09:53 +02:00
parent 10828e0708
commit dfd74a455a

View File

@ -36,6 +36,9 @@ class Calculator;
class Configuration
{
public:
using SpecialDaysType = std::multimap<int, ATBSpecialDays>;
using SpecialDaysWorktimeType = std::multimap<int, ATBSpecialDaysWorktime>;
ATBProject project;
ATBCurrency Currency;
ATBDuration duration;
@ -43,8 +46,8 @@ public:
multimap<int, ATBDuration> Duration;
multimap<int, ATBPaymentMethod> PaymentMethod;
multimap<int, ATBPaymentRate> PaymentRate;
multimap<int, ATBSpecialDaysWorktime> SpecialDaysWorktime;
multimap<int, ATBSpecialDays> SpecialDays;
SpecialDaysWorktimeType SpecialDaysWorktime;
SpecialDaysType SpecialDays;
multimap<int, ATBWeekDays> WeekDays;
multimap<int, ATBPeriodYear> YearPeriod;
multimap<int, ATBWeekDaysWorktime> WeekDaysWorktime;
@ -67,8 +70,14 @@ public:
ATBPaymentOption const &getPaymentOptions(int paymentOptionsIndex=0) const;
QVector<ATBPaymentOption> &getAllPaymentOptions();
QVector<ATBPaymentOption> const &getAllPaymentOptions() const;
int getCurrentPaymentOptionIndex(QDateTime const &dt) const;
bool isHoliday(QDateTime const &dt) const;
int getPaymentOptionIndex(QDateTime const &dt) const;
int getPaymentOptionIndexIfSpecialDay(QDateTime const &dt) const;
bool isSpecialDay(QDateTime const &dt) const;
int specialDayId(QDateTime const &dt) const;
ATBSpecialDays specialDay(QDateTime const &dt) const;
bool isDayIncluded(uint64_t businessHours, QDateTime const &dt) const;
bool isDayIncludedAsSpecialDay(uint64_t businessHours, QDateTime const &dt) const;
bool isDayIncludedAsSpecialDay(uint64_t businessHours, int specialDayId) const;
std::optional<QVector<ATBPaymentRate>> getPaymentRateForAllKeys() const;
std::optional<QVector<ATBPaymentRate>> getPaymentRateForKey(int key) const;
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForAllKeys() const;