Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class RecurringDepositProductsApiResource {
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Create a Recurring Deposit Product", description = "Creates a Recurring Deposit Product\n\n"
+ "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount\n\n"
+ "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule, depositAmount\n\n"
+ "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\n"
+ "Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId")
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = RecurringDepositProductsApiResourceSwagger.PostRecurringDepositProductsRequest.class)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ private PostRecurringDepositProductsChartSlabs() {}
public Integer interestCalculationDaysInYearType;
@Schema(example = "1")
public Integer accountingRule;
@Schema(example = "1")
public Integer recurringDepositFrequency;
@Schema(example = "2")
public Integer recurringDepositFrequencyTypeId;
@Schema(example = "true")
public Boolean preClosurePenalApplicable;
@Schema(example = "1.75")
Expand Down Expand Up @@ -267,18 +263,6 @@ private GetRecurringDepositProductsAccountingRule() {}
public String description;
}

static final class GetRecurringDepositProductsRecurringDepositFrequencyType {

private GetRecurringDepositProductsRecurringDepositFrequencyType() {}

@Schema(example = "1")
public Integer id;
@Schema(example = "recurring.deposit.savingsPeriodFrequencyType.months")
public String code;
@Schema(example = "Months")
public String description;
}

@Schema(example = "3")
public Long id;
@Schema(example = "RD01")
Expand All @@ -288,9 +272,6 @@ private GetRecurringDepositProductsRecurringDepositFrequencyType() {}
@Schema(example = "RD01")
public String description;
public GetRecurringDepositProductsCurrency currency;
@Schema(example = "1")
public Integer recurringDepositFrequency;
public GetRecurringDepositProductsRecurringDepositFrequencyType recurringDepositFrequencyType;
@Schema(example = "false")
public Boolean preClosurePenalApplicable;
@Schema(example = "3")
Expand Down Expand Up @@ -523,10 +504,6 @@ private GetRecurringDepositProductsProductIdPeriodType() {}
public GetRecurringDepositProductsProductIdAccountingMappings accountingMappings;
public Set<GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings> feeToIncomeAccountMappings;
public Set<GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings> penaltyToIncomeAccountMappings;
@Schema(example = "1")
public Integer recurringDepositFrequency;
public GetRecurringDepositProductsResponse.GetRecurringDepositProductsRecurringDepositFrequencyType recurringDepositFrequencyType;
@Schema(example = "true")
public Boolean preClosurePenalApplicable;
@Schema(example = "1.75")
public Double preClosurePenalInterest;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.tax.mapper;

import org.apache.fineract.accounting.glaccount.domain.GLAccountType;
import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig;
import org.mapstruct.Mapper;
import org.mapstruct.Named;

@Mapper(config = MapstructMapperConfig.class)
public interface GLAccountTypeMapper {

@Named("intToGLAccountType")
default GLAccountType map(Integer value) {
return GLAccountType.fromInt(value);
}

@Named("glAccountTypeToInt")
default Integer map(GLAccountType type) {
return type == null ? null : type.getValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = MapstructMapperConfig.class, uses = { GlAccountMapper.class, GlAccountTypeMapper.class })
@Mapper(config = MapstructMapperConfig.class, uses = { GlAccountMapper.class, GlAccountTypeMapper.class, GLAccountTypeMapper.class })
public interface TaxComponentMapper {

@Mapping(target = "creditAccount", source = "taxComponent.creditAccount")
@Mapping(target = "debitAccount", source = "taxComponent.debitAccount")
@Mapping(target = "creditAccountType", source = "taxComponent.creditAccountType")
@Mapping(target = "debitAccountType", source = "taxComponent.debitAccountType")
@Mapping(target = "creditAccount", source = "creditAccount")
@Mapping(target = "debitAccount", source = "debitAccount")
@Mapping(target = "creditAccountType", source = "creditAccountType", qualifiedByName = "intToGLAccountType")
@Mapping(target = "debitAccountType", source = "debitAccountType", qualifiedByName = "intToGLAccountType")
@Mapping(target = "glAccountOptions", ignore = true)
@Mapping(target = "glAccountTypeOptions", ignore = true)
@Mapping(target = "taxComponentHistories", ignore = true)
Expand Down
Loading