CREATE FUNCTION `qc_pgmdesignfirstesthours`($project int) RETURNS float(10,2)
BEGIN
    declare estimate float(10,2) default 0;
    declare inited int default 0;
    select qc_cminited($project, 'PP') into inited;
    IF inited = 1 THEN
    select qc_getdesignfirstesthours($project) into estimate;
    return estimate;
    ELSE 
    return 0;
    END IF;
END