private function calculate_writ_item_value($writ_rec) { switch ($writ_rec["salary_compute_type"]) { case SALARY_COMPUTE_TYPE_CONSTANT : $value = $this->value; break; case SALARY_COMPUTE_TYPE_MULTIPLY : $this->param2 = manage_writ_item::call_multiplicand_modules($writ_rec); $value = $this->param1 * $this->param2; break; case SALARY_COMPUTE_TYPE_FUNCTION : $functionName = $writ_rec["function_name"]; $value = manage_writ_item::$functionName($writ_rec); if ($value === false) return false; break; default: $value = 0; } return $value; }