Add invoice edit/delete with EDI modification tracking #1

Merged
amoussa1229 merged 1 commit from feature/invoice-edit-delete into main 2026-04-03 15:44:53 +00:00
amoussa1229 commented 2026-04-03 15:42:13 +00:00 (Migrated from github.com)

Summary

  • Edit invoices: PUT /invoices/:id now accepts lineItems, recalculates subtotal/tax/total, and adjusts PO billed amounts when totals change
  • EDI modification tracking: Invoices edited after EDI submission automatically get ediStatus: "modified_after_send"
  • Delete any non-paid invoice: Relaxed from draft-only to allow deleting draft, pending, and cancelled invoices (PO billed amounts reversed)
  • README updated to reflect new endpoint behavior

Test plan

  • Edit an invoice's line items and verify totals recalculate correctly
  • Edit an EDI-submitted invoice and verify ediStatus changes to modified_after_send
  • Delete a pending invoice linked to a PO and verify PO billed amount decreases
  • Confirm paid invoices cannot be edited or deleted (returns 403)

🤖 Generated with Claude Code

## Summary - **Edit invoices**: `PUT /invoices/:id` now accepts `lineItems`, recalculates subtotal/tax/total, and adjusts PO billed amounts when totals change - **EDI modification tracking**: Invoices edited after EDI submission automatically get `ediStatus: "modified_after_send"` - **Delete any non-paid invoice**: Relaxed from draft-only to allow deleting draft, pending, and cancelled invoices (PO billed amounts reversed) - README updated to reflect new endpoint behavior ## Test plan - [ ] Edit an invoice's line items and verify totals recalculate correctly - [ ] Edit an EDI-submitted invoice and verify ediStatus changes to `modified_after_send` - [ ] Delete a pending invoice linked to a PO and verify PO billed amount decreases - [ ] Confirm paid invoices cannot be edited or deleted (returns 403) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No description provided.