SQL Prestashop v1.7.x needed for doubled order price correction automation

Job ID: 30666434

Budget: €8 – €30 EUR

* DO NOT POSTULATE IF YOU'RE NOT EXPERT ON PRESTASHOP AND SQL *
I don't know why, but sometimes the system has this strange behavior (very frequent), it doubles the totals of the orders.
As you may know, in Prestashop there are several attributes within the ps_orders table that set the total price of an order, and there is a formula for that but I don't really know how it's done exactly.
The thing is that, as you can see in the example image attached, for some orders, sometimes, the totals are doubled and I have to manually access the DB and correct that manually. What I need is a little code to be developed and added to an override of AdminOrders controller, so every time an employee opens an order in the admin page, this code must check if the totals are OK or they must be corrected, and this correction is done automatically.
I hope I've been clear enough, a savvy Prestashop programmer should easily understand the problem and find a quick solution
Thanks!
Related categories: PHP SQL Prestashop MySQL