Developer forum

Forum » Ecommerce - Standard features » How to get invoice number and invoice date

How to get invoice number and invoice date

Pernille Mortensen
Reply

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.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Pernille

The order does not have built-in fields for invoice number and date.

You can easily create custom fields for orders that are editable from the backend: https://doc.dynamicweb.com/documentation-9/ecommerce/carts-orders/custom-fields

These fields can be rendered in the email template used for the invoice that gets send by the step change to "Completed"

BR Nicolai

 

You must be logged in to post in the forum