Package com.projity.pm.costing

Examples of com.projity.pm.costing.CostRate


    HasStartAndEnd interval = (HasStartAndEnd)object;   
    AbstractContourBucket bucket = (AbstractContourBucket) contourBucketIntervalGenerator.current();
   
   
    if (bucket != null) {
      CostRate costRate = (CostRate)costRateGenerator.current();
      double bucketUnits = bucket.getEffectiveUnits(assignment.getUnits());
      if (bucketUnits != 0.0) { // there are never values if there is no normal cost.
        // calculate regular and overtime
        long bucketDuration = workCalendar.compare(interval.getEnd(),interval.getStart(), false);

        //When we handle overhead, we need to have another interval generator which keeps overhead in sorted order
        // The bucket duration should be multiplied by 1 - overhead.  Code also needs to exist in workFunctor.  maybe others too
        // double overhead = overheadIntervalGenerator.current();
        // bucketDuration *= (1.0 - overhead);
   
        // might as well calculate work too
        regularWork += bucketUnits * bucketDuration;
        overtimeWork += overtimeUnits * bucketDuration;
        work = regularWork + overtimeWork;
       
       
       
        double bucketOvertime = costRate.getOvertimeRate().getValue() * overtimeUnits;
        double bucketRegular = costRate.getStandardRate().getValue() * bucketUnits;
        if (assignment.isTemporal()) { // for work resources or time based material
          bucketRegular *= bucketDuration;
          bucketOvertime *= bucketDuration;
        }
        overtimeValue += bucketOvertime;
        regularValue += bucketRegular;
        value += (bucketOvertime + bucketRegular);
       
        // Below is fixed cost processing.
        double costPerUse = costRate.getCostPerUse();
        if (costPerUse != 0.0D) {
          double fraction = 1.0D; // fraction of fixed cost to use - only relevant if prorated
          if (proratedCost) { // prorated across duration
            long assignmentDuration = assignment.getDuration();
            if (assignmentDuration != 0) {
View Full Code Here

TOP

Related Classes of com.projity.pm.costing.CostRate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.