Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

CW-059 · Start from a spreadsheet: import employees and opening balances

Open
#59 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript

Research direction

Start by reading backend/src/modules/employees/, backend/src/modules/leave/, backend/src/modules/payroll/, and web/src/features/employees/, then check docs/backlog.md and the payroll references CW-046, CW-047, and spec §6.3. Map the existing employee form, permissions, encryption, audit, and payroll balance flows before choosing an approach. Done means validated Thai Excel/CSV imports are atomic, duplicate-safe, permissioned, audited, and produce the stated leave and payroll results.

Written by the indexing model from the issue text.

Description

P1 payroll phase-3

Priority P1 · Area employees · leave · payroll · Estimate L · Phase 3

A company moving to Cwork has its people in Excel or in another system's export. Today each employee is typed in by hand, one form at a time. That is where an evaluation ends, and a competitor offers the import.

It is P1 rather than a convenience because of payroll. Withholding projects the year from year-to-date figures (spec §6.3), and ภ.ง.ด.1ก and 50 ทวิ report the whole year. A company that starts in September has paid January to August somewhere else. Without those months, September's withholding is wrong and the annual filings are short. priorEmployerIncome does not cover this: those months were paid by this employer, and 50 ทวิ must count them as its own.

Scope

  • A downloadable template, one file for employees and one for opening balances.
  • Employees: the fields the employee form takes, sensitive ones included (national ID, bank account, social security number), encrypted exactly as when typed in.
  • Opening balances per employee: leave taken so far this year, and this year's taxable income, tax withheld and social security paid before Cwork.
  • A preview that lists every problem by row and column before anything is written. Nothing is written until the whole file is clean, and then all of it is written in one step.
  • Importing needs the permission that creating employees needs, and each import is audited as one event naming the file and the row count.

Acceptance

  • A file saved from Thai Excel, as .xlsx or as Excel's default CSV (not UTF-8), imports with Thai names intact.
  • A file with one bad row writes nothing and names the row and the problem.
  • Importing the same file twice creates no duplicates: the second run is refused, row by row, naming the employee codes already present.
  • A company that imports January to August and runs September in Cwork withholds the same September tax as if all nine months had run in Cwork.
  • Opening balances count as this employer's own in CW-046 and CW-047, not as a previous employer's.
  • Leave balances after import equal entitlement minus the imported days taken.

Files backend/src/modules/employees/, backend/src/modules/leave/, backend/src/modules/payroll/, web/src/features/employees/


Tracked in docs/backlog.md.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
2h 56m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SuruchBoss/Cwork

All issues in SuruchBoss/Cwork

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.