CREATE FUNCTION `qc_pgmrealesthours`($project int) RETURNS float(10,2)
BEGIN
    select sum(estimate) from zt_task where project=$project and parent >= 0 and status != 'cancel' and deleted = '0' into @estimate;
return @estimate;
END