Add helper WorkDayId() for future use.
This commit is contained in:
parent
5ee978f14a
commit
92c3b7c97c
@ -79,6 +79,8 @@ namespace Utilities {
|
|||||||
QTime SpecialDaysWorkTimeUntil(Configuration const *cfg, int specialDayId);
|
QTime SpecialDaysWorkTimeUntil(Configuration const *cfg, int specialDayId);
|
||||||
QTime WeekDaysWorkTimeFrom(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
QTime WeekDaysWorkTimeFrom(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
||||||
QTime WeekDaysWorkTimeUntil(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
QTime WeekDaysWorkTimeUntil(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
||||||
|
int WeekDayId(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
||||||
|
// PaymentRate GetPaymentRate(Configuration const *cfg, );
|
||||||
bool isCarryOverSet(Configuration const *cfg, PaymentMethod paymentMethodId);
|
bool isCarryOverSet(Configuration const *cfg, PaymentMethod paymentMethodId);
|
||||||
bool isCarryOverNotSet(Configuration const *cfg, PaymentMethod paymentMethodId);
|
bool isCarryOverNotSet(Configuration const *cfg, PaymentMethod paymentMethodId);
|
||||||
PaymentMethod getPaymentMethodId(Configuration const *cfg);
|
PaymentMethod getPaymentMethodId(Configuration const *cfg);
|
||||||
|
@ -345,6 +345,10 @@ QTime Utilities::WeekDaysWorkTimeUntil(std::multimap<int, ATBWeekDaysWorktime>::
|
|||||||
return QTime::fromString(itr->second.pwd_time_to.c_str(), Qt::ISODate);
|
return QTime::fromString(itr->second.pwd_time_to.c_str(), Qt::ISODate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Utilities::WeekDayId(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr) {
|
||||||
|
return itr->second.pwd_period_day_in_week_id;
|
||||||
|
}
|
||||||
|
|
||||||
bool Utilities::isCarryOverSet(Configuration const *cfg, PaymentMethod paymentMethodId) {
|
bool Utilities::isCarryOverSet(Configuration const *cfg, PaymentMethod paymentMethodId) {
|
||||||
return !isCarryOverNotSet(cfg, paymentMethodId);
|
return !isCarryOverNotSet(cfg, paymentMethodId);
|
||||||
}
|
}
|
||||||
@ -406,8 +410,6 @@ uint32_t Utilities::getFirstDurationStep(Configuration const *cfg, PaymentMethod
|
|||||||
BusinessHours Utilities::getBusinessHours(Configuration const *cfg, PaymentMethod methodId) {
|
BusinessHours Utilities::getBusinessHours(Configuration const *cfg, PaymentMethod methodId) {
|
||||||
int businessHours = cfg->PaymentOption.find(methodId)->second.pop_business_hours;
|
int businessHours = cfg->PaymentOption.find(methodId)->second.pop_business_hours;
|
||||||
|
|
||||||
qCritical() << __func__ << ":" << __LINE__ << businessHours;
|
|
||||||
|
|
||||||
switch (businessHours) {
|
switch (businessHours) {
|
||||||
case NoRestriction_24_7: return BusinessHours::NoRestriction_24_7;
|
case NoRestriction_24_7: return BusinessHours::NoRestriction_24_7;
|
||||||
case OnlyWorkingDays: return BusinessHours::OnlyWorkingDays;
|
case OnlyWorkingDays: return BusinessHours::OnlyWorkingDays;
|
||||||
|
Loading…
Reference in New Issue
Block a user