Trace order amendments through invoice lines and generate legally compliant invoices

My notes after the meeting with @abdellani @jibees and @filipefurtado :

  • The work will be done step by step against a feature-toggle. First step will be to be able to generate an invoice at the edit order level. We want to be able to do this on any completed orders. If the user re-generates the invoice, we issue a new invoice if the order was changed, if not we keep the previous invoice. This means we need to have an accurate updated_at date.

  • What do we consider order changes/amendments? => adding or deleting products, changing weight through BOM, editing quantities, adding adjustment, changing payment method, updating fees, adding a tracking number, adding a note, capturing payment. See this doc for last update: order attributes (invoices) - Google Sheets

  • Invoices are only generated when the user ask for them. No automatic generation. We can even disable the generate button in the order edit page if the order had no changes since the previous generation of invoice

  • Once the edit order page works, we can move on to Bulk invoice printing and after that to the feature that allows to send invoice per email. Once these 3 steps are done, the feature toggle can be removed

  • On these first steps, we will ignore the invoice number, this will be handled in a second release

Let’s move to github from now on. I’ve started this epic in wishlist, we can move to main repo as soon as we are ready to pick up the work:

Slack channel is #legal-invoices