CW-047 · 50 ทวิ withholding certificates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Priority P1 · Area payroll · documents · Estimate M · Phase 3
Parent
#3 (CW-004).
What to build
Every employee gets their 50 ทวิ certificate for the tax year as a PDF — the document they need to file their own return, and which the employer is required to issue. HR issues them for the whole company in one action; an employee can also fetch their own.
The certificate renderer from CW-008 already exists and handles Thai text, letterhead and a signature block, so this is a template over it rather than new rendering.
Acceptance criteria
- Each certificate's figures match that employee's line in the ภ.ง.ด.1ก export for the same year.
- Thai text renders correctly — no tofu boxes — and the employer's letterhead and signature block appear.
- An employee can fetch their own certificate and nobody else's; issuing for others requires the document-issuing permission.
- Re-issuing supersedes rather than overwrites, and both are audited — the same rule the other issued documents follow.
- Issuing for the whole company produces one certificate per employee paid in that year, and none for anyone who was not.
Blocked by
- #46 — the annual per-employee totals come from there. A certificate that disagrees with the filing is worse than no certificate.
Contributor 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.
Research direction
Start with the certificate renderer from CW-008, the annual per-employee totals from #46, and the rules used by other issued documents. Trace the employee and company issuing entry points and permission checks. Done means every eligible employee gets a matching Thai PDF, access is restricted, re-issues are superseding and audited, and non-eligible employees get none.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, authorization, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100