fix(setup): salary structure là template chung + sửa Thuế TNCN conflict + re-raise #150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/TETRA-1974-salary-structure-global"
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?
Vấn đề
bench install-app vhrmstạo 0 Salary Structure dù install báo thành công —_build_salary_structuresubmit() throwValidationError: Cannot set amount or formula for Salary Component Thuế TNCN with Variable Based On Taxable Salary, bịexceptnuốt (log rồi return). Chặn seed demo + payroll.Sửa
formula/amount_based_on_formulaở deduction row Thuế TNCN (component cóvariable_based_on_taxable_salary=1→ PIT tính qua Income Tax Slab, Frappe cấm kèm formula).create_standard_salary_structures()từ_first_company_seed()→_global_setup(): salary structure chuẩn là template chung company-independent, luôn cần sau install/migrate._build_salary_structure:company=None→ structure global, không bind công ty._build_salary_structurere-raise sau log (không nuốt) → install fail to, tránh false-success.Verified:
create_standard_salary_structures()tạo đủ 2 structure (Lương Chính thức / Lương Thử việc) không lỗi.Refs: TETRA-1974, TETRA-1975