Checked the error on the text file, and as per checking, the generated file transaction count is not tally, checked if the data in the database is correct, and as per checking in MySQL and with sir Law as well, the data is correct, the MySQL and Pentaho is tally as well, except to the mall sending, generated a text file on my side, and as per checking, the transaction count in daily and the hourly file is not tally, executed the application again and debugged it for finding the cause, after debugging, found out that cause is the extracted beginning and ending OR, resulting to incorrect transaction count, the transaction count value is coming from the computed beginning and ending OR, this formula is given by the malls and the formula is ending OR - beginning OR + 1, the formula is correct but the extracted data for the hourly file is incorrect also this needs to be clarified with sir Law as well on why the beginning and ending OR from July 20, 2022, is at thousand but on 21 it starts at 1. 