From e62a3d659797c17b59dd820c33ce03a0c7a57ca3 Mon Sep 17 00:00:00 2001 From: Ashhar Ahmad Khan <145142826+AshharAhmadKhan@users.noreply.github.com> Date: Thu, 19 Feb 2026 03:33:06 +0530 Subject: [PATCH] FINERACT-2481: Remove Pentaho reports from initial data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove deprecated Pentaho report and permission entries from initial Liquibase data. Changes: - Removed 44 Pentaho reports from stretchy_report table - Removed 26 Pentaho permissions from m_permission table - Fixed 52 instances of 'falsee' typo → 'false' - Added validCheckSum=ANY to modified changeSets (id=24, 41-mysql, 1-postgresql) - Applied to both 0002_initial_data.xml (MySQL/MariaDB) and 0003_postgresql_specific_initial_data.xml (PostgreSQL) Impact: - New deployments: No Pentaho data included (clean slate) - Existing deployments: Unaffected (non-destructive approach) - Total changes: -1310 lines, +46 lines --- .../tenant/parts/0002_initial_data.xml | 3478 ++++------------- .../0003_postgresql_specific_initial_data.xml | 582 +-- .../integrationtests/client/ReportsTest.java | 4 +- 3 files changed, 847 insertions(+), 3217 deletions(-) diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml index a4037a9faee..3e5d5c5157a 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0002_initial_data.xml @@ -3461,6 +3461,7 @@ + ANY @@ -7821,86 +7822,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7909,14 +7830,6 @@ - - - - - - - - @@ -7981,30 +7894,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -8029,38 +7918,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8085,46 +7942,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8133,22 +7950,6 @@ - - - - - - - - - - - - - - - - @@ -8597,14 +8398,6 @@ - - - - - - - - @@ -12686,6 +12479,7 @@ + ANY @@ -12872,42 +12666,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -13039,30 +12797,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -13076,18 +12810,6 @@ - - - - - - - - - - - - @@ -13098,7 +12820,7 @@ value=" /* Active Client is a client linked to the 'group' via m_group_client and with an active 'status_enum'.) Active Borrowers - Borrower may be a client or a 'group' */ select x.* from m_office o, m_group g, (select a.activeClients, (b.activeClientLoans + c.activeGroupLoans) as activeLoans, b.activeClientLoans, c.activeGroupLoans, (b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers, b.activeClientBorrowers, c.activeGroupBorrowers, (b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans, b.overdueClientLoans, c.overdueGroupLoans from (select count(*) as activeClients from m_group topgroup join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%') join m_group_client gc on gc.group_id = g.id join m_client c on c.id = gc.client_id where topgroup.id = ${groupId} and c.status_enum = 300) a, (select count(*) as activeClientLoans, count(distinct(l.client_id)) as activeClientBorrowers, ifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans from m_group topgroup join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%') join m_loan l on l.group_id = g.id and l.client_id is not null left join m_loan_arrears_aging laa on laa.loan_id = l.id where topgroup.id = ${groupId} and l.loan_status_id = 300) b, (select count(*) as activeGroupLoans, count(distinct(l.group_id)) as activeGroupBorrowers, ifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans from m_group topgroup join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%') join m_loan l on l.group_id = g.id and l.client_id is null left join m_loan_arrears_aging laa on laa.loan_id = l.id where topgroup.id = ${groupId} and l.loan_status_id = 300) c ) x where g.id = ${groupId} and o.id = g.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') "/> - + @@ -13112,7 +12834,7 @@ - + @@ -13126,7 +12848,7 @@ - + @@ -13139,7 +12861,7 @@ value=" select ifnull(cur.display_symbol, l.currency_code) as Currency, /*This query will return more than one entry if more than one currency is used */ count(distinct(c.id)) as activeClients, count(*) as activeLoans, sum(l.principal_disbursed_derived) as disbursedAmount, sum(l.principal_outstanding_derived) as loanOutstandingAmount, round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC, sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance, sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) as portfolioAtRisk, round((sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC, count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) as clientsInDefault, round((count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC, (sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount from m_staff fa join m_office o on o.id = fa.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_group pgm on pgm.staff_id = fa.id join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id join m_client c on c.id = l.client_id where fa.id = ${staffId} and l.loan_status_id = 300 group by l.currency_code "/> - + @@ -13152,7 +12874,7 @@ value=" select pgm.id, pgm.display_name as `name`, sts.enum_message_property as status from m_group pgm join m_office o on o.id = pgm.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') left join r_enum_value sts on sts.enum_name = 'status_enum' and sts.enum_id = pgm.status_enum where pgm.staff_id = ${staffId} "/> - + @@ -13165,7 +12887,7 @@ value=" select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo, pgm.display_name as programName, (select count(*) from m_loan cy where cy.group_id = pgm.id and cy.client_id =c.id and cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo, c.display_name as clientDisplayName, ifnull(cur.display_symbol, l.currency_code) as Currency, ifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount, ifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount, ifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance, ifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount, if(ifnull(laa.principal_overdue_derived, 0.00) > 0, 'Yes', 'No') as inDefault, if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0) as portfolioAtRisk from m_group pgm join m_office o on o.id = pgm.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code join m_client c on c.id = l.client_id left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id where pgm.id = ${programId} and l.loan_status_id = 300 order by c.display_name, l.account_no "/> - + @@ -13178,7 +12900,7 @@ value=" select s.id, s.display_name, s.firstname, s.lastname, s.organisational_role_enum, s.organisational_role_parent_staff_id, sp.display_name as `organisational_role_parent_staff_display_name` from m_staff s join m_staff sp on s.organisational_role_parent_staff_id = sp.id where s.organisational_role_parent_staff_id = ${staffId} "/> - + @@ -13191,7 +12913,7 @@ value=" select ifnull(cur.display_symbol, l.currency_code) as Currency, /*This query will return more than one entry if more than one currency is used */ count(distinct(c.id)) as activeClients, count(*) as activeLoans, sum(l.principal_disbursed_derived) as disbursedAmount, sum(l.principal_outstanding_derived) as loanOutstandingAmount, round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC, sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance, sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) as portfolioAtRisk, round((sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC, count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) as clientsInDefault, round((count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC, (sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount from m_staff coord join m_staff fa on fa.organisational_role_parent_staff_id = coord.id join m_office o on o.id = fa.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_group pgm on pgm.staff_id = fa.id join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id join m_client c on c.id = l.client_id where coord.id = ${staffId} and l.loan_status_id = 300 group by l.currency_code "/> - + @@ -13204,7 +12926,7 @@ value=" select ifnull(cur.display_symbol, l.currency_code) as Currency, /*This query will return more than one entry if more than one currency is used */ count(distinct(c.id)) as activeClients, count(*) as activeLoans, sum(l.principal_disbursed_derived) as disbursedAmount, sum(l.principal_outstanding_derived) as loanOutstandingAmount, round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC, sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance, sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) as portfolioAtRisk, round((sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC, count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) as clientsInDefault, round((count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC, (sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount from m_staff bm join m_staff coord on coord.organisational_role_parent_staff_id = bm.id join m_staff fa on fa.organisational_role_parent_staff_id = coord.id join m_office o on o.id = fa.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_group pgm on pgm.staff_id = fa.id join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id join m_client c on c.id = l.client_id where bm.id = ${staffId} and l.loan_status_id = 300 group by l.currency_code "/> - + @@ -13217,7 +12939,7 @@ value=" select ifnull(cur.display_symbol, l.currency_code) as Currency, /*This query will return more than one entry if more than one currency is used */ count(distinct(c.id)) as activeClients, count(*) as activeLoans, sum(l.principal_disbursed_derived) as disbursedAmount, sum(l.principal_outstanding_derived) as loanOutstandingAmount, round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC, sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance, sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) as portfolioAtRisk, round((sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC, count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) as clientsInDefault, round((count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC, (sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount from m_staff pd join m_staff bm on bm.organisational_role_parent_staff_id = pd.id join m_staff coord on coord.organisational_role_parent_staff_id = bm.id join m_staff fa on fa.organisational_role_parent_staff_id = coord.id join m_office o on o.id = fa.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_group pgm on pgm.staff_id = fa.id join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id join m_client c on c.id = l.client_id where pd.id = ${staffId} and l.loan_status_id = 300 group by l.currency_code "/> - + @@ -13230,7 +12952,7 @@ value=" select ifnull(cur.display_symbol, l.currency_code) as Currency, /*This query will return more than one entry if more than one currency is used */ count(distinct(c.id)) as activeClients, count(*) as activeLoans, sum(l.principal_disbursed_derived) as disbursedAmount, sum(l.principal_outstanding_derived) as loanOutstandingAmount, round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC, sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance, sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) as portfolioAtRisk, round((sum( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC, count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) as clientsInDefault, round((count(distinct( if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()), c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC, (sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount from m_group pgm join m_office o on o.id = pgm.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%') join m_loan l on l.group_id = pgm.id and l.client_id is not null left join m_currency cur on cur.code = l.currency_code left join m_loan_arrears_aging laa on laa.loan_id = l.id left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id join m_client c on c.id = l.client_id where pgm.id = ${programId} and l.loan_status_id = 300 group by l.currency_code "/> - + @@ -13243,7 +12965,7 @@ value="SELECT x.* FROM m_client c, m_office o, ( SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, (SELECT count(l.id), IFNULL(l.principal_amount,0) AS 'lastLoanAmount' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300) group by l.principal_amount) b, (SELECT COUNT(s.id) AS 'activeSavings', IFNULL(SUM(s.account_balance_derived),0) AS 'totalSavings' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d ) x WHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT('${currentUserHierarchy}', '%')"/> - + @@ -13256,7 +12978,7 @@ value="SELECT lp.name AS 'productName', MAX(l.loan_product_counter) AS 'loanProductCycle' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id"/> - + @@ -13270,2820 +12992,1344 @@ - - - - - - - - - - - - - + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + - + - - - - + + + + - - + + - + - - - - + + + + - - + + - + - - - - + + + + - - + + - + - - - - + + + + - - + + - + - - - - + + + + - - + + - + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + - + - - - - - + + + + + - - - + value="SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, '%') AND ounder.hierarchy like CONCAT('.', '%') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(''))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1) and (ml.id = ${loanId} or ${loanId} = -1) and (mc.id = ${clientId} or ${clientId} = -1) and (mc.group_id = ${groupId} or ${groupId} = -1) and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)"/> + + + - - - - + + + + - - - + value="SELECT c.id AS "id", c.firstname AS "firstName", c.middlename AS "middleName", c.lastname AS "lastName", c.display_name AS "fullName", c.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH( REPLACE(ounder.`hierarchy`, '.', '')) - 1))), ounder.`name`) AS "officeName", o.id AS "officeNumber" FROM m_office o JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, '%') JOIN m_client c ON c.office_id = ounder.id LEFT JOIN r_enum_value r ON r.enum_name = 'status_enum' AND r.enum_id = c.status_enum WHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})"/> + + + - - - - + + + + - - - + value="SELECT c.id AS "id", c.firstname AS "firstName", c.middlename AS "middleName", c.lastname AS "lastName", c.display_name AS "fullName", c.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH( REPLACE(ounder.`hierarchy`, '.', '')) - 1))), ounder.`name`) AS "officeName", o.id AS "officeNumber" FROM m_office o JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, '%') JOIN m_client c ON c.office_id = ounder.id LEFT JOIN r_enum_value r ON r.enum_name = 'status_enum' AND r.enum_id = c.status_enum WHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})"/> + + + - - - - - + + + + + - - - + value="SELECT c.id AS "id", c.firstname AS "firstName", c.middlename AS "middleName", c.lastname AS "lastName", c.display_name AS "fullName", c.mobile_no AS "mobileNo", s.account_no AS "savingsAccountNo", ounder.id AS "officeNumber", ounder.name AS "officeName" FROM m_office o JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, '%') JOIN m_client c ON c.office_id = ounder.id JOIN m_savings_account s ON s.client_id = c.id JOIN m_savings_product sp ON sp.id = s.product_id LEFT JOIN m_staff st ON st.id = s.field_officer_id LEFT JOIN m_currency cur ON cur.code = s.currency_code WHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}"/> + + + - - - - - + + + + + - - - + value="SELECT c.id AS "id", c.firstname AS "firstName", c.middlename AS "middleName", c.lastname AS "lastName", c.display_name AS "fullName", c.mobile_no AS "mobileNo", s.account_no AS "savingsAccountNo", ounder.id AS "officeNumber", ounder.name AS "officeName" FROM m_office o JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, '%') JOIN m_client c ON c.office_id = ounder.id JOIN m_savings_account s ON s.client_id = c.id JOIN m_savings_product sp ON sp.id = s.product_id LEFT JOIN m_staff st ON st.id = s.field_officer_id LEFT JOIN m_currency cur ON cur.code = s.currency_code WHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}"/> + + + - - - - - + + + + + - - - + value="SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,'') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo, ms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS depositAmount, ms.account_balance_derived AS balance, mst.transactionDate AS transactionDate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, '%') AND ounder.hierarchy LIKE CONCAT('.', '%') LEFT JOIN ( SELECT sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, mc.display_name AS display_name, mc.status_enum AS status_enum, mc.mobile_no AS mobile_no, mc.office_id AS office_id, mc.staff_id AS staff_id FROM m_savings_account sa LEFT JOIN m_client mc ON mc.id = sa.client_id ORDER BY savingsId) sc ON sc.office_id = ounder.id RIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id RIGHT JOIN( SELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate FROM m_savings_account_transaction st WHERE st.is_reversed = 0 GROUP BY st.savings_account_id ) AS mst ON mst.savings_account_id = ms.id WHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}"/> + + + - - - - - + + + + + - - - + value="SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,'') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo, ms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS withdrawAmount, ms.account_balance_derived AS balance, mst.transactionDate AS transactionDate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, '%') AND ounder.hierarchy LIKE CONCAT('.', '%') LEFT JOIN ( SELECT sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, mc.display_name AS display_name, mc.status_enum AS status_enum, mc.mobile_no AS mobile_no, mc.office_id AS office_id, mc.staff_id AS staff_id FROM m_savings_account sa LEFT JOIN m_client mc ON mc.id = sa.client_id ORDER BY savingsId) sc ON sc.office_id = ounder.id RIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id RIGHT JOIN( SELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate FROM m_savings_account_transaction st WHERE st.is_reversed = 0 GROUP BY st.savings_account_id ) AS mst ON mst.savings_account_id = ms.id WHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}"/> + + + - - + + - - - - + + + + - + - - + + - - - - - - - - - - - - - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - + - - + + - + - - + + - + - - + + - - - - - - - + - - + + - + - - + + - - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - - - + + + + - - + + + + + + + + + + + + + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + + + + + + + + + + + + + + + + + + + - - + + - + - - - - + + + + - - + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + + + + + + + - + - - + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - + - - + + - + - - + + - + - - - - + + + + - - - - + + + + - - + + - - - - - - - + - - + + - - - - - - - + - - + + - - - - - - - + - - + + - + - - - - + + + + - - + + - - - - - - - + - - - - + + + + - - - - + + + + - - + + - - - - - - - + - - + + - - - - - - - + - - + + - - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - + - - - - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - + - - - - + + + + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - - - - - - - - - - - - - - - - - - - + - - + + - + - - + + - + - - + + - + - - + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + + + + + + + - + - - + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -16133,96 +14379,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml index 96e19ebe8c6..f9b257816eb 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml @@ -23,6 +23,7 @@ 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.1.xsd"> + ANY @@ -474,6 +475,7 @@ + ANY @@ -642,42 +644,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -798,30 +764,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -834,18 +776,6 @@ - - - - - - - - - - - - @@ -855,7 +785,7 @@ - + @@ -867,7 +797,7 @@ - + @@ -879,7 +809,7 @@ - + @@ -891,7 +821,7 @@ - + @@ -903,7 +833,7 @@ - + @@ -915,7 +845,7 @@ - + @@ -927,7 +857,7 @@ - + @@ -939,7 +869,7 @@ - + @@ -951,7 +881,7 @@ - + @@ -963,7 +893,7 @@ - + @@ -975,7 +905,7 @@ - + @@ -987,7 +917,7 @@ - + @@ -999,7 +929,7 @@ - + @@ -1011,367 +941,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1383,7 +953,7 @@ - + @@ -1395,7 +965,7 @@ - + @@ -1407,7 +977,7 @@ - + @@ -1419,7 +989,7 @@ - + @@ -1431,7 +1001,7 @@ - + @@ -1443,7 +1013,7 @@ - + @@ -1455,7 +1025,7 @@ - + @@ -1467,7 +1037,7 @@ - + @@ -1479,103 +1049,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1755,7 +1229,7 @@ - + @@ -1767,7 +1241,7 @@ - + @@ -1779,7 +1253,7 @@ - + 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 4d3ad68ce1a..4b0adb69cee 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 @@ -48,7 +48,7 @@ public void setup() { @Test void listReports() { - assertThat(ok(fineractClient().reports.retrieveReportList())).hasSize(128); + assertThat(ok(fineractClient().reports.retrieveReportList())).hasSize(84); } @Test @@ -83,7 +83,7 @@ void runExpectedPaymentsPentahoReportWithoutPlugin() { () -> ok(fineractClient().reportsRun.runReportGetFile("Expected Payments By Date - Formatted", Map.of("R_endDate", "2013-04-30", "R_loanOfficerId", "-1", "R_officeId", "1", "R_startDate", "2013-04-16", "output-type", "PDF"), false))); - assertEquals(503, exception.getResponse().code()); + assertEquals(404, exception.getResponse().code()); } @Test