It turns out that I have an app for preventive maintenance. My problem is this:
In the "orders" table, the orders of each "resource" or team are loaded. But preventive maintenance is done every so often, so when loading a Preventive work order, it is asked how often it should be done, so the user should see in his "desk" if he has orders to expire.
How do I do so, eg: Resource 1 has a work order every 30 days? the first one is easy, because when creating the first work order (let's call it OT A) 30 days are added to the creation date, but I need that once the OT A expires, another work order B is created at the same time resource automatically, and the OT B expired, the OT C is created and so on ...
The base orders have the following structure:
id_ot, id_recurso, protocolo, tipoman, fechaot, fechavto, usercarga,
estado_ot, observa_orden, cierra_ot, user_cierra, fecha_cierra
I hope you explained, thank you very much!