Skip to content

Allow only one final invoice per project - #604

Open
clstaudt wants to merge 1 commit into
mainfrom
one-final-invoice-per-project
Open

clstaudt wants to merge 1 commit into
mainfrom
one-final-invoice-per-project

Conversation

@clstaudt

@clstaudt clstaudt commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

A second final invoice for a project went through: the check for an existing settlement called a data-source method that was never implemented. The new final invoice took over the deposits, so the first one's balance jumped back to the full price, and revenue counted the contract twice.

  • Model: Project.final_invoice and Project.is_settled. A cancelled final invoice settles nothing.
  • Create: a second final invoice is refused with a message that names the existing one and says to cancel it first. This also holds for contracts without deposits.
  • Dialog: Final is disabled for a settled project.
  • RPC: an invoice's nested project is now just {id, title}, which is all the UI reads.

馃 Generated with Claude Code

@clstaudt
clstaudt added this pull request to stack #608 October 18, 2026 12:11
@clstaudt
clstaudt force-pushed the one-final-invoice-per-project branch from eb6476d to d9d0e39 Compare October 18, 2026 20:21
A second final invoice for a project went through, because the check for
an existing settlement relied on a data-source method that was never
implemented. The new final invoice took over the deposits, so the first
one's balance jumped back to the full price, and revenue counted the
contract twice.

A project now knows it is settled while it has a final invoice that is
not cancelled. Creating another final invoice is refused with a message
that names the existing one and says to cancel it first, also on
fixed-price contracts without deposits. The invoice dialog no longer
offers Final for a settled project. An invoice now carries only the id
and title of its project, so serialising it does not need the project's
invoices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@clstaudt
clstaudt force-pushed the one-final-invoice-per-project branch from d9d0e39 to 10e7285 Compare October 20, 2026 13:25

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant