Starting working on non working days
This commit is contained in:
@@ -28,6 +28,9 @@ Day::~Day()
|
||||
}
|
||||
|
||||
float Day::get_total() {
|
||||
if (notWorking) {
|
||||
return 0.0;
|
||||
}
|
||||
int sec = start.secsTo(end);
|
||||
int minutes = sec / 60;
|
||||
float breakTime = get_time_break();
|
||||
@@ -48,6 +51,11 @@ void Day::set_validate(bool value) {
|
||||
validate = value;
|
||||
}
|
||||
|
||||
void Day::set_working(bool value)
|
||||
{
|
||||
this->notWorking = value;
|
||||
}
|
||||
|
||||
void Day::setBreaks(QVector<BreakPoint*> breaks)
|
||||
{
|
||||
this->breaks = breaks;
|
||||
@@ -119,6 +127,11 @@ bool Day::get_validate() {
|
||||
return validate;
|
||||
}
|
||||
|
||||
bool Day::not_working()
|
||||
{
|
||||
return notWorking;
|
||||
}
|
||||
|
||||
float Day::get_time_break()
|
||||
{
|
||||
float result = 0;
|
||||
@@ -133,6 +146,7 @@ void Day::update(Day *old)
|
||||
this->start = old->start;
|
||||
this->end = old->end;
|
||||
this->validate = old->validate;
|
||||
this->notWorking = old->notWorking;
|
||||
|
||||
foreach (BreakPoint *bp, breaks) {
|
||||
delete bp;
|
||||
|
||||
Reference in New Issue
Block a user