/** recalculate the original fringe benefit of the current detail line */
  public static KualiDecimal calculateFringeBenefit(
      EffortCertificationDetail detailLine, KualiDecimal payrollAmount) {
    LaborModuleService laborModuleService = SpringContext.getBean(LaborModuleService.class);
    Integer fiscalYear = EffortCertificationParameterFinder.getCreateReportFiscalYear();
    String chartOfAccountsCode = detailLine.getChartOfAccountsCode();
    String objectCode = detailLine.getFinancialObjectCode();
    String accountNumber = detailLine.getAccountNumber();
    String subAccountNumber = detailLine.getSubAccountNumber();

    return laborModuleService.calculateFringeBenefit(
        fiscalYear,
        chartOfAccountsCode,
        objectCode,
        payrollAmount,
        accountNumber,
        subAccountNumber);
  }
  /**
   * Gets the federalOrFederalPassThroughIndicator attribute. If this line is associated with a
   * valid account, the indicator will be retrieved and updated.
   *
   * @return Returns the federalOrFederalPassThroughIndicator.
   */
  public boolean isFederalOrFederalPassThroughIndicator() {
    if (this.federalOrFederalPassThroughIndicator != null) {
      return this.federalOrFederalPassThroughIndicator;
    }
    if (this.getAccount() != null) {
      Collection<String> federalAgencyTypeCodes =
          EffortCertificationParameterFinder.getFederalAgencyTypeCodes();
      this.federalOrFederalPassThroughIndicator =
          SpringContext.getBean(ContractsAndGrantsModuleService.class)
              .isAwardedByFederalAgency(
                  getAccount().getChartOfAccountsCode(),
                  getAccount().getAccountNumber(),
                  federalAgencyTypeCodes);
      return this.federalOrFederalPassThroughIndicator;
    }

    return false;
  }