Skip to content

Rebuild payments around the invoice + transaction model - #45

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

Abdulmajidkhan007 merged 1 commit into
nurulloh-coder-dev:Nfrom
Abdulmajidkhan007:claude/payments-transactions

Conversation

@Abdulmajidkhan007

Copy link
Copy Markdown
Collaborator

The backend replaced the payment model: an invoice is now created automatically after the twelfth lesson and its amount is frozen, while each payment is a separate transaction attached to it. InvoiceDto lost student, status and type, PUT /invoice/{id} and POST /invoice/return are gone, and Enrollment.monthlyFee was dropped. The screen was still written against the old shape, so the student, status and type columns rendered empty and both write actions pointed at endpoints that no longer exist.

The page now shows invoices and payment activity side by side, and the primary action is recording a payment — the thing an administrator actually does daily. Invoice creation is not offered: InvoiceCreateDto takes a JPA Enrollment rather than an id, so no client can call it. The invoice's student is resolved from the student list the screen already loads, since the DTO carries only an id.

/student/me lost its groupId parameter and its status field in the same backend change; the balance is now student-wide, so the query no longer waits for the group list.

Known backend problems found while doing this are written up in docs/backend-notes.md — the refund transaction moves the balance the wrong way, and invoice creation is uncallable.

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

The backend replaced the payment model: an invoice is now created
automatically after the twelfth lesson and its amount is frozen, while
each payment is a separate transaction attached to it. `InvoiceDto` lost
`student`, `status` and `type`, `PUT /invoice/{id}` and
`POST /invoice/return` are gone, and `Enrollment.monthlyFee` was dropped.
The screen was still written against the old shape, so the student,
status and type columns rendered empty and both write actions pointed at
endpoints that no longer exist.

The page now shows invoices and payment activity side by side, and the
primary action is recording a payment — the thing an administrator
actually does daily. Invoice creation is not offered: `InvoiceCreateDto`
takes a JPA `Enrollment` rather than an id, so no client can call it.
The invoice's student is resolved from the student list the screen
already loads, since the DTO carries only an id.

`/student/me` lost its groupId parameter and its status field in the same
backend change; the balance is now student-wide, so the query no longer
waits for the group list.

Known backend problems found while doing this are written up in
docs/backend-notes.md — the refund transaction moves the balance the
wrong way, and invoice creation is uncallable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B7ST2QLMxbKy7uj1gTp85n
@Abdulmajidkhan007
Abdulmajidkhan007 merged commit fb14597 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