There was an almost similar error, I work with an affiliate project and I constantly need to track payments and have access to all data related to transactions that are carried out on the site and I don’t really want to receive a bug like this, especially when you have more than 100 orders a day and you run out reporting needs to be reset. Oddly enough, it was the trade that helped me fix this bug, so that you understand, in general, help me with the solution of this bug on the ultra-thematic site, forum, union
https://cpa.club/companies/pin-up-partners/ where I always sit to get new knowledge in my field, but there on the forum some programmers helped me fix it by throwing me a link to this topic on the forum, thanks for solving the problem!!!!