汇率计算合同金额

This commit is contained in:
2025-06-21 15:55:09 +08:00
parent d16db4f464
commit 8774c88a36
2 changed files with 10 additions and 2 deletions

View File

@@ -857,8 +857,10 @@
a.project_id,
SUM(
CASE
WHEN a.hour > 0 THEN a.hour * u.labor_cost
ELSE a.day_length * 8 * u.labor_cost
-- 当小时数存在时,使用日薪/8计算小时薪资
WHEN a.hour > 0 THEN a.hour * (COALESCE(u.labor_cost, 0) DIV 8)
-- 当日数存在时,使用日薪×天数
ELSE a.day_length * COALESCE(u.labor_cost, 0)
END
) AS total_hr_cost
FROM