CW-059 · Start from a spreadsheet: import employees and opening balances
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
- Domain
- backend-api-design, data, full-stack, security
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
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
.xlsxor 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
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SuruchBoss/Cwork
-
documentation good first issue P3 phase-E
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SuruchBoss/Cwork#50 ·
-
good first issue mobile P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SuruchBoss/Cwork#11 ·
-
documents P0 payroll
Difficulty 4/5 3-5 days Newbie friendliness 54/100
SuruchBoss/Cwork#74 · 1 comment ·
-
P0 payroll
Difficulty 4/5 3-5 days Newbie friendliness 55/100
SuruchBoss/Cwork#73 · 1 comment ·
-
P0 payroll
Difficulty 5/5 Over a week Newbie friendliness 38/100
SuruchBoss/Cwork#72 · 1 comment ·
All issues in SuruchBoss/Cwork
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
betagouv/mon-entreprise#4699 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jaegertracing/jaeger-ui#4547 · 3 comments ·
Maintainers usually reply within 1 day
-
ai-driven-qa
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
linagora/twake-calendar-frontend#1467 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
need4deed-org/sdk#267 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
auth0/universal-login#414 ·
Maintainers usually reply within 1 day