(stateless) Attach a viitenumbri alusnumber to every client in Merit without one. It's an unique (currently sequential) number across the clients required for automatic matching of payments to client/invoices.
Logic for creating clients in Merit based on OIDC users. Name, e-mail, for companies contact person (maybe custom field for username, to keep clients-oidc linked when e-mails change). Billing e-mail may differ from sign-in e-mail. Some are private clients, some use a company for billing (org:something group). Make sure the linked org is actually valid.
Create a periodic invoice based on OIDC groups (just k-space:floor = supporter, + k-space:workshop = member, k-space:resident = resident). For companies, add the numbers up, and include it in on invoice count.
Compatible with human review and edits: row classification (billing category not shown on invoice, the drop-down in UI), name displayed, discount (may be 100% for very custom deals) on invoice. If any user is added to the company, the price is supposed to automatically go up. Somehow don't touch fully custom rows (for now VM / server / office billing).
Logic for ending periodic invoices when adding tag k-space:offboarded.
Keep periodic invoice generation and sending out manual for now. There just needs to be better scheduling on the human end. This permits temporarily disabling generating invoices and sending out when there is a mistake / confusion.
Since https://git.k-space.ee/k-space/todo/issues/83 is too big, instead first:
- (stateless) Attach a viitenumbri alusnumber to every client in Merit without one. It's an unique (currently sequential) number across the clients required for automatic matching of payments to client/invoices.
- Logic for creating clients in Merit based on OIDC users. Name, e-mail, for companies contact person (maybe custom field for username, to keep clients-oidc linked when e-mails change). Billing e-mail may differ from sign-in e-mail. Some are private clients, some use a company for billing (`org:something` group). Make sure the linked org is actually valid.
- Create a periodic invoice based on OIDC groups (just `k-space:floor` = supporter, + `k-space:workshop` = member, `k-space:resident` = resident). For companies, add the numbers up, and include it in on invoice count.
- Compatible with human review and edits: row classification (billing category not shown on invoice, the drop-down in UI), name displayed, discount (may be 100% for very custom deals) on invoice. If any user is added to the company, the price is supposed to automatically go up. Somehow don't touch fully custom rows (for now VM / server / office billing).
- Logic for ending periodic invoices when adding tag `k-space:offboarded`.
Keep periodic invoice generation and sending out manual for now. There just needs to be better scheduling on the human end. This permits temporarily disabling generating invoices and sending out when there is a mistake / confusion.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Since #83 is too big, instead first:
org:somethinggroup). Make sure the linked org is actually valid.k-space:floor= supporter, +k-space:workshop= member,k-space:resident= resident). For companies, add the numbers up, and include it in on invoice count.k-space:offboarded.Keep periodic invoice generation and sending out manual for now. There just needs to be better scheduling on the human end. This permits temporarily disabling generating invoices and sending out when there is a mistake / confusion.