MARIAPPAN.S created FINERACT-2035:
-------------------------------------

             Summary: Client Trend For Day Scale is not work Due to 
BadSqlGrammer Error
                 Key: FINERACT-2035
                 URL: https://issues.apache.org/jira/browse/FINERACT-2035
             Project: Apache Fineract
          Issue Type: Bug
          Components: Reports
    Affects Versions: 1.8.4
         Environment: Fineract Version: 1.8.4
Database: MySql
            Reporter: MARIAPPAN.S
         Attachments: Fineract Dashboard Error.mp4

When navigating to the home page and clicking on the dashboard button, I 
encountered a BadSqlGrammar error specifically in the Client trend chart for 
day-wise data. This issue does not occur when switching to monthly or yearly 
charts. The error seems to be associated with an SQL query related to counting 
loans disbursed on specific dates.

*Steps to Reproduce:*
 # Navigate to the home page.
 # Click on the dashboard button.
 # Observe the Client trend chart for day-wise data.

*Error Messages:* In the console, the following SQL error is reported:

Reporting error: StatementCallback; bad SQL grammar [select x.* from (SELECT 
COUNT(ln.id) AS lcount, DATE(ln.disbursedon_date) AS days FROM m_office o LEFT 
JOIN m_client cl on o.id = cl.office_id LEFT JOIN m_loan ln on cl.id = 
ln.client_id WHERE o.hierarchy like concat((select ino.hierarchy from m_office 
ino where ino.id = 1),'%' ) AND (ln.disbursedon_date BETWEEN 
DATE_SUB(DATE('2023-12-28'), INTERVAL 12 DAY) AND DATE(TIMESTAMP('2023-12-28 
16:02:10')- INTERVAL '1 DAY')) GROUP BY days ) x] 

*Expected Behavior:* The Client trend chart for day-wise data should load 
without any SQL errors when clicking the dashboard button.

*Actual Behavior:* Encountered BadSqlGrammar error in the Client trend chart 
for day-wise data on the dashboard.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to