Skip to content

[People · Phase 2] Soci fees: uploads, review and fee emails #123

Description

@toto04

Goal

The yearly association fee: the socio uploads a transfer receipt, then the Direttivo confirms it (or rejects it with a reason) or marks the fee as paid by hand. Automatic fee emails go to the PoliNetwork mailbox. No receipts are issued by the association. Phase 2: PoliNetworkOrg/admin#144. Design: docs/people/soci.md (PoliNetworkOrg/admin#154). Builds on #122.

Rules (hard-coded, from the Regolamento Interno)

  • Amount: €5.00.
  • Fee year: 1 Sep Y – 31 Aug Y+1 (2026/27). Renewals until 31 Dec Y.
  • At admission: the current year is recorded as paid (method admission).
  • Summer exemption: admitted 1 Jun – 31 Aug: the next year is Exempt.
  • Ended soci: no fee is opened for a socio whose status has ended.
  • Configuration: SOCI_IBAN and SOCI_BENEFICIARY (env). Payment reference: Quota 2026/27 0344 Nome Cognome.

Data

  • soci_fees: unique per socio and year.
    • Status due | uploaded | paid | exempt, and the amount.
    • The upload: file, transfer date, declared amount.
    • The review: by, at, last rejection reason.
    • The payment: paid on, method (transfer | admission | other), note, by.
  • soci_files: bytea; PDF / PNG / JPEG up to 10 MB, content sniffed like the removed people_files (git show f70dae3^:src/people/files.ts). Never expired.
  • soci_mail: an outbox with an idempotency key per email, drained by the every-minute job.

Procedures

Procedure Policy
fees.list (year, status), fees.file admin:access + soci:read
fees.confirm, fees.reject (reason required), fees.markPaid (date, method, note) admin:access + soci:write
me.get (record, fees, bank details, missing fields), me.uploadReceipt (FormData), me.completeDetails (fills only empty fields) people:self, matched by the snapshot's entraObjectId (PoliNetworkOrg/auth#84)

Jobs and emails (Italian React Email, greeting the alias when set)

When What
1 Sep, daily and idempotent Open the fee year (Due / Exempt) and send the opening email: amount, IBAN, reference, deadline, My area link
1 Dec and 21 Dec Reminder to fees still Due (not uploaded)
On confirm / mark paid Fee confirmed
On reject The reason

Done when

  • Procedures, jobs and templates exist, with agent-friendly previews (bun run email).
  • Tests cover:
    • the exemption and admission rules;
    • opening a year twice opens nothing new;
    • reminders skip uploaded fees and never send twice;
    • upload type and size checks;
    • me.* refusing accounts without a socio record.

Activity

  1. added
    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)
    on Nov 9, 2026
  2. added theissue type on Nov 9, 2026
  3. coderabbitai commented on Nov 9, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #104 - refactor(people)!: remove Soci, fees, receipts, census and record matching [closed]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added a commit that references this issue on Nov 13, 2026
    5dd290e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    peoplePeople: Group Admins, Capo Admins, Teams, Soci and census (see the People roadmap)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions