FINERACT-2258: Fix for making the Post Interest for Savings job properly work in a multitenant environment
Fineract Docker build - MariaDB / build (push) Canceled after 0s
Fineract Docker build - PostgreSQL / build (push) Canceled after 0s
Fineract Documentation build / build (push) Canceled after 0s
Fineract ActiveMQ Smoke / build (push) Canceled after 0s
Fineract Build Progressive Loan Embeddable Jar & Test with a Sample Application / build (push) Canceled after 0s
Fineract Build & Test - MariaDB / build (push) Canceled after 0s
Fineract Build & Test - MySQL / build (push) Canceled after 0s
Fineract Build & Test - PostgreSQL / build (push) Canceled after 0s
Fineract Tests / build (push) Canceled after 0s
Fineract Kafka Smoke / build (push) Canceled after 0s
Fineract Docker build - MariaDB / build (push) Canceled after 0s
Fineract Docker build - PostgreSQL / build (push) Canceled after 0s
Fineract Documentation build / build (push) Canceled after 0s
Fineract ActiveMQ Smoke / build (push) Canceled after 0s
Fineract Build Progressive Loan Embeddable Jar & Test with a Sample Application / build (push) Canceled after 0s
Fineract Build & Test - MariaDB / build (push) Canceled after 0s
Fineract Build & Test - MySQL / build (push) Canceled after 0s
Fineract Build & Test - PostgreSQL / build (push) Canceled after 0s
Fineract Tests / build (push) Canceled after 0s
Fineract Kafka Smoke / build (push) Canceled after 0s
This commit is contained in:
committed by
Arnold Gálovics
parent
09879800e0
commit
872f97b6b6
+28
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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.infrastructure.core.jersey.serializer.legacy;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface JsonLocalDateArrayFormat {}
|
||||
+2
@@ -22,12 +22,14 @@ import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat;
|
||||
|
||||
/**
|
||||
* Immutable data object represent the important time-line events of a savings account application.
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
@JsonLocalDateArrayFormat
|
||||
public class SavingsAccountApplicationTimelineData implements Serializable {
|
||||
|
||||
private final LocalDate submittedOnDate;
|
||||
|
||||
+2
@@ -25,6 +25,7 @@ import java.time.MonthDay;
|
||||
import java.util.Collection;
|
||||
import lombok.Getter;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.portfolio.charge.data.ChargeData;
|
||||
import org.apache.fineract.portfolio.charge.domain.ChargeTimeType;
|
||||
@@ -33,6 +34,7 @@ import org.apache.fineract.portfolio.charge.domain.ChargeTimeType;
|
||||
* Immutable data object for Savings Account charge data.
|
||||
*/
|
||||
@Getter
|
||||
@JsonLocalDateArrayFormat
|
||||
public class SavingsAccountChargeData implements Serializable {
|
||||
|
||||
private final Long id;
|
||||
|
||||
+13
-11
@@ -32,6 +32,7 @@ import lombok.Getter;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||
import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat;
|
||||
import org.apache.fineract.infrastructure.dataqueries.data.DatatableData;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.staff.data.StaffData;
|
||||
@@ -47,6 +48,7 @@ import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
||||
* Immutable data object representing a savings account.
|
||||
*/
|
||||
@Getter
|
||||
@JsonLocalDateArrayFormat
|
||||
public final class SavingsAccountData implements Serializable {
|
||||
|
||||
private final Long id;
|
||||
@@ -302,23 +304,23 @@ public final class SavingsAccountData implements Serializable {
|
||||
}
|
||||
|
||||
public Integer getInterestPostingPeriodTypeId() {
|
||||
return this.interestPostingPeriodType.getId().intValue();
|
||||
return this.interestPostingPeriodType != null ? this.interestPostingPeriodType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public Integer getDepositTypeId() {
|
||||
return this.depositType.getId().intValue();
|
||||
return this.depositType != null ? this.depositType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public Integer getInterestCompoundingPeriodTypeId() {
|
||||
return this.interestCompoundingPeriodType.getId().intValue();
|
||||
return this.interestCompoundingPeriodType != null ? this.interestCompoundingPeriodType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public Integer getInterestCalculationTypeId() {
|
||||
return this.interestCalculationType.getId().intValue();
|
||||
return this.interestCalculationType != null ? this.interestCalculationType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public Integer getInterestCalculationDaysInYearTypeId() {
|
||||
return this.interestCalculationDaysInYearType.getId().intValue();
|
||||
return this.interestCalculationDaysInYearType != null ? this.interestCalculationDaysInYearType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public SavingsAccountTransactionData findLastTransaction(final LocalDate date) {
|
||||
@@ -347,14 +349,14 @@ public final class SavingsAccountData implements Serializable {
|
||||
|
||||
public LocalDate getActivationLocalDate() {
|
||||
LocalDate activationLocalDate = null;
|
||||
if (this.timeline.getActivatedOnDate() != null) {
|
||||
if (this.timeline != null && this.timeline.getActivatedOnDate() != null) {
|
||||
activationLocalDate = this.timeline.getActivatedOnDate();
|
||||
}
|
||||
return activationLocalDate;
|
||||
}
|
||||
|
||||
public Integer getLockinPeriodFrequencyTypeId() {
|
||||
return this.lockinPeriodFrequencyType.getId().intValue();
|
||||
return this.lockinPeriodFrequencyType != null ? this.lockinPeriodFrequencyType.getId().intValue() : null;
|
||||
}
|
||||
|
||||
public Collection<Long> findCurrentTransactionIdsWithPivotDateConfig() {
|
||||
@@ -390,15 +392,15 @@ public final class SavingsAccountData implements Serializable {
|
||||
}
|
||||
|
||||
public List<SavingsAccountTransactionData> getSavingsAccountTransactionsWithPivotConfig() {
|
||||
return this.transactions.stream().toList();
|
||||
return this.transactions != null ? this.transactions.stream().toList() : null;
|
||||
}
|
||||
|
||||
public Boolean isAccrualBasedAccountingEnabledOnSavingsProduct() {
|
||||
return this.savingsProductData.isAccrualBasedAccountingEnabled();
|
||||
return this.savingsProductData != null && this.savingsProductData.isAccrualBasedAccountingEnabled();
|
||||
}
|
||||
|
||||
public Boolean isCashBasedAccountingEnabledOnSavingsProduct() {
|
||||
return this.savingsProductData.isCashBasedAccountingEnabled();
|
||||
return this.savingsProductData != null && this.savingsProductData.isCashBasedAccountingEnabled();
|
||||
}
|
||||
|
||||
public static SavingsAccountData importInstanceGroup(Long groupId, Long productId, Long fieldOfficerId, LocalDate submittedOnDate,
|
||||
@@ -948,7 +950,7 @@ public final class SavingsAccountData implements Serializable {
|
||||
}
|
||||
|
||||
public Collection<SavingsAccountChargeData> charges() {
|
||||
return (this.charges == null) ? new HashSet<SavingsAccountChargeData>() : this.charges;
|
||||
return this.charges == null ? new HashSet<>() : this.charges;
|
||||
}
|
||||
|
||||
public void setDatatables(final List<DatatableData> datatables) {
|
||||
|
||||
+2
@@ -24,6 +24,7 @@ import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||
@@ -36,6 +37,7 @@ import org.apache.fineract.portfolio.savings.domain.interest.PostingPeriod;
|
||||
* Immutable data object representing Savings Account summary information.
|
||||
*/
|
||||
@Getter
|
||||
@JsonLocalDateArrayFormat
|
||||
public class SavingsAccountSummaryData implements Serializable {
|
||||
|
||||
private final CurrencyData currency;
|
||||
|
||||
+2
@@ -31,6 +31,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import org.apache.fineract.infrastructure.core.domain.LocalDateInterval;
|
||||
import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||
@@ -51,6 +52,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* Immutable data object representing a savings account transaction.
|
||||
*/
|
||||
@Getter
|
||||
@JsonLocalDateArrayFormat
|
||||
public final class SavingsAccountTransactionData implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
Reference in New Issue
Block a user