Uploaded image for project: 'Apache Fineract'
  1. Apache Fineract
  2. FINERACT-2035

Client Trend For Day Scale is not work Due to BadSqlGrammar Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.8.4
    • None
    • Reports
    • Fineract Version: 1.8.4
      Database: MySql

    Description

      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:

      1. Navigate to the home page.
      2. Click on the dashboard button.
      3. 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.

       

      Attachments

        1. Fineract Dashboard Error.mp4
          18.87 MB
          MARIAPPAN.S

        Activity

          People

            Unassigned Unassigned
            mariappan MARIAPPAN.S
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: