Quantium-Nonsense / ProjectOmega

2 stars 1 forks source link

Order placing for multiple companies #65

Open HarryPi opened 4 years ago

HarryPi commented 4 years ago

When placing an order should the user be allowed to place an order from multiple companies and allow the API or Admin dashboard to handle it? Or should they place an order from each company individually ?

markscamilleri commented 4 years ago

A rep would most likely be in one company's premises at a single point in time.

The issue would be if the company owns many companies and wants to have individual invoices.

Say a rep goes to Sainsbury's. Sainsbury's wants to order a product for Argos and Sainsbury's, invoicing them individually. There's 2 scenarios:

  1. The rep visits Argos separately or makes the Argos order separately
  2. The rep can place the order for both companies. I think though that this would be fast, but also dangerous for human error?

But it is easier for now to consider only one company. Maybe the backend could keep this flexible - for example having the order field as:

{
    "order": {
             "company1": [ list-of-products ],
            "company2": [list of products],
           ...
     }
}

And for now frontend could focus on 1 company then expand?

HarryPi commented 4 years ago

Yes i agree but perhaps could the back end understand and seperate this? Thus if they want an individual invoice the back end has already seperated the order into companies and can provide that thus avoiding human errors?

markscamilleri commented 4 years ago

Yes i agree but perhaps could the back end understand and seperate this? Thus if they want an individual invoice the back end has already seperated the order into companies and can provide that thus avoiding human errors?

@Xander9 @travelingdeveloper12 @Kaylesh @ka5110

ka5110 commented 4 years ago

Now every order is a order info plus a list of {company, product, quantity, total price}

Kaylesh commented 4 years ago

Does company need to be included in the higher level list? Company is accessible through the Product entity.