[vhrms v0.5.0] Seed phụ cấp + tách cấu trúc lương (Chính thức / Thử việc) + biểu thuế TNCN 5 bậc (TETRA-1328) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch ":feat/TETRA-1328-vhrms-phase1-seed-salary"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Setup Phase 1 seed data cho vhrms theo Luật Thuế TNCN 2025 (109/2025/QH15) + Luật BHXH 2024:
LCB(Lương cơ bản) — move từ salary_structure sang salary_components (fix OT link bug)PC_AT,PC_XX,PC_DT,PC_NO,PC_TPPC_DH_M1-M4(khung 5-15% lương NĐ 145/2020)Lương Chính thức— LCB + 5 PC Bảng A, 9 deductionsLương Thử việc— LCB × 0.85 (BLLĐ Đ26), 9 deductionsTest plan
docker compose --profile hrms down -v && up -d→ site tự seed đầy đủ, không cần lệnh thủ côngRefs
- Thêm 10 Salary Component mới: + Lương cơ bản (LCB) vào create_vietnam_salary_components (fix bug create_overtime_type() fail do link tới LCB chưa tồn tại) + 5 phụ cấp không đóng BHXH: PC_AT, PC_XX, PC_DT, PC_NO, PC_TP (ăn trưa/xăng xe/điện thoại/nhà ở/trang phục — theo CV 1198/CTL&BHXH-BHXH) + 4 mức phụ cấp độc hại: PC_DH_M1-M4 (0.1-0.4 × LCS, khung 5-15% lương theo NĐ 145/2020 Đ103 + TT 26/2022) - Thay Salary Structure "Cơ cấu lương Việt Nam" (1 template) bằng 2 template: + "Lương Chính thức" (LCB + 5 phụ cấp, 9 deductions) + "Lương Thử việc" (LCB × 0.85 theo BLLĐ Đ26, 9 deductions) + Cả 2 auto-submit (docstatus=1) - Biểu thuế TNCN theo Luật 109/2025 (xem TETRA-1251): + PIT formula: 7 bậc → 5 bậc (5/10/20/30/35%) + Giảm trừ: 11tr/4.4tr → 15.5tr/6.2tr + Vietnam Tax Deduction 2026: effective 2026-07-01 → 2026-01-01 + Seed Income Tax Slab "Biểu thuế lũy tiến TNCN 2026 (5 bậc)" - 5 migration patches v0_5_0 cho site upgrade 0.3.2 → 0.5.0 (idempotent) - Fix after_install hook: handle existing Company case (Company tạo trước khi install vhrms → on_company_created không fire retroactively) - Bump version 0.3.2 → 0.5.0 Refs: TETRA-1328 Relates: TETRA-1251 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>- Update fixtures/import_tax_brackets(): seed 5 bậc mới (effective 2026-01-01) theo Luật TNCN 2025 thay vì 7 bậc cũ (effective 2024-01-01): Bậc 1: 0-10M, 5% Bậc 2: 10-30M, 10% Bậc 3: 30-60M, 20% Bậc 4: 60-100M, 30% Bậc 5: 100M+, 35% - Thêm patch v0_5_0/cleanup_tax_brackets_2026 cho site upgrade: xóa 7 bậc cũ (2024-01-01) + seed 5 bậc mới (2026-01-01). Refs: TETRA-1328 Relates: TETRA-1251 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>- Fix Trade Union NLĐ: 1.0% → 0.5% theo QĐ 61/QĐ-TLĐ (hiệu lực 01/07/2025, giảm đoàn phí công đoàn). - Update effective_from của toàn bộ 4 loại (BHXH/BHYT/BHTN/Trade Union) từ 2024-01-01 → 2025-07-01 đồng bộ với Luật BHXH 2024 + NĐ 158/2025. - Các rate khác giữ nguyên (theo luật hiện hành, đúng như cũ): BHXH NLĐ 8% DN 17.5% (hưu trí/tử tuất + ốm đau/thai sản + TNLĐ-BNN) BHYT NLĐ 1.5% DN 3% BHTN NLĐ 1% DN 1% Tổng: NLĐ 10.5% + DN 21.5% = 32%. - Thêm patch v0_5_0/cleanup_insurance_rates_2025 cho site upgrade. Refs: TETRA-1328 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>testto [vhrms v0.5.0] Seed phụ cấp + tách cấu trúc lương (Chính thức / Thử việc) + biểu thuế TNCN 5 bậc (TETRA-1328)