* @return The functor to use to calculate cost
*/
private AssignmentFieldFunctor cost(SelectFrom clause, boolean all) {
if (detail.getCostContour().isPersonal()) { // in the case where a cost contour has already been saved, use it
ContourBucketIntervalGenerator costContour = contourGeneratorInstance(COST);
WorkFunctor workF = WorkFunctor.getInstance(this, getEffectiveWorkCalendar(), costContour, detail.calcOvertimeUnits()); // note that is is a work contour
clause.select(workF).from(costContour);
return workF;
} else {
boolean prorated = isProratedCost();
// if prorated, or if calculating a total, then treat as prorated