I have a scenario here I need help with.
I have developed an ordering system. I have 3 tables; Customer, Orders and OrdersDetails.
Customers >> Orders >> OrdersDetails.
User select customers(customer table) from dropdown, click new order(order table) and add multiple items (order details) for that order. All works well.
The scenario I need help is something like this.
My client would like to order stock. They might buy something in bulk and than assign stock to different customers later on.
I have created a customer "stock customer". When I need to order any stock I select "Stock Customer" and than I add all the stock which I place on order. Once that stock is arrived, I will mark the order status as arrived.
I'm struggling on how would I assign any stock to different customer. I might me assigning one order line item to one customer and another to another customer.
I have button "Assign" next to each row of stock. Clicking that open popup. In the popup i have a dropdown menu of customer which user would select to assign that line item. If I simply change the customerID of the line item to the selected customer, it wont work.
Anyone has any ideas of how I can re-juggle this scenario and solve this.