Deepak Kumar Posted February 2, 2013 Posted February 2, 2013 Hi all, I need a logic how to implement a scenario. Scenario: There are multiple products with product id and image. There is a project section where i use products in it. When i click on add product button, i get to see all the list of products that are unassigned. Suppose, a product, A, has been assigned in a project, X, for a period between 10/2/2013 to 15/2/2013. Since this product is busy for this period, now when i will create a new project for 16/2/2012 to 20/2/2013. Then, this product needs to be shown to add product in this project. So, can you help me how to implement this scenario. It's urgent. Thanks in advance.
Wim Decorte Posted February 2, 2013 Posted February 2, 2013 do you have both a products and a products_assignment table? If so, a search in the products assignment table for the product and the date range will return nothing, indicating that the product is available.
Deepak Kumar Posted February 2, 2013 Author Posted February 2, 2013 Thanks for the reply. I dont have product assignment table. if i have to create so, what would be stored in that table? Thanks.
Wim Decorte Posted February 2, 2013 Posted February 2, 2013 the product id, start and end date of the assignment (plus the usual: who created the assignment, when,..) A table like this will allow you: - check when something is assigned - but also see the history of a product's assignments
Recommended Posts
This topic is 4310 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now