fix: 修复替身合同计算有问题 (#1484)

Reviewed-on: daoyoucloud/tachybase#1484
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-08-23 17:16:22 +08:00 committed by sealday
parent 62d333d20b
commit 0279c00748

View File

@ -140,7 +140,7 @@ SELECT
contract_items ci
LEFT JOIN contract_plans cp ON ci.contract_plan_id = cp.id
WHERE
ci.contract_id = COALESCE(main.id, c.id)
ci.contract_id = c.id
AND ci.start_date IS NOT NULL
AND ci.end_date IS NOT NULL
)