Skip to content

Let an administrator create this month's invoices for a group - #48

Merged
Abdulmajidkhan007 merged 1 commit into
nurulloh-coder-dev:Nfrom
Abdulmajidkhan007:claude/group-invoice
Sep 9, 2026
Merged

Abdulmajidkhan007 merged 1 commit into
nurulloh-coder-dev:Nfrom
Abdulmajidkhan007:claude/group-invoice

Conversation

@Abdulmajidkhan007

Copy link
Copy Markdown
Collaborator

Invoices are normally generated after the month's lessons finish. When that does not happen there was no way to recover from the UI, so the payments screen gets a group picker and a button behind the new POST /invoice/{groupId}.

A second press returns 409, which is not really an error — it means the invoices are already there. That case gets its own message rather than the server's English text; every other failure still shows what the server said, since those are the ones an administrator cannot guess (a level with no monthly fee, a group with no students).

Refunds are now sent as a negative amount. The backend adds whatever it receives to the balance without looking at the transaction type — it negates the monthly fee itself when it writes one — so a positive refund would have grown the debt instead of shrinking it.

Claude-Session: https://claude.ai/code/session_01B7ST2QLMxbKy7uj1gTp85n

Invoices are normally generated after the month's lessons finish. When
that does not happen there was no way to recover from the UI, so the
payments screen gets a group picker and a button behind the new
`POST /invoice/{groupId}`.

A second press returns 409, which is not really an error — it means the
invoices are already there. That case gets its own message rather than
the server's English text; every other failure still shows what the
server said, since those are the ones an administrator cannot guess
(a level with no monthly fee, a group with no students).

Refunds are now sent as a negative amount. The backend adds whatever it
receives to the balance without looking at the transaction type — it
negates the monthly fee itself when it writes one — so a positive refund
would have grown the debt instead of shrinking it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B7ST2QLMxbKy7uj1gTp85n
@Abdulmajidkhan007
Abdulmajidkhan007 merged commit ecc6e86 into nurulloh-coder-dev:N Sep 9, 2026
1 check passed
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.

2 participants