openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.12k stars 723 forks source link

Add entreprise HQ credentials in business details #6243

Closed RachL closed 3 years ago

RachL commented 4 years ago

Description

- As a: enterprise user - On page: /edit#/business_details - I want to be able to do: specify the address of my company and my company legal name.

A little context: currently enterprises can be pick-up points, or unique shops. When the enterprise is a pickup point, the enterprise address is the address of the pickup point.

This lead to wrong address showing up on invoices from the shop to shoppers, but also invoices from instances to shop.

This is a legal compliance problem as well because instances are legally required to collect legal name and addresses of their clients.

Ideally this should be mandatory information on registration. To introduce minimal changes for now the proposal is to only add the new fields in business details.

Acceptance Criteria & Tests

  1. As an entreprise admin, go to /edit#/business_details
  2. 3 new fields are introduce: Enterprise name, Address & Phone number
  3. If any of these fields are supplied, these details are used on Invoices. Only on invoices and in no where else in the system.
  4. If any of these fields are empty, the current (public) name, address and phone details are used on invoices (ie no change).
  5. The changes apply to all invoice templates
  6. All fields are translated

How should it look like?

We need to include a label or mini-section-header within Enterprise Settings -> Business Details:

Legal Business Details

legalbusinessdetails

Erioldoesdesign commented 4 years ago

No design needed, these are simple new fields in the settings section.

The only potential problem I can foresee is similar to registration of rural farm addresses sometimes the address isn't 'accurate' on a map without the users moving a pin point to the location of where they receive mail/letters on a site or large farm grounds. But we're not including a map positioning on this piece of work but something to keep in mind re. addresses of rural places.

lin-d-hop commented 3 years ago

Just a quick thought: There are already fields for address, contact etc within Enterprise Settings. I understand these are different but I want to make sure we minimise confusion. Let's just make sure that is very clear within the Business Details section that these are Legal and Invoice details. Perhaps we need to include a label or mini-section-header within Enterprise Settings -> Business Details:

Legal and Invoice Details if blank your public contact details will be used Enterprise Name: Address: Phone Number:

Matt-Yorkley commented 3 years ago

There's a few different dimensions to this and it's not super clear from the dev side exactly how we should implement the "fix".

Addresses and Tax

Orders determine what taxes should be applied based on the distributor's address (this is more relevant for US and CA). If we're introducing an extra address per enterprise we need to think carefully about how that will interact with the "tax address". For example if there's a "headquarters address" and a "shop address" and they're in different states, the shop address is the point of sale and the relevant one for taxes...?

Addresses for delivery methods

Is part of this issue that we need different addresses for delivery methods (like pickup)? What if a distributor had two different pickup options at two different locations? Would it actually make sense in that case to allow the delivery method itself to have an address attached to it?

RachL commented 3 years ago

Thanks @Matt-Yorkley :) Maybe a topic for delivery train tomorrow. A few thoughts:

Orders determine what taxes should be applied based on the distributor's address

Here the scope is just to change the address on the PDF invoice, not anywhere else. So we should leave the order as is. It's not technically possible?

Is part of this issue that we need different addresses for delivery methods (like pickup)?

Actually, in FR's case I'm not sure this wouldn't solve the issue. We have 5 to 6 hubs that are running around 20 pick-up points. They need these pick-up points to show on the map. Adding the address to the shipping methods would then require another work to add the shipping methods' address on the map. But maybe it is easier 🤷

Matt-Yorkley commented 3 years ago

Cool. I'm just trying to line up some issues that are relatively simple and clearly scoped, and I'm not sure this is one of them :sweat_smile:

lin-d-hop commented 3 years ago

@Matt-Yorkley everything you describe in your comment sounds like scope creep to me :-P

It is a standard thing for businesses to have different legal name and address to their public one. Tax addresses will continue to be based on the public address. Delivery methods will not yet have addresses. This is a feature request that would be great, but out of scope here.

Personally I am happy with the scope described by @RachL The new address field is ONLY used on invoices. And this field is not compulsory so invoices should revert to Public Address details when these fields are blank.

Any other usage or interactions with this address are out of scope of this issue.

lin-d-hop commented 3 years ago

Okay, I've had a look at this one to give a little more information to help with understanding what this should look like.

legalbusinessdetails

All three tooltip texts can be the same and can say:

Company Legal Name, Legal Address and Legal Phone number are used for businesses that invoice from a legal entity registered with different details to their public trading information. These details will ONLY be used on invoices. If these details are blank your public Name, Address and Phone Number will be used on invoices.