This is an automated email from the ASF dual-hosted git repository.

arnold 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 852f7f80c FINERACT-1724: Liquibase script : trial balance summary 
report with asset owner
852f7f80c is described below

commit 852f7f80c9665c30f1e389be15ce44cf05666ad3
Author: abraham.menyhart <[email protected]>
AuthorDate: Fri Jun 23 12:15:27 2023 +0200

    FINERACT-1724: Liquibase script : trial balance summary report with asset 
owner
---
 .../db/changelog/tenant/changelog-tenant.xml       |  2 +
 ...0110_trial_balance_summary_with_asset_owner.xml | 52 ++++++++++++++++++++++
 .../0111_transaction_summary_with_asset_owner.xml  | 52 ++++++++++++++++++++++
 .../integrationtests/client/ReportsTest.java       |  2 +-
 4 files changed, 107 insertions(+), 1 deletion(-)

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 c943bd419..dc7d64fd6 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
@@ -129,4 +129,6 @@
     <include file="parts/0107_add_configuration_charges_accrual_date.xml" 
relativeToChangelogFile="true" />
     <include file="parts/0108_precondition_check_cob_loan_account_lock.xml" 
relativeToChangelogFile="true" />
     <include file="parts/0109_spring_batch_5_upgrade.xml" 
relativeToChangelogFile="true" />
+    <include file="parts/0110_trial_balance_summary_with_asset_owner.xml" 
relativeToChangelogFile="true" />
+    <include file="parts/0111_transaction_summary_with_asset_owner.xml" 
relativeToChangelogFile="true" />
 </databaseChangeLog>
diff --git 
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml
 
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml
new file mode 100644
index 000000000..f5f64b2f9
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml
@@ -0,0 +1,52 @@
+<?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">
+        <insert tableName="stretchy_report">
+            <column name="report_name" value="Trial Balance Summary Report 
with Asset Owner"/>
+            <column name="report_type" value="Table"/>
+            <column name="report_subtype"/>
+            <column name="report_category" value="Accounting"/>
+            <column name="report_sql"
+                    value="select * from(SELECT distinct '${endDate}' AS 
postingdate, loan.pname AS product, loan.gl_code AS glacct, loan.glname AS 
description, COALESCE( (select external_id from m_external_asset_owner where id 
= loan.assetowner),'self') as assetowner, loan.openingbalance AS 
beginningbalance, (loan.debitamount * 1) AS debitmovement, (loan.creditamount 
*-1) AS creditmovement, ( loan.openingbalance + loan.debitamount - 
loan.creditamount) AS endingbalance FROM ( SELECT dist [...]
+            <column name="description" value="Trial Balance Summary Report 
with Asset Owner"/>
+            <column name="core_report" valueBoolean="false"/>
+            <column name="use_report" valueBoolean="true"/>
+            <column name="self_service_user_report" valueBoolean="false"/>
+        </insert>
+    </changeSet>
+
+    <changeSet author="fineract" id="2">
+        <insert tableName="stretchy_report_parameter">
+            <column name="report_id" valueComputed="(select id from 
stretchy_report where report_name = 'Trial Balance Summary Report with Asset 
Owner')"/>
+            <column name="parameter_id" valueComputed="(select id from 
stretchy_parameter where parameter_variable  = 'endDate')"/>
+            <column name="report_parameter_name" value="officeId"/>
+        </insert>
+        <insert tableName="stretchy_report_parameter">
+            <column name="report_id" valueComputed="(select id from 
stretchy_report where report_name = 'Trial Balance Summary Report with Asset 
Owner')"/>
+            <column name="parameter_id" valueComputed="(select id from 
stretchy_parameter where parameter_variable  = 'officeId')"/>
+            <column name="report_parameter_name" value="endDate"/>
+        </insert>
+    </changeSet>
+</databaseChangeLog>
diff --git 
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml
 
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml
new file mode 100644
index 000000000..21295f096
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml
@@ -0,0 +1,52 @@
+<?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">
+        <insert tableName="stretchy_report">
+            <column name="report_name" value="Transaction Summary Report with 
Asset Owner"/>
+            <column name="report_type" value="Table"/>
+            <column name="report_subtype"/>
+            <column name="report_category" value="Accounting"/>
+            <column name="report_sql"
+                    value="SELECT '${endDate}' AS TransactionDate, a.product 
AS Product, case when a.transaction_type = 99999 then 'Asset Transfer' 
else(SELECT enum_message_property FROM r_enum_value WHERE enum_name = 
'transaction_type_enum' and enum_id = a.transaction_type) end as 
TransactionType_Name, (select value from m_payment_type where id = 
a.payment_type_id) as PaymentType_Name, a.chargetype as chargetype, 
a.reversal_indicator AS Reversed, a.Allocation_Type AS Allocation_Type, '' [...]
+            <column name="description" value=""/>
+            <column name="core_report" valueBoolean="false"/>
+            <column name="use_report" valueBoolean="true"/>
+            <column name="self_service_user_report" valueBoolean="false"/>
+        </insert>
+    </changeSet>
+
+    <changeSet author="fineract" id="2">
+        <insert tableName="stretchy_report_parameter">
+            <column name="report_id" valueComputed="(select id from 
stretchy_report where report_name = 'Transaction Summary Report with Asset 
Owner')"/>
+            <column name="parameter_id" valueComputed="(select id from 
stretchy_parameter where parameter_variable  = 'endDate')"/>
+            <column name="report_parameter_name" value="officeId"/>
+        </insert>
+        <insert tableName="stretchy_report_parameter">
+            <column name="report_id" valueComputed="(select id from 
stretchy_report where report_name = 'Transaction Summary Report with Asset 
Owner')"/>
+            <column name="parameter_id" valueComputed="(select id from 
stretchy_parameter where parameter_variable  = 'officeId')"/>
+            <column name="report_parameter_name" value="endDate"/>
+        </insert>
+    </changeSet>
+</databaseChangeLog>
diff --git 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
index 86f91c589..4dcd5cb6e 100644
--- 
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
+++ 
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
@@ -43,7 +43,7 @@ public class ReportsTest extends IntegrationTest {
 
     @Test
     void listReports() {
-        assertThat(ok(fineract().reports.retrieveReportList())).hasSize(126);
+        assertThat(ok(fineract().reports.retrieveReportList())).hasSize(128);
     }
 
     @Test

Reply via email to