-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regenerate invoices when a placed order is being modified by admin #103
Comments
I was thinking about this the other day. Some shops don't send an invoice in the mailbox straight away. They direct you to their webshop to download the invoice. And then 2. could be applied. There is still the edge case that the customer has already downloaded the invoice, and then the order was changed... |
@nicoes Thanks for your input. So, the client would only download the latest (maybe re-generated) version of the invoice? The shop owner would need to manage all the generated invoices + creditinvoices for each order change though, because they need invoices numbers to be consistent. There can be multiple invoices, if the admin changed the order multiple times. |
Discussion from the Vendure discord: Oidt — Today at 9:00 AM
Timur | Keeb.Supply — Today at 9:23 AM
Oidt — Today at 10:18 AM
Martijn from Pinelab — Today at 2:24 PM
|
The problem
Invoices are only generated on order placement. When an administrator changes an order, no new invoice is generated.
In the Netherlands (and probably in more places) you are not allowed to change invoices that have been sent to the customer: You need to credit the old invoice, and create a new invoice, based on the old one.
Example:
#100
created with value €200#101
with -€200. You also need to reference the original invoice on the credit invoice#102
with value €180Proposed solution
Regenerate invoice
thatInvoiceCreated
event is fired on every initial invoice generation. This only happens for the first invoice of an order.When a new invoice is created for an order that already has an invoice, the event will look like this:
When a consumer has creditInvoices disabled, it looks like this:
These events can be used to send customers the corrected version of your invoice, something like Sorry, we made a mistake We've credited invoice #123, with credit invoice #124, invoice #125 is the corrected version
Implementation
-€100
invoiceEntity.totalAmount
will mean its a credit invoiceInvoiceRecreatedEvent
The text was updated successfully, but these errors were encountered: