Cancel a renewal
defrr_cancel_renewalUse when the latest renewal is cancelled and refunded in full. Returns the credit note, the reversal for closed months and the revenue month by month. Costs 2 credits (refunded if it fails).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule | Yes | The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. | |
| termIndex | Yes | Which term: 1 is the first renewal, 2 the second, and so on. Only the latest renewal can be corrected for now, so give the position of the last term. | |
| lockedThrough | No | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |