19 package org.turro.erp.workorder;
21 import java.util.Date;
22 import java.util.EnumSet;
23 import org.turro.erp.entity.OrderReference;
24 import org.turro.erp.entity.ReferenceStatus;
25 import org.turro.erp.entity.Task;
26 import org.turro.erp.entity.TaskStatus;
27 import org.turro.status.Status;
40 this.orderReference = orderReference;
75 taskCouldChange(newStatus);
80 taskCouldChange(newStatus);
84 taskCouldChange(newStatus);
90 boolean delivering =
false;
96 for(Task task : orderReference.
getTasks()) {
97 if(!task.getStatusWrapper(now).canChangeTo(TaskStatus.values()[newStatus.
getStatusOrder()])) {
100 if(delivering && task.isValidationPending()) {
SortedSet< Task > getTasks()
boolean hasPendingBudget()
boolean canChangeTo(ReferenceStatus newStatus)
ReferenceStatusWrapper(OrderReference orderReference, Date now)
ReferenceStatus doChangeTo(ReferenceStatus newStatus)
ReferenceStatus doCheckStatus(Date now)