This story builds upon the work done in
MODINVOICE-54 by adding validation and handling special/edge cases.
See the wiki for background/details.
- Validations/special cases
- if an adjustment is added to an invoiceLine w/ the prorate field, remove the field
- if an adjustment w/ an adjustmentId is removed, ensure that corresponding prorated invoice adjustment also no longer exists. If it does, return an appropriate error
- If an adjustment w/ an adjustmentId is added, ensure that the adjustment pointed to by that ID exists. If not, return an error.
- DIsallow adjusmtents with the same adjustmentId in a given invoiceLine. Return an error if this happens.
- Basic distribution of prorated adjustments is handled in an earlier story (
- the validations/special cases noted above are in place
- Unit tests are updated
- API tests are updated.