feat: allow date/reference updates on authorised credit notes#195
Open
rathga wants to merge 1 commit into
Open
feat: allow date/reference updates on authorised credit notes#195rathga wants to merge 1 commit into
rathga wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Relaxes the DRAFT-only guard on
update-credit-noteso that AUTHORISED credit notes can have their date and reference updated. Line items and contact remain locked once a credit note is approved, and PAID/VOIDED credit notes are still rejected.Why
Xero's API (and UI) permit limited edits to an approved credit note — most commonly correcting its date or reference. The MCP currently rejects any update to a non-draft credit note, forcing users into the Xero UI for a simple date fix. This pairs with #194: a fully allocated credit note reports status PAID, so the workflow for correcting it is de-allocate (PAID → AUTHORISED) → fix the date via this tool → re-allocate.
Changes
src/handlers/update-xero-credit-note.handler.ts— AUTHORISED credit notes accept date/reference updates; supplyinglineItemsorcontactIdfor an authorised credit note returns a clear error; other non-draft statuses are rejected as before (with an updated message)src/tools/update/update-credit-note.tool.ts— tool description updated to matchTesting
npm run build,npm run lint,npm testall pass🤖 Generated with Claude Code