This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new fe5d7ccce FINERACT-1943 Add SubmittedOnDate to Savings Transaction
fe5d7ccce is described below
commit fe5d7cccee63e1f64e1fd74ac5cdbbaf8a5d914e
Author: Mkkor <[email protected]>
AuthorDate: Thu Jul 20 18:31:16 2023 +0530
FINERACT-1943 Add SubmittedOnDate to Savings Transaction
---
.../savings/domain/SavingsAccountTransaction.java | 5 ++++
.../service/SavingsSchedularInterestPoster.java | 7 +++--
.../db/changelog/tenant/changelog-tenant.xml | 1 +
...dd_submitted_on_date_to_savings_transaction.xml | 33 ++++++++++++++++++++++
4 files changed, 43 insertions(+), 3 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java
index 370167bdd..60d919cb3 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransaction.java
@@ -105,6 +105,9 @@ public final class SavingsAccountTransaction extends
AbstractPersistableCustom {
@Column(name = "created_date", nullable = false)
private LocalDateTime createdDate;
+ @Column(name = "submitted_on_date", nullable = false)
+ private LocalDate submittedOnDate;
+
@ManyToOne
@JoinColumn(name = "appuser_id", nullable = true)
private AppUser appUser;
@@ -345,6 +348,7 @@ public final class SavingsAccountTransaction extends
AbstractPersistableCustom {
this.reversed = isReversed;
this.paymentDetail = paymentDetail;
this.createdDate = createdDate;
+ this.submittedOnDate = DateUtils.getBusinessLocalDate();
this.appUser = appUser;
this.isManualTransaction = isManualTransaction;
this.lienTransaction = lienTransaction;
@@ -365,6 +369,7 @@ public final class SavingsAccountTransaction extends
AbstractPersistableCustom {
this.balanceNumberOfDays = balanceNumberOfDays;
this.overdraftAmount = overdraftAmount;
this.createdDate = createdDate;
+ this.submittedOnDate = DateUtils.getBusinessLocalDate();
this.isManualTransaction = isManualTransaction;
this.releaseIdOfHoldAmountTransaction =
releaseIdOfHoldAmountTransaction;
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
index 310de4992..3ba3de47e 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java
@@ -206,7 +206,8 @@ public class SavingsSchedularInterestPoster {
savingsAccountTransactionData.getBalanceNumberOfDays(),
savingsAccountTransactionData.getRunningBalance(),
savingsAccountTransactionData.getCumulativeBalance(), currentDate,
Integer.valueOf(1),
savingsAccountTransactionData.isManualTransaction(),
savingsAccountTransactionData.getRefNo(),
-
savingsAccountTransactionData.isReversalTransaction(),
savingsAccountTransactionData.getOverdraftAmount(), });
+
savingsAccountTransactionData.isReversalTransaction(),
savingsAccountTransactionData.getOverdraftAmount(),
+ DateUtils.getBusinessLocalDate() });
} else {
paramsForTransactionUpdate.add(new Object[] {
savingsAccountTransactionData.isReversed(),
savingsAccountTransactionData.getAmount(),
savingsAccountTransactionData.getOverdraftAmount(), balanceEndDate,
@@ -244,8 +245,8 @@ public class SavingsSchedularInterestPoster {
query.append("transaction_type_enum, transaction_date, amount,
balance_end_date_derived, ");
query.append("balance_number_of_days_derived, running_balance_derived,
cumulative_balance_derived, ");
query.append("created_date, appuser_id, is_manual, ref_no,
is_reversal, ");
- query.append("overdraft_amount_derived) VALUES ");
- query.append("(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+ query.append("overdraft_amount_derived, submitted_on_date) VALUES ");
+ query.append("(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
return query.toString();
}
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
index d8a9f8a1b..9ccec4c98 100644
---
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
@@ -137,4 +137,5 @@
<include file="parts/0115_create_index_from_loan_transaction_id.xml"
relativeToChangelogFile="true" />
<include
file="parts/0116_add_configuration_asset_externalization_of_non_active_loans.xml"
relativeToChangelogFile="true" />
<include file="parts/0117_set_datetime_precision.xml"
relativeToChangelogFile="true" />
+ <include
file="parts/0118_add_submitted_on_date_to_savings_transaction.xml"
relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0118_add_submitted_on_date_to_savings_transaction.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0118_add_submitted_on_date_to_savings_transaction.xml
new file mode 100644
index 000000000..b88dfbf82
--- /dev/null
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0118_add_submitted_on_date_to_savings_transaction.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+ <changeSet author="fineract" id="1">
+ <addColumn tableName="m_savings_account_transaction">
+ <column name="submitted_on_date" type="DATE"
valueComputed="created_date">
+ <constraints nullable="false"/>
+ </column>
+ </addColumn>
+ </changeSet>
+
+</databaseChangeLog>