Fix #585 -- Creating invoices for refunded orders

This commit is contained in:
Raphael Michel
2017-09-04 20:36:19 +02:00
parent b9b4ccb180
commit ea7ec2b5fc
3 changed files with 14 additions and 3 deletions

View File

@@ -191,6 +191,10 @@ def generate_invoice(order: Order):
)
invoice = build_invoice(invoice)
invoice_pdf(invoice.pk)
if order.status in (Order.STATUS_CANCELED, Order.STATUS_REFUNDED):
generate_cancellation(invoice)
return invoice