Carrot reference
Functions

costBetween()

Calculates the cost of a job over a specified period of time where the cost of a job includes if multiple people have held that job.

costBetweenPrimary()

Returns the costBetween calculation only using data from Primary.

Syntax

baseCostBetweenPrimary -  Calculates the Base cost (Base * Org Multiplier) of a job over a specific time period, including future roles with announced start dates, based on data in Primary only.

baseCostBetweenPrimary( startDate: Date, endDate: Date, Multiplier: BigDecimal)

  • startDate - The current, or announced starting date for the current, or future filled role, respectively.
  • endDate - The end date for the role.
  • Multiplier- Optional multiplier. Defaults to 1.0.
  • Return type: Money


variableCostBetweenPrimary - Calculates the Variable cost of a job over a specific time period, including future filled roles with announced start dates, based on data in Primary only.

variableCostBetweenPrimary( startDate: Date, endDate: Date, Multiplier: BigDecimal)

  • startDate - The current, or announced starting date for the current, or future filled role, respectively.
  • endDate - The end date for the role.
  • Multiplier- Optional multiplier. Defaults to 1.0.
  • Return type: Money


fullyLoadedCostBetweenPrimary - Calculates the Base cost (Base * Org Multiplier) plus the Variable cost of a job over a specific time period, including future roles with announced start dates, based on data in Primary only.

fullyLoadedCostBetweenPrimary( startDate: Date, endDate: Date, Multiplier: BigDecimal)

  • startDate - The current, or announced starting date for the current, or future filled role, respectively.
  • endDate - The end date for the role.
  • Multiplier- Optional multiplier. Defaults to 1.0.
  • Return type: Money

Sample usages

Code sample

Result

baseCostBetweenPrimary('2017-07-01', '2022-08-01", 1.0)

Returns the calculated base cost of a job between January 7th, 2017 and January 8th, 2022.

variableCostBetweenPrimary('2017-07-01', '2022-08-01", 2.5)

Returns the calculated variable cost of a job between January 7th, 2017 and January 8th, 2022 and multiplies that value by 2.5

fullyLoadedCostBetweenPrimary('2017-07-01', '2022-08-01", 1.0)

Returns the calculated fully loaded cost of a job: ((base* Org Multiplier) + variable)), between January 7th, 2017 and January 8th, 2022.



Updated 04 Oct 2023
Did this page help you?