Loading FlowZen
Getting your workspace ready...
Getting your workspace ready...
Manage salaries, policies, invoices, resource requests, and financial reports.
Salary management is region scoped. A finance or admin user only sees, creates, edits, approves, pays, rejects, deletes and auto-generates salaries for members in their own effective region.
The scope is resolved from the actor's regionLabel, falling back to the main office when unset. It applies to:
GET /api/finance — the members picker, the salaries list, the pending counts, and the cycle-day auto-generation all use the same scope.POST /api/finance — calculate-salary, generate-salary and edit-salary.PATCH /api/finance — the salary status updates./api/finance/salary/[id], /api/finance/salary-slip/[id], /api/finance/member-salary/[id] and /api/finance/member-attendance/[id], so the boundary cannot be bypassed by calling a detail endpoint with a guessed id.No region configured? Companies with no addresses[] and no address are unaffected and stay company-wide. A company that has regions but whose requester's region holds no approved members also falls back to company-wide, matching /api/users?region=mine. Employees can always read their own records.
Expenses are region scoped too. A finance or admin user only sees and acts on expense requests raised by members in their own effective region, and the travel assignee picker is filtered the same way. Budgets, bills, invoices and salary advances stay company-wide.
Company policy and the salary cycle are per-region. A finance or admin user reads and updates the policy — PF/ESIC/TDS percentages, salary cycle, food and travel allowances — for their own effective region only, resolved from their regionLabel with the main-office fallback.
This applies to GET, POST and PATCH /api/finance/policy and to GET and POST /api/finance/salary-cycle. Companies with no region configured stay company-wide, as does a region that holds no approved members.
Money leaves the company through two different desks, and which one handles it depends on what is being bought — never on who is asking.
Any approved member raises a travel expense from the Finance tab. The assignee must be a finance user in the requester's region, and the request follows the usual chain: pending → forwarded → approved → accepted → disbursed.
Laptops, desktops, software, electronics, internet service, email service and office resources are raised from /profile/it → New Ticket → Purchase request. They are stored as ProcurementRequest records, not expenses.
it-admin / it-administration buy for the company themselves, so their purchases are routed straight to finance — they never see the IT queue.ExpenseRequest already at approved with no admin approver — the IT review is the approval. Finance then accepts and disburses it from the Finance tab, and the procurement record's status follows along.Region scoping. The assignee picker, the request list and the IT board are all scoped to the requester's effective region, with the same main-office and empty-region fallbacks as salaries. A company with no addresses[] stays company-wide.
/api/financeGet salary records for the month. Finance and admin users receive only their own region's records; everyone else receives their own.
/api/financeCreate a new salary record (Finance only).
| Field | Type | Required | Description |
|---|---|---|---|
employee | string | Required | Employee user ID |
month | string | Required | Month (YYYY-MM) |
baseSalary | number | Required | Base salary amount |
allowances | number | Optional | Total allowances |
deductions | number | Optional | Total deductions |
/api/financeUpdate salary status (approve/reject).
| Field | Type | Required | Description |
|---|---|---|---|
salaryId | string | Required | Salary record ID |
status | string | Required | New status (approved/paid/rejected) |
rejectionReason | string | Optional | Rejection reason |
/api/finance/salary/[id]Get a specific salary record.
/api/finance/salary/[id]Delete a salary record.
/api/finance/member-salary/[id]Create salary for a specific member.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | Member ID (path param) |
month | string | Required | Month (YYYY-MM) |
baseSalary | number | Required | Base salary amount |
allowances | number | Optional | Total allowances |
deductions | number | Optional | Total deductions |
/api/finance/member-attendance/[id]Get attendance summary for salary calculation.
/api/finance/policyGet company finance policy.
/api/finance/policyCreate or update finance policy.
| Field | Type | Required | Description |
|---|---|---|---|
foodAmount | number | Optional | Food allowance amount |
travelAccommodationAmount | number | Optional | Travel allowance amount |
pfPercentage | number | Optional | PF deduction percentage |
esicPercentage | number | Optional | ESIC deduction percentage |
tdsPercentage | number | Optional | TDS deduction percentage |
/api/finance/policyPartially update finance policy.
/api/finance/salary-cycleGet salary cycle configuration.
/api/finance/salary-cycleUpdate salary cycle configuration.
| Field | Type | Required | Description |
|---|---|---|---|
salaryCycleDay | number | Required | Day of month for salary |
salaryCycleStartDay | number | Optional | Cycle start day |
salaryCycleEndDay | number | Optional | Cycle end day |
/api/finance/salary-advanceRequest a salary advance.
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Required | Advance amount |
reason | string | Required | Reason for advance |
/api/finance/salary-slipGet salary slips for the current user.
| Query Param | Type | Required | Description |
|---|---|---|---|
month | string | Optional | Filter by month (YYYY-MM) |
/api/finance/salary-slip/[id]Get a specific salary slip.
/api/finance/leave-impactCalculate salary impact of leaves.
| Query Param | Type | Required | Description |
|---|---|---|---|
userId | string | Required | User ID |
month | string | Required | Month (YYYY-MM) |
/api/finance/resource-requestGet all resource requests.
/api/finance/resource-requestCreate a new resource request.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Required | [{ name, quantity, reason }] |
notes | string | Optional | Additional notes |
/api/finance/resource-requestApprove or reject a resource request.
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string | Required | Request ID |
status | string | Required | New status (approved/rejected) |
rejectionReason | string | Optional | Rejection reason |
/api/finance/invoiceGet all client invoices.
/api/finance/invoiceCreate a new client invoice.
| Field | Type | Required | Description |
|---|---|---|---|
clientName | string | Required | Client name |
clientEmail | string | Optional | Client email |
amount | number | Required | Invoice amount |
description | string | Optional | Invoice description |
board | string | Optional | Associated board ID |
/api/finance/invoiceUpdate invoice status.
| Field | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Required | Invoice ID |
status | string | Required | New status (paid/pending) |
/api/finance/reportsGet financial reports.
/api/finance/exportExport finance data as CSV.
Returns CSV file with Content-Type: text/csv