when i change status to 'Recibida' how i can save the quantity (table may have 1 or more records or lines for sure) in the table above? to save it in a variable and use it in another insert query. But it should happen only when status = Recibida, if status changes to other it should run another query too.
At the end, the main idea is: to save qty for each product and modify the original qty in product table so if had 10 before and after another 10, it should sum +10 = 20 for that product
You are already including the product_id as the primary key so if you are editing the table use {{yourTableName.recordUpdates}} Check out the documentation