Thank you, brother, but I already want the query to update other tables, which are the accounts table, and the time that this code takes is very long
Look, this query, it will update the accounts every time the user enters an invoice and this is a very long time to add an invoice