<?php 
include "functions.php";
use SAPb1\Filters\Equal;
use SAPb1\Filters\InArray;

try 
{
    session_start();

    $sap = Login();
    $ScheduleList = $sap->getService("view.svc/B1_GetScheduleB1SLQuery");
    $Schedule_result = $ScheduleList->queryBuilder()
    //->select('DocEntry,Salariée,NomPatient,U_DateConsultation,U_Notes,U_ActivityType,U_Statut')
    ->select('title,start')
    ->where(new Equal("Salariée", $_SESSION["EmployeeID"] ))
    ->findAll(); 

    $Schedule = json_decode(json_encode($Schedule_result), TRUE);
    echo json_encode($Schedule['value']);

 

} catch (Exception $e) {
    echo $e->getMessage();    
}