コード例 #1
0
ファイル: LedgerBalance.java プロジェクト: hawking81/kfs
 /**
  * Adds amounts in a period.
  *
  * @param period, amount
  * @see org.kuali.kfs.gl.businessobject.Balance#addAmount(java.lang.String,
  *     org.kuali.rice.core.api.util.type.KualiDecimal)
  */
 @Override
 public void addAmount(String period, KualiDecimal amount) {
   if (KFSConstants.PERIOD_CODE_ANNUAL_BALANCE.equals(period)) {
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.PERIOD_CODE_BEGINNING_BALANCE.equals(period)) {
     this.setFinancialBeginningBalanceLineAmount(
         this.getFinancialBeginningBalanceLineAmount().add(amount));
     super.getBeginningBalanceLineAmount().add(amount);
   } else if (KFSConstants.PERIOD_CODE_CG_BEGINNING_BALANCE.equals(period)) {
     this.setContractsGrantsBeginningBalanceAmount(
         this.getContractsGrantsBeginningBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH1.equals(period)) {
     setMonth1Amount(getMonth1Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH2.equals(period)) {
     setMonth2Amount(getMonth2Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH3.equals(period)) {
     setMonth3Amount(getMonth3Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH4.equals(period)) {
     setMonth4Amount(getMonth4Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH5.equals(period)) {
     setMonth5Amount(getMonth5Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH6.equals(period)) {
     setMonth6Amount(getMonth6Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH7.equals(period)) {
     setMonth7Amount(getMonth7Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH8.equals(period)) {
     setMonth8Amount(getMonth8Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH9.equals(period)) {
     setMonth9Amount(getMonth9Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH10.equals(period)) {
     setMonth10Amount(getMonth10Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH11.equals(period)) {
     setMonth11Amount(getMonth11Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH12.equals(period)) {
     setMonth12Amount(getMonth12Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   } else if (KFSConstants.MONTH13.equals(period)) {
     setMonth13Amount(getMonth13Amount().add(amount));
     this.setAccountLineAnnualBalanceAmount(this.getAccountLineAnnualBalanceAmount().add(amount));
   }
 }
コード例 #2
0
ファイル: LedgerBalance.java プロジェクト: hawking81/kfs
 /**
  * get the amount in the given period.
  *
  * @param periodCode the given period code
  */
 @Override
 public KualiDecimal getAmountByPeriod(String periodCode) {
   if (KFSConstants.PERIOD_CODE_ANNUAL_BALANCE.equals(periodCode)) {
     return this.getAccountLineAnnualBalanceAmount();
   } else if (KFSConstants.PERIOD_CODE_BEGINNING_BALANCE.equals(periodCode)) {
     return this.getFinancialBeginningBalanceLineAmount();
   } else if (KFSConstants.PERIOD_CODE_CG_BEGINNING_BALANCE.equals(periodCode)) {
     return this.getContractsGrantsBeginningBalanceAmount();
   } else if (KFSConstants.MONTH1.equals(periodCode)) {
     return this.getMonth1Amount();
   } else if (KFSConstants.MONTH2.equals(periodCode)) {
     return this.getMonth2Amount();
   } else if (KFSConstants.MONTH3.equals(periodCode)) {
     return this.getMonth3Amount();
   } else if (KFSConstants.MONTH4.equals(periodCode)) {
     return this.getMonth4Amount();
   } else if (KFSConstants.MONTH5.equals(periodCode)) {
     return this.getMonth5Amount();
   } else if (KFSConstants.MONTH6.equals(periodCode)) {
     return this.getMonth6Amount();
   } else if (KFSConstants.MONTH7.equals(periodCode)) {
     return this.getMonth7Amount();
   } else if (KFSConstants.MONTH8.equals(periodCode)) {
     return this.getMonth8Amount();
   } else if (KFSConstants.MONTH9.equals(periodCode)) {
     return this.getMonth9Amount();
   } else if (KFSConstants.MONTH10.equals(periodCode)) {
     return this.getMonth10Amount();
   } else if (KFSConstants.MONTH11.equals(periodCode)) {
     return this.getMonth11Amount();
   } else if (KFSConstants.MONTH12.equals(periodCode)) {
     return this.getMonth12Amount();
   } else if (KFSConstants.MONTH13.equals(periodCode)) {
     return this.getMonth13Amount();
   } else {
     throw new IllegalArgumentException("Unsupport Period Code: " + periodCode);
   }
 }