Hi,
I want to do this custom process, based on $data and also on $_SESSION :
->pipe(new CalculatedColumn(array(
"Challenge"=>function($data){
if ($_SESSION['Username'] !='VALIFAX' && $data["ACC"] != 'VALIFAX'){
if ($data["Prospect_Client"]=='client' ){
return ( ($data["Marge_FAS_Déclarée"] + 12 * $data["MARGE_DELTA_REC"])*1.1 );
}
else {
return ( ($data["Marge_FAS_Déclarée"] + 12 * $data["MARGE_DELTA_REC"]) ) ;
}
}
else {
if ($data["Prospect_Client"]=='client' ){
return ( 2.5 * ($data["Marge_FAS_Déclarée"] + 12 * $data["MARGE_DELTA_REC"])*1.1 );
}
else {
return ( 2.5 * ($data["Marge_FAS_Déclarée"] + 12 * $data["MARGE_DELTA_REC"]) ) ;
}
}
}
)))
Tthe $_SESSION doesnt work inside the function (but it works outside). And when I try to insert in the function arg, it doesn't work either. How could I do ?
Thanks a lot