I would like to be able to send out an email invoice to the customer when the order state is changed to "Completed".
Invoice number:
It is a legal requirement in Denmark that an invoice must have an invoice number. This number must be consecutively. This means that there can't be any gabs in the numbers and because of that we can't use the order ID (because some orders might never be completed and that will leave a gab).
Is there a invoice number in Dynamicweb that I have overlooked? Or do you have any suggestions on how to do this?
Invoice date:
It is a legal requirement that the invoice must have an invoice date as well. It is the date where the order is set to completed. It will not always be the order date. Is there any way to get the date for when the order is changed to completed? I tried @GetString("Ecom:Order.Completed") but that seems to return the order date.