FINERACT-1971: Minor bug-fixes and enhancements
This commit is contained in:
+146
-234
File diff suppressed because it is too large
Load Diff
+8
-7
@@ -25,6 +25,7 @@ import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import java.time.LocalDate;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.organisation.staff.domain.Staff;
|
||||
|
||||
@Entity
|
||||
@@ -72,16 +73,16 @@ public class LoanOfficerAssignmentHistory extends AbstractAuditableCustom {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public boolean matchesStartDateOf(final LocalDate matchingDate) {
|
||||
return getStartDate().isEqual(matchingDate);
|
||||
}
|
||||
|
||||
public LocalDate getStartDate() {
|
||||
return this.startDate;
|
||||
}
|
||||
|
||||
public boolean hasStartDateBefore(final LocalDate matchingDate) {
|
||||
return matchingDate.isBefore(getStartDate());
|
||||
public boolean matchesStartDateOf(final LocalDate matchingDate) {
|
||||
return DateUtils.isEqual(matchingDate, getStartDate());
|
||||
}
|
||||
|
||||
public boolean isBeforeStartDate(final LocalDate matchingDate) {
|
||||
return DateUtils.isBefore(matchingDate, getStartDate());
|
||||
}
|
||||
|
||||
public boolean isCurrentRecord() {
|
||||
@@ -95,7 +96,7 @@ public class LoanOfficerAssignmentHistory extends AbstractAuditableCustom {
|
||||
* @return
|
||||
*/
|
||||
public boolean isEndDateAfter(final LocalDate compareDate) {
|
||||
return this.endDate.isAfter(compareDate);
|
||||
return DateUtils.isAfter(this.endDate, compareDate);
|
||||
}
|
||||
|
||||
public LocalDate getEndDate() {
|
||||
|
||||
+9
-3
@@ -31,6 +31,7 @@ import java.time.LocalDate;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom;
|
||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||
import org.apache.fineract.organisation.monetary.domain.Money;
|
||||
import org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks;
|
||||
@@ -625,7 +626,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
|
||||
}
|
||||
|
||||
public boolean isOverdueOn(final LocalDate date) {
|
||||
return getDueDate().isBefore(date);
|
||||
return DateUtils.isAfter(date, getDueDate());
|
||||
}
|
||||
|
||||
public void updateChargePortion(final Money feeChargesDue, final Money feeChargesWaived, final Money feeChargesWrittenOff,
|
||||
@@ -665,11 +666,11 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
|
||||
}
|
||||
|
||||
private boolean isInAdvance(final LocalDate transactionDate) {
|
||||
return transactionDate.isBefore(getDueDate());
|
||||
return DateUtils.isBefore(transactionDate, getDueDate());
|
||||
}
|
||||
|
||||
private boolean isLatePayment(final LocalDate transactionDate) {
|
||||
return transactionDate.isAfter(getDueDate());
|
||||
return DateUtils.isAfter(transactionDate, getDueDate());
|
||||
}
|
||||
|
||||
private void checkIfRepaymentPeriodObligationsAreMet(final LocalDate transactionDate, final MonetaryCurrency currency) {
|
||||
@@ -928,6 +929,11 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
|
||||
return (this.installmentNumber == 1);
|
||||
}
|
||||
|
||||
public boolean isInPeriod(LocalDate date) {
|
||||
return (isFirstPeriod() ? !DateUtils.isBefore(date, getFromDate()) : DateUtils.isAfter(date, getFromDate()))
|
||||
&& !DateUtils.isAfter(date, getDueDate());
|
||||
}
|
||||
|
||||
public Set<LoanTransactionToRepaymentScheduleMapping> getLoanTransactionToRepaymentScheduleMappings() {
|
||||
return this.loanTransactionToRepaymentScheduleMappings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user