Wanted: a qualified review of the Thai payroll and social-security rules
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend, documentation, testing
Research direction
Start with docs/payroll-thailand.md, then compare the rules with backend/src/modules/payroll/domain/thai-tax.ts and the 27 cases in backend/src/modules/payroll/domain/thai-tax.spec.ts. Verify the cited Thai tax, social-security and labour rules against current authoritative sources; done means recording corrections, citations, missing cases or confirmation from a qualified reviewer.
Written by the indexing model from the issue text.
Description
What this is
Cwork computes Thai personal income tax withholding, social security and Labour
Protection Act overtime. Those rules were written from published sources — the
Revenue Code, the Social Security Act, Revenue Department guidance — and
unit-tested against hand-worked examples.
That proves the code computes what its author believed the rules to be. It does
not prove the belief is correct. No accountant, tax agent or payroll
professional has reviewed them.
This issue is an open invitation to anyone who has the standing to.
What there is to look at
| The rules, in prose | docs/payroll-thailand.md — brackets, allowances, the order of operations, OT multipliers |
| The implementation | backend/src/modules/payroll/domain/thai-tax.ts — pure functions, no database, readable on its own |
| The test cases | backend/src/modules/payroll/domain/thai-tax.spec.ts — 27 cases with the bracket arithmetic worked out by hand |
The rule set is data (THAI_TAX_RULES_2026), so a correction is usually a
config edit plus a test case rather than a rewrite.
The questions that would help most
- The order of operations. Employment expense deduction (50%, capped at
฿100,000), then allowances, then donations capped at 10% of what remains,
then the progressive brackets. Is that the right sequence, and are the caps
applied against the right base at each step? - Monthly withholding versus annual liability. The engine annualises the
month's pay and divides. Is that the method the Revenue Department expects,
and what should happen to a mid-year joiner or a one-off bonus? - Social security. 5% each side, on a salary floor and ceiling. Are the
current figures right, and is the rounding what the SSO expects? - Overtime multipliers. 1.5× on a working day, 2× on a day off, 3× on a
public holiday for an employee entitled to holiday pay. Are the conditions
attached to each right? - Anything the engine does not model at all that a real payroll run would
hit in the first month.
How to help
A comment is enough — a correction, a citation, or "this one is wrong and here
is the case that shows it". A failing test case is even better. You do not need
to write any code, and you do not need to read the rest of the repository.
If you would rather not be named, say so and you will not be.
Why it is being asked in public
An HRIS that gets withholding wrong costs somebody their salary and their
employer a penalty. Saying "no qualified person has checked this" in the README
and then not asking anyone would be the wrong half of honesty.
Tracked as part of CW-030 in docs/backlog.md.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 37m
- Merged PRs (30d)
- 1
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 ·
-
P1 payroll phase-3
Difficulty 5/5 Over a week Newbie friendliness 30/100
SuruchBoss/Cwork#59 ·
-
P2 phase-3
Difficulty 5/5 Over a week Newbie friendliness 45/100
SuruchBoss/Cwork#58 ·
-
P3 project
Difficulty 3/5 1-2 days Newbie friendliness 76/100
SuruchBoss/Cwork#56 ·
All issues in SuruchBoss/Cwork
Similar issues
-
priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
prime-radiant-inc/evener#3291 ·
Maintainers usually reply within 1 day
-
accessibility bug revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14961 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
supabase/agent-skills#614 ·
-
Content
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RunestoneInteractive/rs#1559 · 1 comment ·
Maintainers usually reply within 2 days