Select only the products that the seller has assigned

Good morning appreciated community, I once again require your help.

I have the tables:

Products: where each product in my warehouse or warehouse is listed, here are absolutely all the products we handle in the company.

Transactions: All movements related to products are carried out in this table. Within this table there is a field called "transaction type" with the following options:

* DELIVERED TO SELLER: It is used to record all the products that I deliver to any seller (seller 1, seller 2, seller 3, etc.). It should be noted that each seller has different products and quantities associated with them, which were assigned with this option.

*SOLD: This option is used to record products that have been sold. Additionally, the person who sold the product must be selected.

Also in the "transactions" table there is a field called "Product" that initially assigns type "ref" to the "products" table. But therein lies the problem, I want that if in the transaction table I select "type of movement = sold" and "seller = seller 2" when selecting "Product" only the products that have been assigned to seller 2 will appear. I hope have made me understand, because as I currently have it configured with type "ref" all the products that I have in the warehouse appear, even if the seller is not assigned to it.

In summary, I would like that when a seller was going to sell a product, he could only select the ones assigned to him.

Thank you very much for your time and help guys.

0 1 90
1 REPLY 1


@Royabby wrote:

when selecting "Product" only the products that have been assigned to seller 2 will appear


Did you get this figured out?  Your description is not clear.  How are Products assigned to a seller?

Top Labels in this Space