Hi All,
I am using Sugar 5.5 on windows.
I created a logic hook to retrieve data fields and assign data.
The file connected to the first logic hook PHP code:
'custom/modules/HR_Employee/calculate.php'
The file I want to retrieve data is this: 'custom/modules/HR_Employee/sent.php';PHP Code:class CalculateDays {
function calc_orig(&$bean, $event, $arguments) {
echo " HR Employee module ";
if ($event == 'after_retrieve') {
$employee2 = $bean->name;
if($employee2=="Joe Doe"){
$var = $bean->linkvacent_c;
}elseif($employee2 =="Mark Smith"){
$var = $bean->linkvacent_c;
}
echo " " . $employee2 . ": Vacation Entitled Days- " .$var . " days;";
} } }
The problem is that I cannot pull out the variable of $var from calculate.php into sent.phpPHP Code:require_once 'custom/modules/HR_Employee/calculate.php';
$EmployeeEntitled2 = $var;
echo "from sent.php" . $EmployeeEntitled2 . " ";
Any Ideas ?????
Thanks in advance


LinkBack URL
About LinkBacks





Reply With Quote
Bookmarks