Open RachL opened 1 year ago
@RachL
what if the order is partially paid?
@abdellani thanks! I guess that if the order is partially paid and there was an invoice and the user decide to cancel it in the end, if they re-generate a invoice we need to do a credit invoice with the amount paid in negative form.
So if the previous invoice was unpaid => credit invoice of 0 Previous invoice partially paid, let's say 5 euros => credit invoice of -5 euros Previous invoice fully paid 10 euros => credit invoice of -10 euros
Does this make sense?
Description
- As a: enterprise user - On page:
/admin/orders/RXXXXX/edit
- I want to be able to do:When a paid order gets cancelled AND there was a first invoice was issued before canceling then we need to generate a credit invoice. If the order was unpaid and the order gets cancelled (through the cancel button or deleting all line items), the credit invoice should show the amount of 0 euros due left.
Same goes if the order is edited to the point
Design of the credit invoice needs 2 things: amounts in negative form + previous invoice number the credit invoice applies on:
credit invoice.pdf
Acceptance Criteria & Tests
Check this scenario on a unpaid order: the credit invoice should be generated with an amount of 0 euro.