if (all || prorated) {
ContourBucketIntervalGenerator workContour = contourGeneratorInstance(WORK);
CollectionIntervalGenerator costRate = CollectionIntervalGenerator.getInstance(detail.getResource().getCostRateTable(detail.getCostRateIndex()).getList());
clause.from(costRate).from(workContour);
// Note that the getStart() parameter implies cost per use is applied at start
CostFunctor costF = CostFunctor.getInstance(this, getEffectiveWorkCalendar(), workContour, detail.calcOvertimeUnits(), costRate, getStart(),prorated);
clause.select(costF);
return costF;
} else { // accrue start or end
long triggerDate = (detail.getResource().getAccrueAt() == Accrual.START) ? getStart() : getFinish();// use start or end
AssignmentFieldFunctor constantCost = ValueAtInstant.getInstance(triggerDate, calcAll(COST));