<?php



function get_salary_function_result($salary_total_configuration)
{
    $function_result = 0;
    $result = get_salary_functions_details($salary_total_configuration['salary_function_id']);
    while ($myrow = db_fetch($result)){
        $component_value = get_calculated_salary_component_value($myrow['componant_code'], $myrow['full_value']);
        if($myrow['minus']){
            $component_value *= -1;
        }
        $function_result += $component_value;
    }

    return array('success' => true, 
                    'calculated_value' => $function_result, 
                    'full_value' => $function_result, 
                    'message' => '');
    
}




?>
