Expense request
An expense, a trip or a purchase, checked, approved and decided by the roles the Authority Rules (fictional), Article 12, Appendix 2 give its category and amount
File: expense.ringi (the request expense, version 1, sha256:058e89be8b5bcb64).
Kept by the team Accounting (accounting).
The organization is read in each of its versions: from 2026-04-01 and 2027-04-01.
When it can be used
- From 2026-04-01: the first version of the organization
shared/company.ringi(data../org). - With no end: nothing it reads ends.
Who may submit it
Everyone in the organization may submit it.
In numbers: 24 of 24 people in the organization from 2026-04-01, and 23 of 23 from 2027-04-01.
A person may also submit it in the name of someone they stand in for (a proxy for submitting): the request is then that person's.
Form
| Field | Type | Accepts | Required | Shown |
|---|---|---|---|---|
| Category | one of Travel, Expenses or Purchase | — | yes | always |
| Items | rows | 1 to 20 rows | yes | always |
| Items › What | text, one line | up to 100 characters | yes | always |
| Items › Price | amount in JPY | from 1 JPY to 1,000,000 JPY | yes | always |
| Amount | amount in JPY, worked out: the total of “Price” over the rows of “Items” | from 1 JPY to 10,000,000 JPY (worked out, it can be from 1 JPY to 20,000,000 JPY) | worked out | always |
| Purpose | text | 1 to 200 characters | yes | always |
| Date of use | date | from 2026-01-01 to 2027-12-31 | yes | always |
| Destination | text, one line | up to 100 characters | yes | when “Category” is “Travel” |
| Receipt | a file | — | when “Amount” is more than 30,000 JPY | always |
| Account code | a row of Account codes (m.accounts) | — | filled in by an approver | always |
A field left empty has no value: one that is optional, one asked for or shown on a condition, and one an approver fills in, until they do. A condition that a field “is not” a value holds when it has no value; one that it “is” a value, or that compares it, does not. A computation that reads a field with no value has none either, but a total, which adds the rows whose cell is filled in.
A computed field accepts what its range says: a request whose value falls outside it is refused, and the route's table needs to cover only that.
Route
The route depends on “Category” and “Amount”. Each row is one case, with the stages it goes through, in order; who answers each stage is said under “How the approvers are chosen”.
| Category | Amount | Route |
|---|---|---|
| Travel | 30,000 JPY or less | travel_agent (decide) |
| Travel | more than 30,000 JPY and 100,000 JPY or less | manager (decide) |
| Travel | more than 100,000 JPY | manager (first) → dept_head (decide) |
| Expenses | 100,000 JPY or less | check (precheck) → manager (decide) |
| Expenses | more than 100,000 JPY and 1,000,000 JPY or less | check (precheck) → manager (first) → dept_head (decide) |
| Expenses | more than 1,000,000 JPY | manager (first) → dept_head (second) → division_head (decide) |
| Purchase | 1,000,000 JPY or less | manager (first) → accounting (second) → dept_head (decide) |
| Purchase | more than 1,000,000 JPY | manager (first) → dept_head and accounting (second) → division_head (decide) |
How the approvers are chosen
| Approver | Who it is |
|---|---|
| manager | the requester's manager: the head of the team the requester is mainly in, or of the team above where that head is the requester or there is none |
| dept_head | the head of the first team of the kind Department (department) above the requester |
| accounting | the members of the team Accounting (accounting): one of them answers |
| division_head | the first head above the requester whose position is Head of division (division_head) or higher |
| check | the agent the flow precheck_agent runs answers; where it is not sure, or fails, “manager” answers in its place |
| travel_agent | the agent the flow travel_decision runs answers; where it is not sure, or fails, “manager” answers in its place |
| board | the members of the team Board (board): one of them answers |
Each approver is chosen when the stage starts, in the version of the organization in effect then. A proxy in effect that day answers beside them (see “Proxies”).
Deadlines and reminders
Every stage:
- It is due 3 business days after it starts, at the end of the day.
- Its approvers are reminded 2 business days after it starts, at 09:00.
- When it is late, it goes up as the table
next_upsays, and its deadline is counted again from then; when it is late again, the ticket expires. - When nobody can answer it, it goes up to the head above; at the top of the organization, it goes to “board”.
A late stage goes up as the table next_up says:
approver | goes_to |
|---|---|
| check | manager |
| travel_agent | manager |
| manager | dept_head |
| dept_head | division_head |
| accounting | division_head |
| division_head | division_head |
| board | board |
For a stage that starts on 2026-04-03 (Fri), the days the request's calendar closes skipped (times in UTC+09:00):
| Stage | Reminder | Due | Due after going up |
|---|---|---|---|
| precheck | 2026-04-07 (Tue) 09:00 | 2026-04-08 (Wed), at the end of the day | 2026-04-14 (Tue), at the end of the day |
| first | 2026-04-07 (Tue) 09:00 | 2026-04-08 (Wed), at the end of the day | 2026-04-14 (Tue), at the end of the day |
| second | 2026-04-07 (Tue) 09:00 | 2026-04-08 (Wed), at the end of the day | 2026-04-14 (Tue), at the end of the day |
| decide | 2026-04-07 (Tue) 09:00 | 2026-04-08 (Wed), at the end of the day | 2026-04-14 (Tue), at the end of the day |
A ticket ends within 93 business days at the most (4 × 21 at its stages, 3 × 3 with the requester). ritsu ringi doc --longest shows the dates of the longest.
Rules of a ticket
- A requester does not approve their own request: they are left out of the approvers of every stage, and so is the one who submitted it in their name.
- A stage whose one approver approved the stage right before it is done with that approval.
- An approver may send it back to the requester, at most 3 times in all, withdrawals counted. After that, they approve or reject it.
- Sent back to the requester, it may be submitted again until the end of the day 3 business days after; then it expires. Only the fields that change are given again.
- The requester may withdraw it until the stage “decide” answers. Withdrawn, it comes back to them, to be submitted again or dropped.
- An approver may reject it: it ends rejected, and cannot be submitted again.
- The team that keeps the request may add an approver to the stage a ticket is at, and hand one approver's part over to someone else. Neither moves a deadline.
Comments
- A person may add a comment to what they do (submitting, approving, sending back, rejecting, withdrawing and the others), or write one on its own. One with no comment is the same as one with an empty comment.
- Who may write one is decided by the gate
shared/company.gate, as for the other operations. - A comment is up to 2000 characters. It is kept in the ticket's history, on the line of what the person did, with who wrote it and when, and is not changed after. Writing one on its own changes neither the state of the ticket nor its deadlines.
- An approver may reject or send back a request without a reason, but a reason written tells the requester what to correct.
Proxies
- A proxy for approving answers the stages of the person they stand in for, beside them, on the days the row says. Their answer counts once, in that person's seat. They may also pause and resume, correct the fields approvers correct, and retract an approval they gave.
- A proxy for submitting submits requests in the name of the person they stand in for, and may withdraw, submit again and drop them as the requester does.
- Whatever a proxy does is kept in the history with whose place they did it in.
The proxies the organization's data has for this request:
| Person | Proxy | For | Days |
|---|---|---|---|
| e3101 (Head of Sales Department 1) | e1101 (Manager of Section 1A) | approving | 2026-12-28 to 2027-01-08 |
Books and flows
- When it is submitted, it holds
budget.reservein the book, withamountfrom “Amount”, where a team of the kind Department (department) is above the requester. - When it is approved, the hold
budget.reserveis made final. - When it is approved, it starts the flow
pay, withamountfrom “Amount” andpurposefrom “Purpose”. - When it is sent back, rejected, withdrawn or expired, the hold
budget.reserveis let go.
Claims
The check holds each of these: a claim that did not hold would stop the request.
the_agent_decides_up_to_30000_yen: the stage “decide” is “travel_agent” only when “Amount” is 30,000 JPY or less.a_joint_second_stage: the stage “second” can be “dept_head and accounting”.reminder_before_due: every stage reminds its approvers before it is due.ends_in_time: every ticket ends within 93 business days; at the most it takes 93.
Examples of the route
The check holds that the route gives each of these requests the stages written beside it.
| Category | Amount | Route |
|---|---|---|
| Travel | 30,000 JPY | travel_agent (decide) |
| Travel | 30,001 JPY | manager (decide) |
| Expenses | 100,000 JPY | check (precheck) → manager (decide) |
| Expenses | 100,001 JPY | check (precheck) → manager (first) → dept_head (decide) |
| Purchase | 1,000,001 JPY | manager (first) → dept_head and accounting (second) → division_head (decide) |
Scenarios
The check runs each of these on the ticket machine, and holds that every event comes to the stage and the state written.
a_joint_purchase
Submitted by e1201 (Sales staff 1).
- Category: Purchase
- Items: “Server”, 800,000 JPY; “Storage”, 400,000 JPY
- Purpose: “A server and its storage for the test lab”
- Date of use: 2026-11-16
- Receipt: “receipt.pdf”
| At | Event | By | Stage after | State |
|---|---|---|---|---|
| 2026-11-16 10:00 | submit | e1201 (Sales staff 1) | first | in progress |
| 2026-11-16 15:00 | approve | e1101 (Manager of Section 1A) | second | in progress |
| 2026-11-17 11:00 | approve | e1001 (Head of Accounting) | second | in progress |
| 2026-11-17 16:00 | approve | e3101 (Head of Sales Department 1) | decide | in progress |
| 2026-11-18 09:30 | approve | e0101 (Head of Sales Division) | — | approved |
a_day_trip_the_agent_decides
Submitted by e1201 (Sales staff 1).
- Category: Travel
- Items: “Train to Osaka and back”, 28,000 JPY
- Purpose: “A visit to a customer in Osaka”
- Date of use: 2026-11-20
- Destination: “Osaka”
- Receipt: “receipt.pdf”
| At | Event | By | Stage after | State |
|---|---|---|---|---|
| 2026-11-16 10:00 | submit | e1201 (Sales staff 1) | decide | in progress |
| 2026-11-16 10:01 | the agent answers (sure) | — | — | approved |
a_trip_the_agent_doubts
Submitted by e1201 (Sales staff 1).
- Category: Travel
- Items: “Flight to Sapporo and back”, 29,500 JPY
- Purpose: “A visit to a customer in Sapporo”
- Date of use: 2026-11-27
- Destination: “Sapporo”
- Receipt: “receipt.pdf”
| At | Event | By | Stage after | State |
|---|---|---|---|---|
| 2026-11-16 10:00 | submit | e1201 (Sales staff 1) | decide | in progress |
| 2026-11-16 10:01 | the agent answers (not sure, “The fare is above the usual one”) | — | decide | in progress |
| 2026-11-16 14:00 | approve | e1101 (Manager of Section 1A) | — | approved |
a_trip_called_off
Submitted by e1201 (Sales staff 1).
- Category: Travel
- Items: “Flight to Fukuoka and back”, 64,000 JPY; “Hotel, three nights”, 54,000 JPY
- Purpose: “A visit to a customer in Fukuoka”
- Date of use: 2026-12-02
- Destination: “Fukuoka”
- Receipt: “receipt.pdf”
| At | Event | By | Comment | Stage after | State |
|---|---|---|---|---|---|
| 2026-11-16 10:00 | submit | e1201 (Sales staff 1) | first | in progress | |
| 2026-11-16 15:00 | approve | e1101 (Manager of Section 1A) | decide | in progress | |
| 2026-11-17 09:00 | withdraw | e1201 (Sales staff 1) | “The customer has put the visit off to spring” | — | with the requester |
| 2026-11-17 09:05 | drop | e1201 (Sales staff 1) | — | withdrawn |