Add utilities
isDayIncluded(), SpecialDaysWorkTimeFrom() and specialDaysWorkTimeUntil().
This commit is contained in:
parent
1991853b66
commit
0cd4424434
@ -15,6 +15,9 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace Utilities {
|
namespace Utilities {
|
||||||
|
|
||||||
|
bool isDayIncluded(uint64_t businessHours, QDateTime const &dt);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get day of week from current date (Zeller's Algorithm), starting day is Sunday
|
/// Get day of week from current date (Zeller's Algorithm), starting day is Sunday
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -76,7 +79,9 @@ namespace Utilities {
|
|||||||
double CalculatePricePerUnit(double pra_price, double durationUnit = -1);
|
double CalculatePricePerUnit(double pra_price, double durationUnit = -1);
|
||||||
|
|
||||||
QTime SpecialDaysWorkTimeFrom(Configuration const *cfg, int specialDayId);
|
QTime SpecialDaysWorkTimeFrom(Configuration const *cfg, int specialDayId);
|
||||||
|
QTime SpecialDaysWorkTimeFrom(Configuration::SpecialDaysWorktimeType::const_iterator it);
|
||||||
QTime SpecialDaysWorkTimeUntil(Configuration const *cfg, int specialDayId);
|
QTime SpecialDaysWorkTimeUntil(Configuration const *cfg, int specialDayId);
|
||||||
|
QTime SpecialDaysWorkTimeUntil(Configuration::SpecialDaysWorktimeType::const_iterator it);
|
||||||
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);
|
int WeekDayId(std::multimap<int, ATBWeekDaysWorktime>::const_iterator itr);
|
||||||
@ -94,4 +99,5 @@ namespace Utilities {
|
|||||||
BusinessHours getBusinessHours(Configuration const *cfg, PaymentMethod methodId);
|
BusinessHours getBusinessHours(Configuration const *cfg, PaymentMethod methodId);
|
||||||
uint32_t computeWeekDaysPrice(Configuration const *cfg, PaymentMethod id);
|
uint32_t computeWeekDaysPrice(Configuration const *cfg, PaymentMethod id);
|
||||||
double computeWeekDaysDurationUnit(Configuration const *cfg, PaymentMethod id);
|
double computeWeekDaysDurationUnit(Configuration const *cfg, PaymentMethod id);
|
||||||
|
QStringList dumpBusinessHours(uint64_t businessHours);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user