I have created a system that has sales control ( id
, id_vendedor
, produto
), vendor ( id
, nome
, id_equipe
) and team id
, nome
) in a company.
Example: "João has id: 1 and belongs to the team: Azul; in January and the first 15 days of the month he sold 30 products; soon afterwards the company changed him to the Red team and sold 25 products on the remaining days of the month. In this company there are a total of 20 sellers. "
To make a report table with the Name of the seller, the products and teams it belongs to is easy to do, but I would like to make a report that shows the name of John and shows the amount of products sold by team and in the end show the final amount added on both teams and the value.
The difficulty is the following as John has only a id
(and this is unique for each seller) and I can only edit the team. How can I save the id, name, and team on the system to which the vendor is currently participating?