示例#1
0
  private LoanChargeData(
      final Long id,
      final Long chargeId,
      final String name,
      final CurrencyData currency,
      final BigDecimal amount,
      final BigDecimal pecentage,
      final EnumOptionData chargeTimeType,
      final EnumOptionData chargeCalculationType,
      final Collection<ChargeData> chargeOptions,
      final boolean penalty) {
    this.id = id;
    this.chargeId = chargeId;
    this.name = name;
    this.currency = currency;
    this.amount = amount;
    this.amountPaid = BigDecimal.ZERO;
    this.amountWaived = BigDecimal.ZERO;
    this.amountWrittenOff = BigDecimal.ZERO;
    this.amountOutstanding = amount;
    this.chargeTimeType = chargeTimeType;
    this.dueDate = null;
    this.chargeCalculationType = chargeCalculationType;
    this.percentage = pecentage;
    this.amountPercentageAppliedTo = null;
    this.penalty = penalty;

    if (chargeCalculationType != null && chargeCalculationType.getId().intValue() > 1) {
      this.amountOrPercentage = this.percentage;
    } else {
      this.amountOrPercentage = amount;
    }

    this.chargeOptions = chargeOptions;
  }
  public LoanFeeMasterData(
      final Long feeMasterId,
      String feeCode,
      String feeDescription,
      String transactionType,
      EnumOptionData depositTimeType,
      EnumOptionData depositCalculationType,
      EnumOptionData depositOnType,
      BigDecimal percentageof,
      BigDecimal amountPercentageAppliedTo,
      BigDecimal amountOrPercentage,
      BigDecimal amount,
      String isRefundable) {

    this.feeMasterId = feeMasterId;
    this.feeCode = feeCode;
    this.feeDescription = feeDescription;
    this.transactionType = transactionType;
    this.depositTimeType = depositTimeType;
    this.depositCalculationType = depositCalculationType;
    this.depositOnType = depositOnType;
    this.percentageof = percentageof;
    this.amountPercentageAppliedTo = amountPercentageAppliedTo;
    if (amountOrPercentage == null) {
      if (depositCalculationType != null && depositCalculationType.getId().intValue() > 1) {
        this.amountOrPercentage = this.percentageof;
      } else {
        this.amountOrPercentage = amount;
      }
    } else {
      this.amountOrPercentage = amountOrPercentage;
    }
    this.amount = amount;
    this.isRefundable = isRefundable == null ? "N" : isRefundable;
  }