19 package org.turro.erp.purchase;
21 import java.util.Date;
22 import org.turro.erp.entity.OrderReference;
23 import org.turro.erp.entity.ReceiptItem;
24 import org.turro.erp.entity.Task;
25 import org.turro.erp.entity.WorkOrder;
26 import org.turro.erp.resource.ResourceAptitude;
27 import org.turro.math.Zero;
37 private long workOrderId;
40 private Date startWorking;
41 private double units, dedication, costHour;
42 private boolean automatic;
43 private String description;
69 if(this.automatic && !automatic) {
71 }
else if(!this.automatic && automatic && resourceAptitude !=
null) {
74 this.automatic = automatic;
82 this.description = concept;
90 this.costHour = costHour;
98 this.dedication = dedication;
106 if(this.orderRef != orderRef) {
107 orderReference =
null;
110 if(or.getOrderRef() == orderRef) {
116 this.orderRef = orderRef;
120 return orderReference;
124 this.orderReference = orderReference;
128 return resourceAptitude;
132 this.resourceAptitude = resourceAptitude;
140 this.startWorking = startWorking;
168 this.workOrder = workOrder;
176 if(this.workOrderId != workOrderId) {
179 orderReference =
null;
182 this.workOrderId = workOrderId;
186 return task !=
null && startWorking !=
null &&
RequiredUsage getRequiredUsage()
double getEstimatedUnitCost()
ResourceAptitude getResourceAptitude()
OrderReference getOrderReference()
static WorkOrder getByWorkOrderId(long value)
Set< OrderReference > getOrderReferences()
void setStartWorking(Date startWorking)
void setWorkOrderId(long workOrderId)
void setAutomatic(boolean automatic)
void setCostHour(double costHour)
ResourceAptitude getResourceAptitude()
void setResourceAptitude(ResourceAptitude resourceAptitude)
void setConcept(String concept)
void setWorkOrder(WorkOrder workOrder)
void setUnits(double units)
OrderReference getOrderReference()
void setOrderReference(OrderReference orderReference)
void setDedication(double dedication)
void setOrderRef(int orderRef)
static boolean near(double value, int digits)