Admin business: optional fields such as withholdingTaxCompanyId can't be cleared
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
Hướng nghiên cứu
Start with packages/server/src/modules/financial-entities/providers/admin-businesses.provider.ts and compare its update query with the tax-representation handling added in #5230. Read packages/server/src/modules/financial-entities/helpers/admin-businesses.helper.ts and the existing update integration test; first decide whether cleared array fields should be NULL or empty arrays. Done means each nullable field supports keep, clear and set, required fields retain their constraint with an explanatory comment, and the integration test covers those cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Several optional admin-business fields can be set but never cleared. The update query in packages/server/src/modules/financial-entities/providers/admin-businesses.provider.ts writes them as COALESCE($param, column). A null therefore means "keep", and there is no value that empties the column. Affected:
company_tax_id(withholdingTaxCompanyId)business_registration_start_dateadvance_tax_ratestax_advances_idssocial_security_employer_idswithholding_tax_annual_ids
Once one of these holds a value, a user who empties it in the admin business settings gets the old value back.
The three tax-representation fields added in #5230 already work differently:
tax_assessing_office,tax_representative_name,tax_representative_license- An omitted field keeps its value;
''ornullclears it. - Implementation: a
CASE WHEN $x::TEXT IS NULL THEN column ELSE NULLIF($x, '') ENDin the SQL, plustoClearableTextinpackages/server/src/modules/financial-entities/helpers/admin-businesses.helper.ts. - Covered by
providers/__tests__/admin-businesses-update.integration.test.ts.
Done when
- Each nullable field above can be cleared from the UI, and an omitted field still keeps its value.
- The array fields need a decision: is "cleared"
NULLor an empty array? - Fields that must never be empty (for example
company_tax_id, if required) stay as they are, with a comment saying why. - The integration test covers keep, clear and set for the changed fields.
- Ngôn ngữ chính
- TypeScript
- Star
- 30
- Fork
- 10
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 276
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Urigo/accounter-fullstack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Urigo/accounter-fullstack#5302 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
1214 annual-audit-workflow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Urigo/accounter-fullstack#5257 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
1214 annual-audit-workflow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Urigo/accounter-fullstack#5256 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
annual-audit-workflow
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Urigo/accounter-fullstack#5252 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Urigo/accounter-fullstack#4919 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Urigo/accounter-fullstack
Issue tương tự
-
area: integrations documentation priority: P2 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eddiejaoude/StackDash#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot:ai-assisted component:midnight-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-js#1790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:vscode bug has repro platform:macos platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày