src/ApplicationBundle/Controller/PublicPagesController.php line 3375

Open in your IDE?
  1. <?php
  2. namespace ApplicationBundle\Controller;
  3. use ApplicationBundle\Constants\EmployeeConstant;
  4. use ApplicationBundle\Constants\GeneralConstant;
  5. use ApplicationBundle\Constants\HumanResourceConstant;
  6. use ApplicationBundle\Entity\ApplicantDetails;
  7. use ApplicationBundle\Entity\Employee;
  8. use ApplicationBundle\Entity\EmployeeDetails;
  9. use ApplicationBundle\Entity\SysDepartment;
  10. use ApplicationBundle\Entity\SysUser;
  11. use ApplicationBundle\Helper\EmployeePayloadNormalizer;
  12. use ApplicationBundle\Interfaces\LoginInterface;
  13. use ApplicationBundle\Modules\Authentication\Constants\UserConstants; use ApplicationBundle\Modules\Api\Constants\ApiConstants;
  14. use ApplicationBundle\Modules\Accounts\Accounts;
  15. use ApplicationBundle\Modules\HumanResource\HumanResource;
  16. use ApplicationBundle\Modules\Inventory\Inventory;
  17. use ApplicationBundle\Modules\System\MiscActions;
  18. use ApplicationBundle\Modules\Sales\SalesOrderM;
  19. use ApplicationBundle\Modules\System\System;
  20. use ApplicationBundle\Modules\User\Company;
  21. use ApplicationBundle\Modules\User\Position;
  22. use ApplicationBundle\Modules\User\Users;
  23. use CompanyGroupBundle\Entity\EmsSite;
  24. use CompanyGroupBundle\Entity\EntityApplicantDetails;
  25. use CompanyGroupBundle\Modules\UserEntity\EntityUserM;
  26. use Endroid\QrCode\Builder\BuilderInterface;
  27. use Endroid\QrCodeBundle\Response\QrCodeResponse;
  28. use Google_Client;
  29. use Google_Service_Oauth2;
  30. use Symfony\Component\HttpFoundation\JsonResponse;
  31. use Symfony\Component\HttpFoundation\Request;
  32. use Symfony\Component\HttpFoundation\Response;
  33. use Symfony\Component\Routing\Generator\UrlGenerator;
  34. // honeyBee web routing controller
  35. class PublicPagesController extends GenericController implements LoginInterface
  36. {
  37.     // HoneybeeWeb upto this
  38.     public function GetApplicantDataForErpAction(Request $request)
  39.     {
  40.         $applicantId $request->request->get('applicantId');
  41.         if (!$applicantId) {
  42.             return new JsonResponse([
  43.                 'status' => 'error',
  44.                 'message' => 'Missing applicantId in request.'
  45.             ]);
  46.         }
  47.         $em_goc $this->getDoctrine()->getManager('company_group');
  48.         $entityApplicant $em_goc->getRepository("CompanyGroupBundle\\Entity\\EntityApplicantDetails")
  49.             ->findOneBy(['applicantId' => $applicantId]);
  50.         if (!$entityApplicant) {
  51.             return new JsonResponse([
  52.                 'status' => 'error',
  53.                 'message' => 'Applicant not found.'
  54.             ]);
  55.         }
  56.         return new JsonResponse([
  57.             'status' => 'success',
  58.             'centralData' => [
  59.                 'globalId' => $entityApplicant->getApplicantId(),
  60.                 'username' => $entityApplicant->getUsername(),
  61.                 'email' => $entityApplicant->getEmail(),
  62.                 'firstname' => $entityApplicant->getFirstname(),
  63.                 'lastname' => $entityApplicant->getLastname(),
  64.                 'image' => $entityApplicant->getImage(),
  65.                 'phone' => $entityApplicant->getPhone(),
  66.                 'address' => $entityApplicant->getPermAddr()
  67.             ]
  68.         ]);
  69.     }
  70.     /**
  71.      * Shown when a tenant's subscription has lapsed beyond grace and the (default-off)
  72.      * suspension gate is active. Public so a suspended user can still reach it; links
  73.      * out to renew. Kept deliberately self-contained (no template dependency).
  74.      */
  75.     public function SubscriptionExpiredPageAction(Request $request)
  76.     {
  77.         $logout $this->generateUrl('user_logout');
  78.         $html '<!doctype html><html><head><meta charset="utf-8"><title>Subscription expired</title>'
  79.             '<meta name="viewport" content="width=device-width, initial-scale=1">'
  80.             '<style>body{font-family:system-ui,Segoe UI,Arial,sans-serif;background:#f5f6f9;margin:0;'
  81.             'display:flex;min-height:100vh;align-items:center;justify-content:center;}'
  82.             '.c{background:#fff;border:1px solid #e4e7ee;border-radius:16px;padding:40px 44px;max-width:460px;'
  83.             'text-align:center;box-shadow:0 12px 40px rgba(20,30,50,.08);}'
  84.             'h1{font-size:20px;color:#1f2733;margin:0 0 10px;}p{color:#5a6473;line-height:1.6;font-size:14px;}'
  85.             'a{display:inline-block;margin-top:18px;color:#7c4dff;font-weight:600;text-decoration:none;}'
  86.             '.i{font-size:40px;}</style></head><body><div class="c">'
  87.             '<div class="i">⏳</div><h1>Your subscription has expired</h1>'
  88.             '<p>Access is paused until the subscription is renewed. Please contact your account owner '
  89.             'or administrator to renew the plan and restore access.</p>'
  90.             '<a href="' htmlspecialchars($logout) . '">Sign out</a></div></body></html>';
  91.         return new Response($html200);
  92.     }
  93.     public function ReturnJsonForListenerAction(Request $request$dataStr '')
  94.     {
  95.         $session $request->getSession();
  96.         $dataStrFromSess $session->get('jsonStrForListenerData');
  97.         $dataJson json_decode($dataStrFromSesstrue);
  98.         $session->set('jsonStrForListenerData'null);
  99.         if ($dataJson == null$dataJson = [];
  100.         return new JsonResponse($dataJson);
  101.     }
  102.     public function ZktEcoHandshakeAction(Request $request): Response
  103.     {
  104.         // ZKTeco sends heartbeat GET without POST body
  105.         ob_clean();
  106.         // Get device
  107.         $deviceSN $request->get('SN''');
  108.         if ($request->getMethod() === "GET") {
  109.         } else {
  110.             $em_goc $this->getDoctrine()->getManager('company_group');
  111.             $em $this->getDoctrine()->getManager();
  112.             $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  113.             $device $em_goc->getRepository('CompanyGroupBundle\\Entity\\Device')->findOneBy([
  114.                 'deviceSerial' => $deviceSN
  115.             ]);
  116.             // ZKTeco sends logs via POST
  117.             $content $request->getContent();
  118.             // Example: OP=ATTLOG&PIN=25&Time=2025-11-27%2012%3A20%3A33&...
  119.             parse_str($content$data); // Convert POST body to array
  120.             if ($request->get('table''') === 'ATTLOG') {
  121.                 if ($device) {
  122.                     $app $em_goc->getRepository('CompanyGroupBundle\\Entity\\CompanyGroup')->findOneBy([
  123.                         'appId' => $device->getAppId()
  124.                     ]);
  125.                     if ($app)   //can go local
  126.                     {
  127.                         $goc = [
  128.                             'dbName' => $app->getDbName(),
  129.                             'dbUser' => $app->getDbUser(),
  130.                             'dbPass' => $app->getDbPass(),
  131.                             'dbHost' => $app->getDbHost(),
  132.                             'serverAddress' => $app->getCompanyGroupServerAddress(),
  133.                             'port' => $app->getCompanyGroupServerPort() ?: 80,
  134.                             'appId' => $app->getAppId(),
  135. //                                 'serverId' => $entry->getServerId(),
  136.                         ];
  137.                         $connector $this->container->get('application_connector');
  138.                         $connector->resetConnection(
  139.                             'default',
  140.                             $goc['dbName'],
  141.                             $goc['dbUser'],
  142.                             $goc['dbPass'],
  143.                             $goc['dbHost'],
  144.                             $reset true
  145.                         );
  146.                         $em $this->getDoctrine()->getManager();
  147.                         $options = array(
  148.                             'notification_enabled' => $this->container->getParameter('notification_enabled'),
  149.                             'notification_server' => $this->container->getParameter('notification_server'),
  150.                         );
  151. //                    if($device->getDeviceMarker()=='_ZKTECO_GEN_')
  152.                         if (1) {
  153.                             $raw trim($request->getContent());
  154.                             // Multiple lines? split them
  155.                             $lines preg_split('/\r\n|\r|\n/'$raw);
  156.                             foreach ($lines as $line) {
  157.                                 $line trim($line);
  158.                                 if ($line === "") continue;
  159.                                 // Split on ANY whitespace
  160.                                 $parts preg_split('/\s+/'$line);
  161.                                 if (count($parts) < 3) {
  162.                                     continue; // invalid line
  163.                                 }
  164.                                 $pin $parts[0];
  165.                                 $date $parts[1];
  166.                                 $time $parts[2];
  167.                                 $verify $parts[3] ?? null;
  168.                                 $status $parts[4] ?? null;
  169.                                 $workcode $parts[5] ?? null;
  170.                                 $timestamp = new \DateTime("$date $time ".$device->getTimezoneStr());
  171.                                 $empId $pin;
  172.                                 $userId 0;
  173.                                 $today = new \DateTime();
  174. //                                $dtTs = $today->format('U');
  175.                             $dtTs $timestamp->format('U');
  176.                                 $appId $app->getAppId();
  177.                                 $statusToMarker = array(
  178.                                     => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_IN,
  179.                                     => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
  180.                                     => HumanResourceConstant::ATTENDANCE_MARKER_GENERAL_TRACKING,
  181.                                     => HumanResourceConstant::ATTENDANCE_MARKER_GENERAL_TRACKING,
  182.                                     => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
  183.                                     => HumanResourceConstant::ATTENDANCE_MARKER_CLOCK_OUT,
  184.                                 );
  185.                                 $employee $em->getRepository(Employee::class)->createQueryBuilder('A')
  186.                                     ->where("  A.idsByDevice like '" $device->getDeviceSerial() . "_" $pin "' or " .
  187.                                         "  A.idsByDevice like '%," $device->getDeviceSerial() . "_" $pin ",%' or " .
  188.                                         "  A.idsByDevice like '" $device->getDeviceSerial() . "_" $pin ",%' or " .
  189.                                         "  A.idsByDevice like '%," $device->getDeviceSerial() . "_" $pin "'"
  190.                                     )
  191.                                     ->getQuery()
  192.                                     ->setMaxResults(1)
  193.                                     ->getResult();
  194.                                 if (!empty($employee))
  195.                                     $empId $employee[0]->getEmployeeId();
  196.                                 if ($device->getClockInDetection() == 1)
  197.                                     $markerId $statusToMarker[$status];
  198.                                 else
  199.                                     $markerId HumanResourceConstant::ATTENDANCE_MARKER_START_WORKING_FORCED;
  200.                                 $geofenceContext = array(
  201.                                     'lat' => $request->request->get('lat'),
  202.                                     'lng' => $request->request->get('lng'),
  203.                                     'accuracy' => $request->request->get('accuracy'),
  204.                                     'locationAccuracy' => $request->request->get('locationAccuracy'),
  205.                                     'gpsAccuracy' => $request->request->get('gpsAccuracy'),
  206.                                     'isMockLocation' => $request->request->get('isMockLocation'),
  207.                                     'mock_location' => $request->request->get('mock_location'),
  208.                                     'isRemoteWork' => $request->request->get('isRemoteWork'),
  209.                                     'remote_work' => $request->request->get('remote_work'),
  210.                                 );
  211.                                 $response MiscActions::autoAttendanceGeneral($em$empId$userId$appId$dtTs$options0$markerId$geofenceContext);
  212.                             }
  213.                         }
  214.                     } else if ($systemType == '_CENTRAL_') {
  215.                     } else {
  216.                     }
  217. //                    return new Response('OK', 200, [
  218. //                        "Content-Type" => "text/plain; charset=ascii"
  219. //                    ]);
  220.                 }
  221. //            MiscActions::ProcessQrData($em_goc, $em, $data);
  222.                 /// get the app id
  223.                 ///  if in same server then connect to that app dbase and find employee id
  224.                 // Save attendance log
  225.                 // $data['PIN']
  226.                 // $data['Time']
  227.                 // $data['WorkCode'] (optional)
  228.                 // Example saving logic here…
  229.             }
  230.             return new Response("OK"200, [
  231.                 "Content-Type" => "text/plain; charset=ascii"
  232.             ]);
  233.         }
  234.         // Define the desired TimeZone (360 minutes for UTC+06:00)
  235.         $timeZoneMinutes "+06:00";
  236. // Get the current time on your server and format it for the device
  237.         $currentTime date('Y-m-dTH:i:s');
  238.         if ($request->get('options''') == 'all')
  239.             $r "GET OPTION FROM: $deviceSN\r\n" .
  240.                 "Stamp=9999\r\n" .
  241.                 "OpStamp=" time() . "\r\n" .
  242.                 "ErrorDelay=60\r\n" .
  243.                 "Delay=30\r\n" .
  244.                 "ResLogDay=18250\r\n" .
  245.                 "ResLogDelCount=10000\r\n" .
  246.                 "ResLogCount=50000\r\n" .
  247.                 "TransTimes=00:00;14:05\r\n" .
  248.                 "TransInterval=1\r\n" .
  249.                 "SyncTime=3600\r\n" .
  250.                 "TransFlag=1111000000\r\n" .
  251. //            "Time=$currentTime\r\n" .
  252.                 "TimeZone=$timeZoneMinutes\r\n" .
  253.                 "Realtime=1\r\n" .
  254.                 "Encrypt=0";
  255. //        return $r;
  256.         else if ($request->get('type''') == 'time') {
  257.             $r "Time=" $currentTime $timeZoneMinutes;
  258.         } else
  259.             $r "OK\r\n";
  260. //        $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
  261. //        $r .= "C:SET TIME " . $currentTime . "\r\n";
  262.         return new Response($r200, [
  263.             "Content-Type" => "text/plain; charset=ascii"
  264.         ]);
  265. //        return new Response('OK', 200, [
  266. //            "Content-Type" => "text/plain; charset=ascii"
  267. //        ]);
  268.         /*        $xml = '<?xml version="1.0" encoding="UTF-8"?><Response><Status>OK</Status></Response>';*/
  269. //
  270. //        return new Response(
  271. //            $xml,
  272. //            Response::HTTP_OK,
  273. //            [
  274. //                'Content-Type' => 'application/xml; charset=UTF-8'
  275. //            ]
  276. //        );
  277.     }
  278.     public function ZktEcoGetRequestAction(Request $request): Response
  279.     {
  280.         ob_clean();
  281.         return new Response('OK'200, [
  282.             "Content-Type" => "text/plain; charset=ascii"
  283.         ]);
  284.         $deviceSN $request->get('SN''');
  285.         $em_goc $this->getDoctrine()->getManager('company_group');
  286.         $em $this->getDoctrine()->getManager();
  287.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  288.         $device $em_goc->getRepository('CompanyGroupBundle\\Entity\\Device')->findOneBy([
  289.             'deviceSerial' => $deviceSN
  290.         ]);
  291.         // Default timezone (fallback)
  292.         $tzString 'UTC';
  293.         if ($device && $device->getTimezoneStr()) {
  294.             $tzString $device->getTimezoneStr();
  295.         }
  296.         // Format correct time
  297.         $tz = new \DateTimeZone($tzString);
  298.         $now = new \DateTime('now'$tz);
  299.         $formatted $now->format('Y-m-d H:i:s');
  300.         // Define the desired TimeZone (360 minutes for UTC+06:00)
  301.         $timeZoneMinutes 360;
  302. // Get the current time on your server and format it for the device
  303.         $currentTime $now->format('U');
  304. //        $now->modify('-5 days');
  305.         $r "";
  306. //        $r = "OK\r\n";
  307. //        $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
  308. //        $r .= "C:SET TIME " . $currentTime . "\r\n";
  309.         $r .= "C:401:SET OPTIONS " .
  310.             "DateTime=" $now->format('U') .
  311. //         "DateTime=1764929449" .
  312. //            "\r\n".
  313. //            ",".
  314. //            "ServerTZ=" . $tzString.
  315.             "\r\n";
  316.         return new Response($r200, [
  317.             "Content-Type" => "text/plain; charset=ascii"
  318.         ]);
  319.         // ZKTeco TIME sync command
  320.         $cmd "SET TIME=" $formatted "\n";
  321.         $cmd "CMD=SET OPTIONS&DateTime=" $now->format('U') . '&TZ=' $tzString;
  322.         return new Response('OK'200, [
  323.             "Content-Type" => "text/plain; charset=ascii"
  324.         ]);
  325. //        return new Response($cmd, 200, [
  326. //            "Content-Type" => "text/plain; charset=ascii"
  327. //        ]);
  328. //        return new Response('', 200, [
  329. //            "Content-Type" => "text/plain; charset=ascii"
  330. //        ]);
  331.     }
  332.     public function ZktEcoDeviceCmdAction(Request $request): Response
  333.     {
  334.         ob_clean();
  335.         // Device is asking for commands → return OK only
  336.         $responseString "OK";
  337.         $response = new Response($responseString);
  338.         return $response;
  339.     }
  340.     public function ZktEcoRtDataAction(Request $request): Response
  341.     {
  342.         $type $request->query->get('type');
  343.         $sn $request->query->get('SN');
  344.         // If device is asking for time
  345. //        if ($type === 'time')
  346.         if (0) {
  347.             // Example: Bangladesh time
  348.             ob_clean();
  349.             $deviceSN $request->get('SN''');
  350.             $em_goc $this->getDoctrine()->getManager('company_group');
  351.             $em $this->getDoctrine()->getManager();
  352.             $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  353.             $device $em_goc->getRepository('CompanyGroupBundle\\Entity\\Device')->findOneBy([
  354.                 'deviceSerial' => $deviceSN
  355.             ]);
  356.             // Default timezone (fallback)
  357.             $tzString 'UTC';
  358.             if ($device && $device->getTimezoneStr()) {
  359.                 $tzString $device->getTimezoneStr();
  360.             }
  361.             // Format correct time
  362.             $tz = new \DateTimeZone($tzString);
  363.             $now = new \DateTime('now'$tz);
  364.             $formatted $now->format('Y-m-d H:i:s');
  365.             // Define the desired TimeZone (360 minutes for UTC+06:00)
  366.             $timeZoneMinutes 360;
  367. // Get the current time on your server and format it for the device
  368.             $currentTime $now->format('U');
  369.             $r "";
  370. //        $r = "OK\r\n";
  371. //        $r .= "C:SET OPTION TimeZone $timeZoneMinutes\r\n";
  372. //        $r .= "C:SET TIME " . $currentTime . "\r\n";
  373.             $r .= "DateTime=" $now->format('U') .
  374. //         "DateTime=1764929449" .
  375. //            "\r\n".
  376. //                ",".
  377. //                "ServerTZ=" . $tzString.
  378.                 "";
  379.             return new Response($r200, [
  380.                 "Content-Type" => "text/plain; charset=ascii"
  381.             ]);
  382.         }
  383.         // Default fallback for other rtdata
  384.         return new Response('OK'200, ['Content-Type' => 'text/plain']);
  385.     }
  386.     public function ScanQrAction(Request $request$version '')
  387.     {
  388.         $session $request->getSession();
  389.         $firstData $request->getContent();
  390.         $data json_decode($firstDatatrue);
  391.         $appId = [];
  392.         if (json_last_error() === JSON_ERROR_NONE) {
  393.             // JSON is valid
  394.             if (isset($data['appId']))
  395.                 $appId $data['appId'];
  396.         } else
  397.             $data $firstData;
  398.         $em_goc $this->getDoctrine()->getManager('company_group');
  399.         $em $this->getDoctrine()->getManager();
  400.         if ($appId != 0) {
  401.             $companies $em_goc->getRepository('CompanyGroupBundle\\Entity\\CompanyGroup')->findBy([
  402.                 'appId' => $appId
  403.             ]);
  404.             foreach ($companies as $entry) {
  405.                 $goc = [
  406.                     'dbName' => $entry->getDbName(),
  407.                     'dbUser' => $entry->getDbUser(),
  408.                     'dbPass' => $entry->getDbPass(),
  409.                     'dbHost' => $entry->getDbHost(),
  410.                     'serverAddress' => $entry->getCompanyGroupServerAddress(),
  411.                     'port' => $entry->getCompanyGroupServerPort() ?: 80,
  412.                     'appId' => $entry->getAppId(),
  413. //                                 'serverId' => $entry->getServerId(),
  414.                 ];
  415.                 $connector $this->container->get('application_connector');
  416.                 $connector->resetConnection(
  417.                     'default',
  418.                     $goc['dbName'],
  419.                     $goc['dbUser'],
  420.                     $goc['dbPass'],
  421.                     $goc['dbHost'],
  422.                     $reset true
  423.                 );
  424.                 $em $this->getDoctrine()->getManager();
  425.             }
  426.         }
  427.         MiscActions::ProcessQrData($em_goc$em$data);
  428.         return new JsonResponse(
  429.             array(
  430.                 'postData' => $request->request->all(),
  431.                 'getData' => $request->query->all(),
  432.                 'contentData' => $request->getContent(),
  433.             )
  434.         );
  435.     }
  436.     public function GetGlobalIdFromEmployeeIdAction(Request $request$version '')
  437.     {
  438.         $session $request->getSession();
  439.         $appId $request->request->get('appId'0);
  440.         $empId $request->request->get('employeeId'0);
  441.         $em_goc $this->getDoctrine()->getManager('company_group');
  442.         $em $this->getDoctrine()->getManager();
  443.         if ($appId != 0) {
  444.             $entry $em_goc->getRepository('CompanyGroupBundle\\Entity\\CompanyGroup')->findOneBy([
  445.                 'appId' => $appId
  446.             ]);
  447.             $goc = [
  448.                 'dbName' => $entry->getDbName(),
  449.                 'dbUser' => $entry->getDbUser(),
  450.                 'dbPass' => $entry->getDbPass(),
  451.                 'dbHost' => $entry->getDbHost(),
  452.                 'serverAddress' => $entry->getCompanyGroupServerAddress(),
  453.                 'port' => $entry->getCompanyGroupServerPort() ?: 80,
  454.                 'appId' => $entry->getAppId(),
  455. //                                 'serverId' => $entry->getServerId(),
  456.             ];
  457.             $connector $this->container->get('application_connector');
  458.             $connector->resetConnection(
  459.                 'default',
  460.                 $goc['dbName'],
  461.                 $goc['dbUser'],
  462.                 $goc['dbPass'],
  463.                 $goc['dbHost'],
  464.                 $reset true
  465.             );
  466.             $em $this->getDoctrine()->getManager();
  467.             $employee $this->getDoctrine()->getManager()
  468.                 ->getRepository("ApplicationBundle\\Entity\\Employee")
  469.                 ->findOneBy(array(
  470.                     'employeeId' => $empId
  471.                 ));
  472.             if ($employee) {
  473.                 $user $this->getDoctrine()->getManager()
  474.                     ->getRepository("ApplicationBundle\\Entity\\SysUser")
  475.                     ->findOneBy(array(
  476.                         'userId' => $employee->getUserId()
  477.                     ));
  478.                 if ($user)
  479.                     return new JsonResponse(array('globalId' => $user->getGlobalId()));
  480.             }
  481.         }
  482.         return new JsonResponse(array('globalId' => 0));
  483.     }
  484.     public function VerifyEmailForAppAction(Request $request$encData ''$remoteVerify 0)
  485.     {
  486.         //        $userCategory=$request->request->has('userCategory');
  487.         $encryptedData = [];
  488.         $errorField '';
  489.         $message '';
  490.         $userType '';
  491.         $otpExpireSecond 180;
  492.         $otpExpireTs 0;
  493.         $otp '';
  494.         $otpActionId $request->request->get('otpAction'UserConstants::OTP_ACTION_CONFIRM_EMAIL);
  495.         if ($encData != '')
  496.             $encryptedData json_decode($this->get('url_encryptor')->decrypt($encData), true);
  497.         //        $encryptedData = $this->get('url_encryptor')->decrypt($encData);
  498.         $userCategory '_BUDDYBEE_USER_';
  499.         if (isset($encryptedData['userCategory']))
  500.             $userCategory $encryptedData['userCategory'];
  501.         else
  502.             $userCategory $request->request->get('userCategory''_BUDDYBEE_USER_');
  503.         $em $this->getDoctrine()->getManager('company_group');
  504.         $em_goc $this->getDoctrine()->getManager('company_group');
  505.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  506.         $ownServerId $this->container->hasParameter('server_id') ? $this->container->getParameter('server_id') : '_NONE_';
  507.         $twig_file '@Authentication/pages/views/find_account_buddybee.html.twig';
  508.         $twigData = [];
  509.         $email_twig_file '@Application/pages/email/find_account_buddybee.html.twig';
  510.         $email_address $request->request->get('email''');
  511.         $email_twig_data = [];
  512.         $appendCode $request->request->get('appendCode'$request->query->get('appendCode'''));
  513.         if ($request->isMethod('POST')) {
  514.             //set an otp and its expire and send mail
  515.             $email_address $request->request->get('email');
  516.             $userObj null;
  517.             $userData = [];
  518.             {
  519.                 $userType UserConstants::USER_TYPE_APPLICANT;
  520.                 $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  521.                     array(
  522.                         'email' => $email_address
  523.                     )
  524.                 );
  525.                 if ($userObj) {
  526.                 } else {
  527.                     $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  528.                         array(
  529.                             'oAuthEmail' => $email_address
  530.                         )
  531.                     );
  532.                     if ($userObj) {
  533.                     } else {
  534.                         $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  535.                             array(
  536.                                 'username' => $email_address
  537.                             )
  538.                         );
  539.                     }
  540.                 }
  541.                 if ($userObj) {
  542.                     $email_address $userObj->getEmail();
  543.                     if ($email_address == null || $email_address == '')
  544.                         $email_address $userObj->getOAuthEmail();
  545.                     //                    triggerResetPassword:
  546. //                    type: integer
  547. //                          nullable: true
  548.                     $otpData MiscActions::GenerateOtp($otpExpireSecond);
  549.                     $otp $otpData['otp'];
  550.                     $otpExpireTs $otpData['expireTs'];
  551.                     $userObj->setOtp($otpData['otp']);
  552.                     $userObj->setOtpActionId($otpActionId);
  553.                     $userObj->setOtpExpireTs($otpData['expireTs']);
  554.                     $em_goc->flush();
  555.                     $userData = array(
  556.                         'id' => $userObj->getApplicantId(),
  557.                         'email' => $email_address,
  558.                         'appId' => 0,
  559.                         'image' => $userObj->getImage(),
  560.                         'firstName' => $userObj->getFirstname(),
  561.                         'lastName' => $userObj->getLastname(),
  562.                         'phone' => $userObj->getPhone(),
  563. //                        'appId'=>$userObj->getUserAppId(),
  564.                     );
  565.                     $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  566.                     $email_twig_data = [
  567.                         'page_title' => 'Find Account',
  568.                         'encryptedData' => $encryptedData,
  569.                         'message' => $message,
  570.                         'userType' => $userType,
  571.                         'errorField' => $errorField,
  572.                         'otp' => $otpData['otp'],
  573.                         'otpExpireSecond' => $otpExpireSecond,
  574.                         'otpActionId' => $otpActionId,
  575.                         'otpActionTitle' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionTitle'],
  576.                         'otpActionDescForMail' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionDescForMail'],
  577.                         'otpExpireTs' => $otpData['expireTs'],
  578.                         'systemType' => $systemType,
  579.                         'userCategory' => $userCategory,
  580.                         'userData' => $userData
  581.                     ];
  582.                     $email_twig_data['success'] = true;
  583.                 } else {
  584.                     $message "Oops! Could not find your account";
  585.                     $email_twig_data['success'] = false;
  586.                 }
  587.             }
  588.             if ($email_twig_data['success'] == true && GeneralConstant::EMAIL_ENABLED == 1) {
  589.                 $bodyHtml '';
  590.                 $bodyTemplate $email_twig_file;
  591.                 $bodyData $email_twig_data;
  592.                 $attachments = [];
  593.                 $forwardToMailAddress $email_address;
  594. //                    $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
  595.                 $new_mail $this->get('mail_module');
  596.                 $new_mail->sendMyMail(array(
  597.                     'senderHash' => '_CUSTOM_',
  598.                     //                        'senderHash'=>'_CUSTOM_',
  599.                     'forwardToMailAddress' => $forwardToMailAddress,
  600.                     'subject' => 'Account Verification',
  601. //                        'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
  602.                     'attachments' => $attachments,
  603.                     'toAddress' => $forwardToMailAddress,
  604.                     'fromAddress' => 'accounts@ourhoneybee.eu',
  605.                     'userName' => 'accounts@ourhoneybee.eu',
  606.                     'password' => 'Honeybee@0112',
  607.                     'smtpServer' => 'smtp.hostinger.com',
  608.                     'smtpPort' => 465,
  609. //                            'emailBody' => $bodyHtml,
  610.                     'mailTemplate' => $bodyTemplate,
  611.                     'templateData' => $bodyData,
  612. //                        'embedCompanyImage' => 1,
  613. //                        'companyId' => $companyId,
  614. //                        'companyImagePath' => $company_data->getImage()
  615.                 ));
  616.             }
  617.             if ($email_twig_data['success'] == true && GeneralConstant::NOTIFICATION_ENABLED == && $userData['phone'] != '' && $userData['phone'] != null) {
  618.                 if ($systemType == '_BUDDYBEE_') {
  619.                     $searchVal = ['_OTP_''_EXPIRE_MINUTES_''_APPEND_CODE_'];
  620.                     $replaceVal = [$otpfloor($otpExpireSecond 60), $appendCode];
  621.                     $msg 'Use OTP _OTP_ for BuddyBee. Your OTP will expire in _EXPIRE_MINUTES_ minutes
  622.                      _APPEND_CODE_';
  623.                     $msg str_replace($searchVal$replaceVal$msg);
  624.                     $emitMarker '_SEND_TEXT_TO_MOBILE_';
  625.                     $sendType 'all';
  626.                     $socketUserIds = [];
  627.                     System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg$userData['phone'], $emitMarker$sendType$socketUserIds);
  628.                 } else {
  629.                 }
  630.             }
  631.             $encData = array(
  632.                 "userType" => $userType,
  633.                 "otp" => '',
  634. //                "otp"=>$otp,
  635.                 "otpExpireTs" => $otpExpireTs,
  636.                 "otpActionId" => $otpActionId,
  637.                 "userCategory" => $userCategory,
  638.                 "userId" => $userData['id']??0,
  639.                 "systemType" => $systemType,
  640.                 "email" => $email_address,
  641.             );
  642.             $encDataStr $this->get('url_encryptor')->encrypt(json_encode($encData));
  643.             $response = new JsonResponse(array(
  644.                     'templateData' => $twigData,
  645.                     'message' => $message,
  646.                     "otp" => '',
  647. //                        "otp" => $otp,
  648.                     "encData" => $encDataStr,
  649.                     "otpExpireTs" => $otpExpireTs,
  650. //                        'actionData' => $email_twig_data,
  651.                     'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  652.                 )
  653.             );
  654.             $response->headers->set('Access-Control-Allow-Origin''*');
  655.             return $response;
  656.         }
  657.     }
  658.     public function EmployeeAddUsingQrCodeErpServerAction(Request $request)
  659.     {
  660.         $em_goc $this->getDoctrine()->getManager('company_group');
  661.         $app $em_goc->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  662.             ->findOneBy(
  663.                 array(
  664.                     'appId' => $request->request->get('appId'),
  665.                 )
  666.             );
  667.         $connector $this->container->get('application_connector');
  668.         $connector->resetConnection(
  669.             'default',
  670.             $app->getDbName(),
  671.             $app->getDbUser(),
  672.             $app->getDbPass(),
  673.             $app->getDbHost(),
  674.             true
  675.         );
  676.         $em $this->getDoctrine()->getManager();
  677.         $user $em->getRepository('ApplicationBundle\\Entity\\SysUser')
  678.             ->findOneBy(
  679.                 array(
  680.                     'globalId' => $request->request->get('globalId'),
  681.                 )
  682.             );
  683.         if (!$user)
  684.             $user = new SysUser();
  685.         $user->setGlobalId($request->request->get('globalId'));
  686.         $user->setUsername($request->request->get('username'));
  687.         $user->setEmail($request->request->get('email'));
  688.         $user->setName($request->request->get('firstname'));
  689.         $user->setUserType($request->request->get('userType'));
  690.         $user->setUserAppId($request->request->get('appId'));
  691.         $user->setUserCompanyId(1);
  692.         $user->setStatus(1);
  693.         $user->setDefaultRoute('');
  694.         $em->persist($user);
  695.         $em->flush();
  696.         $employee $em->getRepository('ApplicationBundle\\Entity\\Employee')
  697.             ->findOneBy(
  698.                 array(
  699.                     'userId' => $user->getUserId(),
  700.                 )
  701.             );
  702.         if (!$employee) {
  703.             $employee = new Employee();
  704.             if ($request->request->get('email') && $request->request->get('firstname') && $request->request->get('lastname')) {
  705.                 $employee->setEmail($request->request->get('email'));
  706.                 $employee->setFirstName($request->request->get('firstname'));
  707.                 $employee->setLastName($request->request->get('lastname'));
  708.                 $employee->setCompanyId($request->request->get('companyId'));
  709.                 $employee->setStatus(1);
  710.                 $employee->setUserId($user->getUserId());
  711.                 $em->persist($employee);
  712.                 $em->flush();
  713.             } else {
  714.                 return new JsonResponse([
  715.                     'status' => 'error',
  716.                     'message' => 'Missing employee data',
  717.                 ]);
  718.             }
  719.         }
  720.         $employeeDetails $em->getRepository('ApplicationBundle\\Entity\\EmployeeDetails')
  721.             ->findOneBy(
  722.                 array(
  723.                     'userId' => $user->getUserId(),
  724.                 )
  725.             );
  726.         if (!$employeeDetails) {
  727.             $employeeDetails = new EmployeeDetails();
  728.             if ($request->request->get('email') && $request->request->get('firstname') && $request->request->get('lastname')) {
  729.                 $employeeDetails->setId($employee->getEmployeeId());
  730.                 $employeeDetails->setEmail($request->request->get('email'));
  731.                 $employeeDetails->setFirstname($request->request->get('firstname'));
  732.                 $employeeDetails->setLastname($request->request->get('lastname'));
  733.                 $employeeDetails->setUsername($request->request->get('username'));
  734.                 $employeeDetails->setUserId($employee->getUserId());
  735.                 $employeeDetails->setEmpStatus(1);
  736.                 $em->persist($employeeDetails);
  737.                 $em->flush();
  738.             } else {
  739.                 return new JsonResponse([
  740.                     'status' => 'error',
  741.                     'message' => 'Missing employee data',
  742.                 ]);
  743.             }
  744.         }
  745.         return new JsonResponse([
  746.             'status' => 'success',
  747.             'message' => 'Employee Added Successfully',
  748.         ]);
  749.     }
  750.     public function GetEmployeeDataByAppAction(Request $request$id 0)
  751.     {
  752.         $session $request->getSession();
  753.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  754.         $globalId $request->get('globalId'0);
  755.         $appId $request->get('appId'0);
  756.         $userId $request->get('userId'0);
  757.         $employeeId 0;
  758.         $gocDataList = [];
  759.         $gocDataListByAppId = [];
  760.         $appIds $request->get('appIds'$appId);
  761.         $userIds $request->get('userIds'$userId);
  762.         $em $this->getDoctrine()->getManager('company_group');
  763.         $em->getConnection()->connect();
  764.         $connected $em->getConnection()->isConnected();
  765.         $returnData = [];
  766.         if ($connected) {
  767.             $findByQuery = array(
  768.                 'active' => 1
  769.             );
  770.             if ($appIds !== '_UNSET_')
  771.                 $findByQuery['appId'] = $appIds;
  772.             $gocList $this->getDoctrine()->getManager('company_group')
  773.                 ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  774.                 ->findBy($findByQuery);
  775.             foreach ($gocList as $entry) {
  776.                 $d = array(
  777.                     'name' => $entry->getName(),
  778.                     'id' => $entry->getId(),
  779.                     'image' => $entry->getImage(),
  780.                     'companyGroupHash' => $entry->getCompanyGroupHash(),
  781.                     'dbName' => $entry->getDbName(),
  782.                     'dbUser' => $entry->getDbUser(),
  783.                     'dbPass' => $entry->getDbPass(),
  784.                     'dbHost' => $entry->getDbHost(),
  785.                     'appId' => $entry->getAppId(),
  786.                     'companyRemaining' => $entry->getCompanyRemaining(),
  787.                     'companyAllowed' => $entry->getCompanyAllowed(),
  788.                 );
  789.                 $gocDataList[$entry->getId()] = $d;
  790.                 $gocDataListByAppId[$entry->getAppId()] = $d;
  791.             }
  792.             $connector $this->container->get('application_connector');
  793.             $connector->resetConnection(
  794.                 'default',
  795.                 $gocDataListByAppId[$appId]['dbName'],
  796.                 $gocDataListByAppId[$appId]['dbUser'],
  797.                 $gocDataListByAppId[$appId]['dbPass'],
  798.                 $gocDataListByAppId[$appId]['dbHost'],
  799.                 $reset true);
  800.             $em $this->getDoctrine()->getManager();
  801.             $user $em
  802.                 ->getRepository('ApplicationBundle\\Entity\\SysUser')
  803.                 ->findOneBy(
  804.                     array(
  805.                         'globalId' => $globalId
  806.                     )
  807.                 );
  808.             if ($user) {
  809.                 $employee $em
  810.                     ->getRepository('ApplicationBundle\\Entity\\Employee')
  811.                     ->findOneBy(
  812.                         array(
  813.                             'userId' => $user->getUserId()
  814.                         )
  815.                     );
  816.                 if ($employee) {
  817.                     $employeeDetails $em
  818.                         ->getRepository('ApplicationBundle\\Entity\\EmployeeDetails')
  819.                         ->findOneBy(
  820.                             array(
  821.                                 'id' => $employee->getEmployeeId()
  822.                             )
  823.                         );
  824.                     if ($employeeDetails) {
  825.                         $department $em->getRepository('ApplicationBundle\\Entity\\SysDepartment')->findOneBy(
  826.                             array(
  827.                                 'departmentId' => $employee->getDepartmentId()
  828.                             )
  829.                         );
  830.                         if ($department)
  831.                             $returnData['department'] = $department->getDepartmentName();
  832.                         else
  833.                             $returnData['department'] = '';
  834.                         $position $em->getRepository('ApplicationBundle\\Entity\\SysDepartmentPosition')->findOneBy(
  835.                             array(
  836.                                 'positionId' => $employee->getPositionId()
  837.                             )
  838.                         );
  839.                         if ($position)
  840.                             $returnData['position'] = $position->getPositionName();
  841.                         else
  842.                             $returnData['position'] = '';
  843.                         $branch $em->getRepository('ApplicationBundle\\Entity\\Branch')->findOneBy(
  844.                             array(
  845.                                 'branchId' => $employee->getBranchId()
  846.                             )
  847.                         );
  848.                         if ($branch)
  849.                             $returnData['branch'] = $branch->getName();
  850.                         else
  851.                             $returnData['branch'] = '';
  852.                         $supervisor $em->getRepository('ApplicationBundle\\Entity\\SysUser')->findOneBy(
  853.                             array(
  854.                                 'userId' => $employee->getSupervisorId()
  855.                             )
  856.                         );
  857.                         if ($supervisor)
  858.                             $returnData['supervisor'] = $supervisor->getName();
  859.                         else
  860.                             $returnData['supervisor'] = '';
  861.                         $returnData array_merge($returnDataEmployeePayloadNormalizer::normalize([
  862.                             'firstname' => $employee->getFirstname(),
  863.                             'lastname' => $employee->getLastname(),
  864.                             'employee_code' => $employeeDetails->getEmpCode() ?? '',
  865.                             'joining_date' => $employeeDetails->getJoiningDate(),
  866.                             'status' => $employee->getStatus(),
  867.                             'contact_number' => $employee->getContactNumber(),
  868.                             'current_address' => $employee->getCurrentAddress(),
  869.                             'permanent_address' => $employee->getPermanentAddress(),
  870.                             'image' => $employee->getImage(),
  871.                         ]));
  872.                         $returnData['joiningDate'] = $employeeDetails->getJoiningDate() ? $employeeDetails->getJoiningDate()->format('F d, Y') : '';
  873.                         $returnData['employeeId'] = 'E' str_pad($appId5'0'STR_PAD_LEFT) . str_pad($employee->getEmployeeId(), 8'0'STR_PAD_LEFT);
  874.                         $returnData['employeeCode'] = $employeeDetails->getEmpCode() ?? '';
  875.                         $returnData['joining_date'] = $returnData['joiningDate'];
  876.                         $returnData['emp_code'] = $returnData['employeeCode'];
  877.                         $returnData['employee_code'] = $returnData['employeeCode'];
  878.                         $returnData['employmentType'] = EmployeeConstant::$employeeType[$employeeDetails->getEmpType()] ?? '';
  879.                         $returnData['appId'] = $appId;
  880.                         $returnData['appName'] = $gocDataListByAppId[$appId]['name'];
  881.                         $returnData['appImage'] = $gocDataListByAppId[$appId]['image'];
  882.                     }
  883.                 }
  884.             }
  885.         }
  886.         return new JsonResponse(array(
  887.             'success' => !empty($returnData),
  888.             'returnData' => $returnData,
  889.         ));
  890.     }
  891.     public function PublicProfilePageAction(Request $request$id 0)
  892.     {
  893.         $em $this->getDoctrine()->getManager();
  894.         $session $request->getSession();
  895.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  896.         $globalId 0;
  897.         $appId 0;
  898.         $employeeId 0;
  899.         if ($systemType == '_CENTRAL_') {
  900.             if (strpos($id'E') !== false) {
  901.             }
  902.             $urlToCall GeneralConstant::HONEYBEE_CENTRAL_SERVER '/employee/profile/' $id '?returnJson=1';
  903.             $curl curl_init();
  904.             curl_setopt_array($curl, array(
  905.                 CURLOPT_RETURNTRANSFER => 1,
  906.                 CURLOPT_POST => 0,
  907.                 CURLOPT_URL => $urlToCall,
  908.                 CURLOPT_CONNECTTIMEOUT => 10,
  909.                 CURLOPT_SSL_VERIFYPEER => false,
  910.                 CURLOPT_SSL_VERIFYHOST => false,
  911.                 CURLOPT_HTTPHEADER => array(),
  912.                 CURLOPT_POSTFIELDS => []
  913.             ));
  914.             $retData curl_exec($curl);
  915.             $errData curl_error($curl);
  916.             curl_close($curl);
  917.             $data $em->getRepository(EntityApplicantDetails::class)->find($id);
  918.             return $this->render('@HoneybeeWeb/pages/public_profile.html.twig', array(
  919.                 'page_title' => 'Employee Profile',
  920.                 'details' => $data,
  921.                 'genderList' => EmployeeConstant::$sex,
  922.                 'bloodGroupList' => EmployeeConstant::$BloodGroup,
  923.             ));
  924.         } else if ($systemType == '_ERP_') {
  925.             if (strpos($id'E') !== false) {
  926.             }
  927.             $employee $em->getRepository('ApplicationBundle\\Entity\\Employee')->findOneBy(
  928.                 array(
  929.                     'employeeId' => $id
  930.                 ));
  931.             if ($employee) {
  932.                 $user $em->getRepository('ApplicationBundle\\Entity\\SysUser')->findOneBy(
  933.                     array(
  934.                         'userId' => $employee->getUserId()
  935.                     ));
  936.                 if ($user)
  937.                     $globalId $user->getGlobalId();
  938.             }
  939.             if ($request->query->get('returnJson'0) == 1)
  940.                 return new JsonResponse(array(
  941.                     'globalId' => $globalId
  942.                 ));
  943.             else {
  944.                 if ($globalId == || $globalId == null) {
  945.                     return $this->redirectToRoute('permission_denied_page');
  946.                 } else {
  947.                     return $this->redirect(GeneralConstant::HONEYBEE_CENTRAL_SERVER '/profile/public/' $globalId);
  948.                 }
  949.             }
  950.         }
  951.     }
  952.     public function GenerateQrAction(Request $request$url '')
  953.     {
  954.         $em_goc $this->getDoctrine()->getManager('company_group');
  955.         $em_goc->getConnection()->connect();
  956.         $customQrUrl $request->query->get('url'$url);
  957.         $company $request->query->get('company');
  958.         $appid $request->query->get('appid');
  959.         $companyId $request->query->get('companyId');
  960.         $userType $request->query->get('userType');
  961.         $absoluteUrl $this->generateUrl('dashboard', [], UrlGenerator::ABSOLUTE_URL);
  962.         $companyDetails $em_goc->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")->findOneBy(
  963.             array(
  964.                 'appId' => $appid
  965.             ));
  966. //        $companyImage = rtrim($absoluteUrl, '/') . '/' . ltrim($companyDetails->getImage(), '/');
  967.         $companyImage $companyDetails->getImage();
  968.         if ($companyImage) {
  969.             $companyImage rtrim($absoluteUrl'/') . '/' ltrim($companyImage'/');
  970.         } else {
  971.             $companyImage '';
  972.         }
  973.         $userTypeNames = [
  974.             => 'Admin',
  975.             => 'User',
  976.             => 'Management',
  977.         ];
  978.         $userTypeName = isset($userTypeNames[$userType]) ? $userTypeNames[$userType] : 'Unknown';
  979.         $finalUrl $customQrUrl == '' "https://ourhoneybee.eu/add_employee_by_qr?company=" urlencode($company) .
  980.             "&appid=" urlencode($appid) .
  981.             "&companyId=" urlencode($companyId) .
  982.             "&companyImage=" urlencode($companyImage) .
  983.             "&userType=" urlencode($userType) : $customQrUrl;
  984.         if ($request->get('htmlView'0) == 1) {
  985.             return $this->render('@Application/inc/snippets/qr_div.html.twig',
  986.                 array(
  987.                     'page_title' => 'Bee Codes',
  988. //                'export'=>'pdf,print',
  989.                     'data' => [],
  990.                     'isHtml' => $request->get('htmlView'0),
  991.                     'customQrUrl' => $customQrUrl,
  992.                     'url' => $finalUrl
  993.                 )
  994.             );
  995.         } else {
  996.             $html $this->renderView('@Application/inc/snippets/qr_div.html.twig',
  997.                 array(
  998.                     'page_title' => 'Bee Codes',
  999. //                'export'=>'pdf,print',
  1000.                     'data' => [],
  1001.                     'isHtml' => $request->get('htmlView'0),
  1002.                     'customQrUrl' => $customQrUrl,
  1003.                     'url' => $finalUrl
  1004.                 )
  1005.             );
  1006.             return new JsonResponse(array(
  1007.                 'html' => $html,
  1008.                 'customQrUrl' => $customQrUrl,
  1009.                 'url' => $finalUrl,
  1010.                 'companyImage' => $companyImage,
  1011.                 'userTypeName' => $userTypeName,
  1012.             ));
  1013.         }
  1014.     }
  1015.     public function NewPasswordAction(Request $request$encData '')
  1016.     {
  1017.         //        $userCategory=$request->request->has('userCategory');
  1018.         $encryptedData = [];
  1019.         $errorField '';
  1020.         $message '';
  1021.         $userType '';
  1022.         $otpExpireSecond 180;
  1023.         $session $request->getSession();
  1024.         if ($encData != '')
  1025.             $encryptedData json_decode($this->get('url_encryptor')->decrypt($encData), true);
  1026.         //        $encryptedData = $this->get('url_encryptor')->decrypt($encData);
  1027.         $otp = isset($encryptedData['otp']) ? $encryptedData['otp'] : 0;
  1028.         $password = isset($encryptedData['password']) ? $encryptedData['password'] : 0;
  1029.         $otpActionId = isset($encryptedData['otpActionId']) ? $encryptedData['otpActionId'] : 0;
  1030.         $userId = isset($encryptedData['userId']) ? $encryptedData['userId'] : $session->get(UserConstants::USER_ID);
  1031.         $userCategory = isset($encryptedData['userCategory']) ? $encryptedData['userCategory'] : '_BUDDYBEE_USER_';
  1032.         //        $em = $this->getDoctrine()->getManager('company_group');
  1033.         $em_goc $this->getDoctrine()->getManager('company_group');
  1034.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  1035.         $twig_file '@Application/pages/login/find_account_buddybee.html.twig';
  1036.         $twigData = [];
  1037.         $email_twig_file '@Application/pages/email/find_account_buddybee.html.twig';
  1038.         $email_twig_data = [];
  1039.         if ($request->isMethod('POST')) {
  1040.             $otp $request->request->get('otp'$otp);
  1041.             $password $request->request->get('password'$password);
  1042.             $otpActionId $request->request->get('otpActionId'$otpActionId);
  1043.             $userId $request->request->get('userId'$userId);
  1044.             $userCategory $request->request->get('userCategory'$userCategory);
  1045.             $email_address $request->request->get('email');
  1046.             if ($systemType == '_ERP_') {
  1047.                 $gocId $session->get(UserConstants::USER_GOC_ID);
  1048.                 $appId $session->get(UserConstants::USER_APP_ID);
  1049.                 $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1050.                 list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1051.                 if ($userCategory == '_APPLICANT_') {
  1052.                     $userType UserConstants::USER_TYPE_APPLICANT;
  1053.                     $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  1054.                         array(
  1055.                             'applicantId' => $userId
  1056.                         )
  1057.                     );
  1058.                     if ($userObj) {
  1059.                         if ($userObj->getTriggerResetPassword() == 1) {
  1060.                             $encodedPassword $this->container->get('app.legacy_password_service')->hashWithSalt($password$userObj->getSalt());
  1061.                             $userObj->setPassword($encodedPassword);
  1062.                             $userObj->setTempPassword('');
  1063.                             $userObj->setTriggerResetPassword(0);
  1064.                             $em_goc->flush();
  1065.                             $email_twig_data['success'] = true;
  1066.                             $message "";
  1067.                             $userData = array(
  1068.                                 'id' => $userObj->getApplicantId(),
  1069.                                 'email' => $email_address,
  1070.                                 'appId' => 0,
  1071.                                 'image' => $userObj->getImage(),
  1072.                                 'firstName' => $userObj->getFirstname(),
  1073.                                 'lastName' => $userObj->getLastname(),
  1074.                                 //                        'appId'=>$userObj->getUserAppId(),
  1075.                             );
  1076.                         } else {
  1077.                             $message "Action not allowed!";
  1078.                             $email_twig_data['success'] = false;
  1079.                         }
  1080.                     } else {
  1081.                         $message "Account not found!";
  1082.                         $email_twig_data['success'] = false;
  1083.                     }
  1084.                 } else {
  1085.                     $userType $session->get(UserConstants::USER_TYPE);
  1086.                     $userObj $em->getRepository('ApplicationBundle\\Entity\\SysUser')->findOneBy(
  1087.                         array(
  1088.                             'userId' => $userId
  1089.                         )
  1090.                     );
  1091.                     if ($userObj) {
  1092.                         if ($userObj->getTriggerResetPassword() == 1) {
  1093.                             $encodedPassword $this->container->get('app.legacy_password_service')->hashWithSalt($password$userObj->getSalt());
  1094.                             $userObj->setPassword($encodedPassword);
  1095.                             $userObj->setTempPassword('');
  1096.                             $userObj->setTriggerResetPassword(0);
  1097.                             $em->flush();
  1098.                             $email_twig_data['success'] = true;
  1099.                             $message "";
  1100.                         } else {
  1101.                             $message "Action not allowed!";
  1102.                             $email_twig_data['success'] = false;
  1103.                         }
  1104.                     } else {
  1105.                         $message "Account not found!";
  1106.                         $email_twig_data['success'] = false;
  1107.                     }
  1108.                 }
  1109.                 if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
  1110.                     $response = new JsonResponse(array(
  1111.                             'templateData' => $twigData,
  1112.                             'message' => $message,
  1113.                             'actionData' => $email_twig_data,
  1114.                             'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  1115.                         )
  1116.                     );
  1117.                     $response->headers->set('Access-Control-Allow-Origin''*');
  1118.                     return $response;
  1119.                 } else if ($email_twig_data['success'] == true) {
  1120.                     //                    $twig_file = '@Authentication/pages/views/reset_password_success_buddybee.html.twig';
  1121.                     //                    $twigData = [
  1122.                     //                        'page_title' => 'Reset Successful',
  1123.                     //                        'encryptedData' => $encryptedData,
  1124.                     //                        'message' => $message,
  1125.                     //                        'userType' => $userType,
  1126.                     //                        'errorField' => $errorField,
  1127.                     //
  1128.                     //                    ];
  1129.                     //                    return $this->render(
  1130.                     //                        $twig_file,
  1131.                     //                        $twigData
  1132.                     //                    );
  1133.                     return $this->redirectToRoute('dashboard');
  1134.                 }
  1135.             } else if ($systemType == '_BUDDYBEE_') {
  1136.                 $userType UserConstants::USER_TYPE_APPLICANT;
  1137.                 $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  1138.                     array(
  1139.                         'applicantId' => $userId
  1140.                     )
  1141.                 );
  1142.                 if ($userObj) {
  1143.                     if ($userObj->getTriggerResetPassword() == 1) {
  1144.                         $encodedPassword $this->container->get('app.legacy_password_service')->hashWithSalt($password$userObj->getSalt());
  1145.                         $userObj->setPassword($encodedPassword);
  1146.                         $userObj->setTempPassword('');
  1147.                         $userObj->setTriggerResetPassword(0);
  1148.                         $em_goc->flush();
  1149.                         $email_twig_data['success'] = true;
  1150.                         $message "";
  1151.                         $userData = array(
  1152.                             'id' => $userObj->getApplicantId(),
  1153.                             'email' => $email_address,
  1154.                             'appId' => 0,
  1155.                             'image' => $userObj->getImage(),
  1156.                             'firstName' => $userObj->getFirstname(),
  1157.                             'lastName' => $userObj->getLastname(),
  1158.                             //                        'appId'=>$userObj->getUserAppId(),
  1159.                         );
  1160.                     } else {
  1161.                         $message "Action not allowed!";
  1162.                         $email_twig_data['success'] = false;
  1163.                     }
  1164.                 } else {
  1165.                     $message "Account not found!";
  1166.                     $email_twig_data['success'] = false;
  1167.                 }
  1168.             } else if ($systemType == '_CENTRAL_') {
  1169.                 $userType UserConstants::USER_TYPE_APPLICANT;
  1170.                 $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  1171.                     array(
  1172.                         'applicantId' => $userId
  1173.                     )
  1174.                 );
  1175.                 if ($userObj) {
  1176.                     if ($userObj->getTriggerResetPassword() == 1) {
  1177.                         $encodedPassword $this->container->get('app.legacy_password_service')->hashWithSalt($password$userObj->getSalt());
  1178.                         $userObj->setPassword($encodedPassword);
  1179.                         $userObj->setTempPassword('');
  1180.                         $userObj->setTriggerResetPassword(0);
  1181.                         $em_goc->flush();
  1182.                         $email_twig_data['success'] = true;
  1183.                         $message "";
  1184.                         $userData = array(
  1185.                             'id' => $userObj->getApplicantId(),
  1186.                             'email' => $email_address,
  1187.                             'appId' => 0,
  1188.                             'image' => $userObj->getImage(),
  1189.                             'firstName' => $userObj->getFirstname(),
  1190.                             'lastName' => $userObj->getLastname(),
  1191.                             //                        'appId'=>$userObj->getUserAppId(),
  1192.                         );
  1193.                     } else {
  1194.                         $message "Action not allowed!";
  1195.                         $email_twig_data['success'] = false;
  1196.                     }
  1197.                 } else {
  1198.                     $message "Account not found!";
  1199.                     $email_twig_data['success'] = false;
  1200.                 }
  1201.             }
  1202.             if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
  1203.                 $response = new JsonResponse(array(
  1204.                         'templateData' => $twigData,
  1205.                         'message' => $message,
  1206.                         'actionData' => $email_twig_data,
  1207.                         'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  1208.                     )
  1209.                 );
  1210.                 $response->headers->set('Access-Control-Allow-Origin''*');
  1211.                 return $response;
  1212.             } else if ($email_twig_data['success'] == true) {
  1213.                 if ($systemType == '_ERP_'$twig_file '@Authentication/pages/views/reset_password_success_central.html.twig';
  1214.                 else if ($systemType == '_BUDDYBEE_'$twig_file '@Authentication/pages/views/reset_password_success_buddybee.html.twig';
  1215.                 else if ($systemType == '_CENTRAL_'$twig_file '@Authentication/pages/views/reset_password_success_central.html.twig';
  1216.                 $twigData = [
  1217.                     'page_title' => 'Reset Successful',
  1218.                     'encryptedData' => $encryptedData,
  1219.                     'message' => $message,
  1220.                     'userType' => $userType,
  1221.                     'errorField' => $errorField,
  1222.                 ];
  1223.                 return $this->render(
  1224.                     $twig_file,
  1225.                     $twigData
  1226.                 );
  1227.             }
  1228.         }
  1229.         if ($systemType == '_ERP_') {
  1230.             if ($userCategory == '_APPLICANT_') {
  1231.                 $userType $session->get(UserConstants::USER_TYPE);
  1232.                 $twig_file '@Application/pages/login/find_account_buddybee.html.twig';
  1233.                 $twigData = [
  1234.                     'page_title' => 'Find Account',
  1235.                     'encryptedData' => $encryptedData,
  1236.                     'message' => $message,
  1237.                     'userType' => $userType,
  1238.                     'errorField' => $errorField,
  1239.                 ];
  1240.             } else {
  1241.                 $userType $session->get(UserConstants::USER_TYPE);
  1242.                 $twig_file '@Application/pages/login/reset_password_erp.html.twig';
  1243.                 $twigData = [
  1244.                     'page_title' => 'Reset Password',
  1245.                     'encryptedData' => $encryptedData,
  1246.                     'message' => $message,
  1247.                     'userType' => $userType,
  1248.                     'errorField' => $errorField,
  1249.                 ];
  1250.             }
  1251.         } else if ($systemType == '_BUDDYBEE_') {
  1252.             $userType UserConstants::USER_TYPE_APPLICANT;
  1253.             $twig_file '@Authentication/pages/views/reset_new_password_buddybee.html.twig';
  1254.             $twigData = [
  1255.                 'page_title' => 'Reset Password',
  1256.                 'encryptedData' => $encryptedData,
  1257.                 'message' => $message,
  1258.                 'userType' => $userType,
  1259.                 'errorField' => $errorField,
  1260.             ];
  1261.         } else if ($systemType == '_CENTRAL_') {
  1262.             $userType UserConstants::USER_TYPE_APPLICANT;
  1263.             $twig_file '@Authentication/pages/views/reset_new_password_central.html.twig';
  1264.             $twigData = [
  1265.                 'page_title' => 'Reset Password',
  1266.                 'encryptedData' => $encryptedData,
  1267.                 'message' => $message,
  1268.                 'userType' => $userType,
  1269.                 'errorField' => $errorField,
  1270.             ];
  1271.         }
  1272.         if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
  1273.             if ($userId != && $userId != null) {
  1274.                 $response = new JsonResponse(array(
  1275.                         'templateData' => $twigData,
  1276.                         'message' => $message,
  1277.                         'actionData' => $email_twig_data,
  1278.                         'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  1279.                     )
  1280.                 );
  1281.             } else {
  1282.                 $response = new JsonResponse(array(
  1283.                         'templateData' => [],
  1284.                         'message' => 'Unauthorized',
  1285.                         'actionData' => [],
  1286.                         'success' => false,
  1287.                     )
  1288.                 );
  1289.             }
  1290.             $response->headers->set('Access-Control-Allow-Origin''*');
  1291.             return $response;
  1292.         } else {
  1293.             if ($userId != && $userId != null) {
  1294.                 return $this->render(
  1295.                     $twig_file,
  1296.                     $twigData
  1297.                 );
  1298.             } else
  1299.                 return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1300.                     'page_title' => '404 Not Found',
  1301.                 ));
  1302.         }
  1303.     }
  1304.     public function SalaryCertificateViewAction(Request $request$id)
  1305.     {
  1306.         if (!is_numeric($id)) {
  1307.             $idData json_decode($this->get('url_encryptor')->decrypt($id), true);
  1308.         } else {
  1309.             $idData = array(
  1310.                 'id' => $id,
  1311.                 'appId' => $request->get('appId'),
  1312.             );
  1313.         }
  1314.         $id $idData['id'];
  1315.         $printDate = isset($idData['dt']) ? new \DateTime($idData['dt']) : new \DateTime();
  1316.         $em $this->getDoctrine()->getManager('company_group');
  1317.         $em->getConnection()->connect();
  1318.         $connected $em->getConnection()->isConnected();
  1319.         if ($connected)
  1320.             $goc $this->getDoctrine()->getManager('company_group')
  1321.                 ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  1322.                 ->findOneBy(
  1323.                     array(
  1324.                         'appId' => $idData['appId']
  1325.                     )
  1326.                 );
  1327.         $connector $this->container->get('application_connector');
  1328.         $connector->resetConnection(
  1329.             'default',
  1330.             $goc->getDbName(),
  1331.             $goc->getDbUser(),
  1332.             $goc->getDbPass(),
  1333.             $goc->getDbHost(),
  1334.             $reset true);
  1335.         $em $this->getDoctrine()->getManager();
  1336.         $employee $em
  1337.             ->getRepository("ApplicationBundle\\Entity\\Employee")
  1338.             ->findOneBy(
  1339.                 array(
  1340.                     'employeeId' => $idData['id']
  1341.                 )
  1342.             );
  1343.         $employeeDetails $em
  1344.             ->getRepository("ApplicationBundle\\Entity\\EmployeeDetails")
  1345.             ->findOneBy(
  1346.                 array(
  1347.                     'id' => $idData['id']
  1348.                 )
  1349.             );
  1350.         $earningValues = [];
  1351. //        $deductionValues=[];
  1352. //        $facilityValues=[];
  1353.         for ($j 0$j 10$j++) {
  1354.             if ($employeeDetails->{'getEar' . ($j 1)}() != && $employeeDetails->{'getEar' . ($j 1)}() != null && $employeeDetails->{'getEar' . ($j 1)}() != '')
  1355.                 $earningValues[$j 1] = $employeeDetails->{'getEar' . ($j 1)}();
  1356.         }
  1357. //        for($j=0;$j<10;$j++){
  1358. //            if($employeeDetails->{'getFac'.($j+1)}()!=0 && $payslip->{'getFac'.($j+1)}()!=null && $payslip->{'getFac'.($j+1)}()!='')
  1359. //                $facilityValues[$j+1]=$payslip->{'getFac'.($j+1)}();
  1360. //
  1361. //        }
  1362. //        for($j=0;$j<10;$j++){
  1363. //            if($employeeDetails->{'getDed'.($j+1)}()!=0 && $payslip->{'getDed'.($j+1)}()!=null && $payslip->{'getDed'.($j+1)}()!='')
  1364. //                $deductionValues[$j+1]=$payslip->{'getDed'.($j+1)}();
  1365. //        }
  1366.         $dept $em
  1367.             ->getRepository("ApplicationBundle\\Entity\\SysDepartment")
  1368.             ->findOneBy(
  1369.                 array(
  1370.                     'departmentId' => $employeeDetails->getDept()
  1371.                 )
  1372.             );
  1373.         $desg $em
  1374.             ->getRepository("ApplicationBundle\\Entity\\SysDepartmentPosition")
  1375.             ->findOneBy(
  1376.                 array(
  1377.                     'positionId' => $employeeDetails->getDesg()
  1378.                 )
  1379.             );
  1380.         $authorizations = [
  1381.             [
  1382.                 'auth' => 1,
  1383.                 'auth_type' => 'Authorized By',
  1384.                 'name' => 'Arif Hossain',
  1385.                 'designation' => 'Accounts Manager',
  1386.                 'signature' => 'iVBORw0KGgoAAAANSUhEUgAAAMgAAAB7CAIAAAC+ZFgSAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nH29WbBmx5Eelpl1/rv2gu5GL1gbaBIbCZAESXADKXC4D7exSIVnJIdHkj0h2SG/+MHhBzn84rDDfnA47AeHHAqHLY8UIyskjTQLbdLGDIccLhgCJIh9R6MbDaD3Rnff7nvv/59MP2RV1ld1LnwC0fjv/59TlZX55VrL4T//wZ8QERGZmf8rIsxsZsw8juN8VGYmIv/XzPwn/xMfVFUzmw1JmM1Mic2MiYTFbxdhM1uMSsxkREzjOBKRiHj7qhpdmxkTMxEzMxsRscjW9hzvdwKYOTH5I0SkqnFDtElwmdmooxER0Tjm8fqDzJSSpJRMVcdMjIiISAycdrrGcTRjEXEmiYiqqfpA1Aee71Q1Ym9wsVgMw+AEe0dO35DEzCQN88UCuS0pkZkwk2VB+CPGpKo45PqTmX8/jqOI+E/+5zAMIkyUbzBzgoWZ41kmmw3DOI5GPBY6/Uop5XvK/YvFIrqTYJbzN9BTelInxcwcBNhrx2j/SdXiT2bmcrO3Q0TsICALGAU0XboIAacoeFGbLVh3qWOPARQkbKoJKaXue+daviEPgqJxlByCOHpBNLf95s/lnvrtMAxBfyAvGFIAqlUiWgUSNwcrsGtsMG7zh/1PhwUiI6WUkjCbS74bKTEFpJg5UDVljvM/A5CY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Z71RRgtl1sDEzLjPpwvjVCOA8InxoMa0zjgmLARpAp1C/Uy/uU2VMfhB+9SObDVICkxiGqxwQ6a3Q3xE7XRRU0Vqs3ut40gFq31jH7Fy06qdNs0hXBbX9sml1JthxjkCQ4t0Ny1BoxtysI7lCI7YeTBwJsKQwJ5lwK3JxwVZ+vTyQJ0U6srjQFoBYMCQ2FUQLiBL72klNoSVG4nlnpEP53lRzcdAkbuW/v41BppuaJ9PLsrRIgoIdC0Tk5IGEp6R2AFGzs9r9qV97X3fhMfkbIuAw/YQVIh9yL8voqC/OiHvIbNG///ABGzUQqrQUb/AAAAAElFTkSuQmCC'
  1387.             ],
  1388.             [
  1389.                 'auth' => 1,
  1390.                 'auth_type' => 'Verified By',
  1391.                 'name' => 'Emrul Hasan',
  1392.                 'designation' => 'Managing Director',
  1393.                 'signature' => 'iVBORw0KGgoAAAANSUhEUgAAAMgAAAAxCAIAAAAQp3EYAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nGW9eZhd1XUnuoZ9zr01qqo0oREJBIhRYMDMQzAYDBjj2Q527Dh2nMRxkk5i56Wf87q/5Hvd/b186ffyknTbbg+J7dhx7HiKx2AMGMwoQAKEEJqlKqlKNY/33nP2Wuv9sfY5Vc67f/CVLvfec/bea/yt31oHF+ZLADAzRDRTAGRmETEzZmZGUVM1ZirLkjkgIiLEKACAiESECIioaqoRCbMsiJgpqAoxIpKpAfj3QEQAgJnUQFX9R8wMwFQNEZkJABFAVZkJEVXVv4wI/pnqK4gIqmAmzCSiSGgAKmAGgf3/GgASQYyqqkhERABmBgCACCIKAFlgM4tRQmAR9d0Q1SzLfFsQIEZhpigaAqsqAGaB/SbNTERVjYjVFBGJEADAQFV8i8yMiESEKPgN+Cr8k2ZpK/wsiFDVEMEMzCBGgbRkYGYAYCJVRQQi8t1DBFUkwijqP2JmhOhfMTO/E1+vf6s6O4hRAQgJAYwIAAEBJIoZAKCZIREz+Q6AATOK1LdnIVCMqmbMpGqEQAQ4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NZ4xFAvHJIgblxcjPpc+SR0LnK/pxEB18gzfO0OihxrY6xREp8B6vm/deCFaWslRARS58kjWamPtvSVSgwa7pVSFsHSEjenVszVOufcq2BiuEIUF8dEtoOsPL5BFV44EGh+EOXNI0qriDPFHBztUyf91txAAn/P8vdy+z0pwkWAAAAAElFTkSuQmCC'
  1394.             ],
  1395.             [
  1396.                 'auth' => 1,
  1397.                 'auth_type' => 'Approved By',
  1398.                 'name' => 'Khandoker Mozibul Yasser',
  1399.                 'designation' => 'Chairman',
  1400.                 'signature' => 'iVBORw0KGgoAAAANSUhEUgAAAMgAAABSCAIAAACexwzsAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nH19d5gexZF+Vfd8u6tVRjkL5YDISCIIkY8cbLANh7E5Ew34jDM+Y/vOvsc2vuCEf4azOXw4gA0miSSihHIWQglEEMo5a7X7TVf9/qiZmpqexQOPntn5Zrqrq956u7q6pwcXLH4LAJxziMjMiBhCAABElCtyDgByIlfkTuccMxOR3mDv13O5Qf51zunjesLMUpQtP0kSPZcTFUCetSUQERFJOUmSWJEAARGYABAAWEvg/HDORbXrCQAQkchsBdBf5UFtu1RKRFEhIqG2XdUrN2cigdMHrc61LZkOHSBgmgapul0BIl1F8shTZeUwswqJ6DJjqZBavgNgypvJDMAAEMpiZAa1jylKrArUACo6Inrv9SeVkpkz6+V1RHoR1FYVYW1ghbNajoBoH4lkU1NlPzEDg73ZwqJWqzmXWdQCDozzWKmiE73ZXlGftF5UyA9oa8kaCNn91pbSFitVXnLJ7RU31p/1fvlTJJEbyr7NkD8MAM4h55qxFtHSCAAcBmACEFhRRavM7BATywFqEsso1dKrvmgQAPJLZGxrS+sEemeEG6uvyMZy3T4oYnvv0zS1TJBrsKioXDNEJVteUajZtluQ6W22pVXEK9YzdQEyg0MkJttShYs+VTCZeTwTkoOtC6utKvOi+LMQc1YsECIwFJpEAHQIgNCeq4BxdZIbEBgYjKFLdxJnwBQisfQQ2RsKjJfQFt3friWqbq0P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GI+iNMsnGWmKqoiIvw7utCLNjGjKtBzLUQrkqlcZkAHzssJQh5U6VwEMwuwx48bfdutX3jgwd+l9VSqfnvFyllzF5x52iSVdt/efd+594fvrXsvUAAAZDj//HMmTTwpUGAGZurQ3KGWJBs3bE7rKeTzKu+/u+7D996f8fqMWkMDhcAgq4QpS40RIQLn7xUlSS2EMGLEcNkTQJtpdRg11h4R07drUHV+KMcJqvB2OwH4GFqxqJCmlQZiWqim7FSbFlIun/S1RduQS1gqarkiSf+NiDTyJ/01Gkaoi1jVWMiqGXR4xaTvETgipkAhEFMxFLK9/6euvvIbX/syZKk7z4j33fezBUuWt9TbDrQcefHlN7705W+tXbtOsOh9bcLxx9x5202tLS259jI516xZqyahECBPZ9Rb20IIFEJI07KKEACYyDkMIRx11FFTp5zGMrIom9DayOpErWNvs4ATzjt46PDmLdsPHmoJaarNx/yIBt1ReqiK46i3lfsTmx60WI5mAKDsNBazylUaZVvEcPnVaqgckZdET9k/tTptgy2cTdjkzEIaV5ocBSZO0/qc+Yt3794zdOigCePGEqXeF7styKzFRReed7jlyM9/fj8gILpDhw5/85v39uzZc9/efa1HWnNdo3OuR+8e9377a52aO2zdsUPGA4jQoUNToLBy5WrizPYOEYgZIWmo1et1UYTsEWdp+OjhI7Zu25bWU++TL/3zHc3NzS5fD6MKZDMi40oqoape+2BbW9uzz770298+fODgoU6dO44dO+r0008/7tjxgwb2974Um1p3rbpulQvtDUyUVDlQh6DRM1FXZSXWP62N9SfRXa1WU/7TIMx6hj4YQVDTs1U1RZi2I1BmRuf0JXrnnDQlUHjjzbk//PefpPU6EZ111pnf+PqXu3bpRERJkohgtVqtXq9fecXF+/bte/jhPwIHYCai7du2Sa1yM4Dr2r3rD//1O716HOUcbtq0KYvdmDs0d9y6Y8eyZSsw78gYgCgktVpbW5sk8PXVZJDGIp4+9Yx77/k6Me/Zu697166NjTXZoCnyZzadhtUhGPayozGrsSXLVvziVw+kaRsCH9i3d9GCxQvmLfTen3veObfc8vkeR3W39r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HoZPPLhAjgH4Dx6nQeR5Zis7UJ58gYCjqckgSOMpboN4BCd1msxlO9ZstswAOhPmiCfmKhPPO+2zXUPkkBEgniPLlc5JVSYioMbLqEwGYSZZaUAgIgA7z5ZvFawoAAJm2wec9tUhI9r1LZpSyhLARWVZ2C6CZAVg3T8w/5CkiZb+CJDiJ87QUOOeAmYj+PwqkrWeCYJzmAAAAAElFTkSuQmCC'
  1401.             ]
  1402.         ];
  1403.         //        $company_data = Company::getCompanyData($em, $this->getLoggedUserCompanyId($request));
  1404.         $company_data Company::getCompanyData($em1);
  1405.         $document_mark = array(
  1406.             'original' => '/images/Original-Stamp-PNG-Picture.png',
  1407.             'copy' => ''
  1408.         );
  1409.         if ($request->query->has('pdf') && $this->get('knp_snappy.pdf')) {
  1410.             $html $this->renderView(
  1411.                 '@Application/pages/human_resource/print/salary_certificate.html.twig',
  1412.                 array(
  1413.                     //full array here
  1414.                     'pdf' => true,
  1415.                     'page_title' => 'Salary Certificate',
  1416.                     'employee' => $employee,
  1417.                     'printDate' => $printDate,
  1418.                     'desg' => $desg,
  1419.                     'employeeDetails' => $employeeDetails,
  1420.                     'earningValues' => $earningValues,
  1421.                     'authorizations' => $authorizations,
  1422.                     'appId' => $idData['appId'],
  1423.                     'export' => 'pdf,print',
  1424.                     'document_mark_image' => $document_mark['original'],
  1425.                     'company_name' => $company_data->getName(),
  1426.                     'company_data' => $company_data,
  1427.                     'company_address' => $company_data->getAddress(),
  1428.                     'company_image' => $company_data->getImage(),
  1429.                     'invoice_footer' => $company_data->getInvoiceFooter(),
  1430.                     'page_header' => 'New Product',
  1431.                     'document_type' => 'Sales Bill',
  1432.                     'page_header_sub' => 'Add',
  1433.                     //                'type_list'=>$type_list,
  1434.                     //                'mis_data'=>$mis_data,
  1435.                     //                'mis_print'=>$mis_print,
  1436.                     'item_data' => [],
  1437.                     'received' => 2,
  1438.                     'return' => 1,
  1439.                     'total_w_vat' => 1,
  1440.                     'total_vat' => 1,
  1441.                     'total_wo_vat' => 1,
  1442.                     'invoice_id' => 'abcd1234',
  1443.                     'created_by' => 'created by',
  1444.                     'created_at' => '',
  1445.                     'red' => 0,
  1446.                 )
  1447.             );
  1448.             $pdf_response $this->get('knp_snappy.pdf')->getOutputFromHtml($html, array(
  1449.                 //                'orientation' => 'landscape',
  1450.                 //                'enable-javascript' => true,
  1451.                 //                'javascript-delay' => 1000,
  1452.                 'no-stop-slow-scripts' => false,
  1453.                 'no-background' => false,
  1454.                 'lowquality' => false,
  1455.                 'encoding' => 'utf-8',
  1456.                 //            'images' => true,
  1457.                 //            'cookie' => array(),
  1458.                 'dpi' => 300,
  1459.                 'image-dpi' => 300,
  1460.                 //                'enable-external-links' => true,
  1461.                 //                'enable-internal-links' => true
  1462.             ));
  1463.             return new Response(
  1464.                 $pdf_response,
  1465.                 200,
  1466.                 array(
  1467.                     'Content-Type' => 'application/pdf',
  1468.                     'Content-Disposition' => 'attachment; filename="salary_certificate_' $id '.pdf"'
  1469.                 )
  1470.             );
  1471.         }
  1472.         return $this->render(
  1473.             '@Application/pages/human_resource/print/salary_certificate.html.twig',
  1474.             array(
  1475.                 'page_title' => 'Salary Certificate ',
  1476.                 'employee' => $employee,
  1477.                 'printDate' => $printDate,
  1478.                 'employeeDetails' => $employeeDetails,
  1479.                 'earningValues' => $earningValues,
  1480.                 'desg' => $desg,
  1481.                 'authorizations' => $authorizations,
  1482.                 'appId' => $idData['appId'],
  1483.                 'export' => 'none',
  1484.                 'document_mark_image' => $document_mark['original'],
  1485.                 'company_name' => $company_data->getName(),
  1486.                 'company_data' => $company_data,
  1487.                 'company_address' => $company_data->getAddress(),
  1488.                 'company_image' => $company_data->getImage(),
  1489.                 'invoice_footer' => $company_data->getInvoiceFooter(),
  1490.                 'page_header' => 'New Product',
  1491.                 'document_type' => 'Sales Bill',
  1492.                 'page_header_sub' => 'Add',
  1493.                 //                'type_list'=>$type_list,
  1494.                 //                'mis_data'=>$mis_data,
  1495.                 //                'mis_print'=>$mis_print,
  1496.                 'item_data' => [],
  1497.                 'received' => 2,
  1498.                 'return' => 1,
  1499.                 'total_w_vat' => 1,
  1500.                 'total_vat' => 1,
  1501.                 'total_wo_vat' => 1,
  1502.                 'invoice_id' => 'abcd1234',
  1503.                 'created_by' => 'created by',
  1504.                 'created_at' => '',
  1505.                 'red' => 0,
  1506.             )
  1507.         );
  1508.     }
  1509.     public function PaymentVoucherPublicViewAction(Request $request$id)
  1510.     {
  1511.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1512.         try {
  1513.             $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1514.         } catch (\Exception $e) {
  1515.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1516.                 'page_title' => '404 Not Found',
  1517.             ));
  1518.         }
  1519.         $voucherId = isset($idData['id']) ? $idData['id'] : 0;
  1520.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1521.         if (!$voucherId || !$appId) {
  1522.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1523.                 'page_title' => '404 Not Found',
  1524.             ));
  1525.         }
  1526.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1527.         if (!$em || !$goc) {
  1528.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1529.                 'page_title' => '404 Not Found',
  1530.             ));
  1531.         }
  1532.         $data Accounts::GetVoucherDetails($em$voucherId);
  1533.         if (empty($data) || (int)$data['type_id'] !== 5) {
  1534.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1535.                 'page_title' => '404 Not Found',
  1536.             ));
  1537.         }
  1538.         $companyId $data['general_data']->getCompanyId() ? $data['general_data']->getCompanyId() : 1;
  1539.         $companyData Company::getCompanyData($em$companyId);
  1540.         return $this->render('@Accounts/pages/print/public_payment_voucher_view.html.twig', array(
  1541.             'page_title' => 'Payment Voucher ' $data['doc_hash'],
  1542.             'data' => $data,
  1543.             'company_data' => $companyData,
  1544.             'company_name' => $companyData $companyData->getName() : '',
  1545.             'company_address' => $companyData $companyData->getAddress() : '',
  1546.             'company_image' => $companyData $companyData->getImage() : '',
  1547.             'invoice_footer' => $companyData $companyData->getInvoiceFooter() : '',
  1548.             'public_id' => $id,
  1549.             'appId' => $appId,
  1550.             'is_logged_in' => $request->getSession()->get(UserConstants::USER_LOGIN_ID) ? 0,
  1551.         ));
  1552.     }
  1553.     public function PaymentVoucherPublicSignAction(Request $request$id)
  1554.     {
  1555.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1556.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1557.         $voucherId = isset($idData['id']) ? $idData['id'] : 0;
  1558.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1559.         if (!$voucherId || !$appId) {
  1560.             $this->addFlash('error''Public voucher link is invalid.');
  1561.             return $this->redirectToRoute('public_payment_voucher_view', array('id' => $id));
  1562.         }
  1563.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1564.         if (!$em || !$goc) {
  1565.             $this->addFlash('error''Company context could not be resolved for this public link.');
  1566.             return $this->redirectToRoute('public_payment_voucher_view', array('id' => $id));
  1567.         }
  1568.         $voucher $em->getRepository('ApplicationBundle\\Entity\\AccTransactions')->findOneBy(array(
  1569.             'transactionId' => $voucherId
  1570.         ));
  1571.         if (!$voucher || (int)$voucher->getDocumentType() !== 5) {
  1572.             $this->addFlash('error''Payment voucher was not found.');
  1573.             return $this->redirectToRoute('public_payment_voucher_view', array('id' => $id));
  1574.         }
  1575.         $signatureBase64 $acknowledgementService->resolveReceiverSignatureBase64($request$em);
  1576.         if ($signatureBase64 === '') {
  1577.             $this->addFlash('error''A valid signature or authenticated approval hash is required.');
  1578.             return $this->redirectToRoute('public_payment_voucher_view', array('id' => $id));
  1579.         }
  1580.         $acknowledgementService->persistAcknowledgement($em$voucher$signatureBase64);
  1581.         $this->addFlash('success''Receiver signature saved successfully.');
  1582.         return $this->redirect($this->generateUrl('public_payment_voucher_view', array('id' => $id)) . '#receiver-signature');
  1583.     }
  1584.     // ── Public proposal view + accept/sign (unauthenticated client link) ───────
  1585.     public function ProposalPublicViewAction(Request $request$id)
  1586.     {
  1587.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1588.         try {
  1589.             $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1590.         } catch (\Exception $e) {
  1591.             return $this->render('@Buddybee/pages/404NotFound.html.twig', ['page_title' => '404 Not Found']);
  1592.         }
  1593.         $proposalId = isset($idData['id']) ? $idData['id'] : 0;
  1594.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1595.         if (!$proposalId || !$appId) {
  1596.             return $this->render('@Buddybee/pages/404NotFound.html.twig', ['page_title' => '404 Not Found']);
  1597.         }
  1598.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1599.         if (!$em || !$goc) {
  1600.             return $this->render('@Buddybee/pages/404NotFound.html.twig', ['page_title' => '404 Not Found']);
  1601.         }
  1602.         $proposal $em->getRepository('ApplicationBundle\\Entity\\SalesProposal')->findOneBy(['salesProposalId' => $proposalId]);
  1603.         if (!$proposal || (int) $proposal->getDeleteFlag() === 1) {
  1604.             return $this->render('@Buddybee/pages/404NotFound.html.twig', ['page_title' => '404 Not Found']);
  1605.         }
  1606.         $companyId $proposal->getCompanyId() ?: 1;
  1607.         $companyData Company::getCompanyData($em$companyId);
  1608.         $pdata json_decode((string) $proposal->getData(), true);
  1609.         $acceptance is_array($pdata) && isset($pdata['acceptance']) ? $pdata['acceptance'] : null;
  1610.         return $this->render('@Sales/pages/print/public_proposal_view.html.twig', [
  1611.             'page_title'    => 'Proposal ' $proposal->getDocumentHash(),
  1612.             'proposal'      => $proposal,
  1613.             'acceptance'    => $acceptance,
  1614.             'company_name'  => $companyData $companyData->getName() : '',
  1615.             'company_image' => $companyData $companyData->getImage() : '',
  1616.             'public_id'     => $id,
  1617.             'appId'         => $appId,
  1618.         ]);
  1619.     }
  1620.     public function ProposalPublicSignAction(Request $request$id)
  1621.     {
  1622.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1623.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1624.         $proposalId = isset($idData['id']) ? $idData['id'] : 0;
  1625.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1626.         if (!$proposalId || !$appId) {
  1627.             $this->addFlash('error''Public proposal link is invalid.');
  1628.             return $this->redirectToRoute('public_proposal_view', ['id' => $id]);
  1629.         }
  1630.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1631.         if (!$em || !$goc) {
  1632.             $this->addFlash('error''Company context could not be resolved.');
  1633.             return $this->redirectToRoute('public_proposal_view', ['id' => $id]);
  1634.         }
  1635.         $proposal $em->getRepository('ApplicationBundle\\Entity\\SalesProposal')->findOneBy(['salesProposalId' => $proposalId]);
  1636.         if (!$proposal || (int) $proposal->getDeleteFlag() === 1) {
  1637.             $this->addFlash('error''Proposal not found.');
  1638.             return $this->redirectToRoute('public_proposal_view', ['id' => $id]);
  1639.         }
  1640.         if ((int) $proposal->getAccepted() === 1) {
  1641.             $this->addFlash('success''This proposal was already accepted.');
  1642.             return $this->redirectToRoute('public_proposal_view', ['id' => $id]);
  1643.         }
  1644.         $acceptName trim((string) $request->request->get('accept_name'''));
  1645.         if ($acceptName === '') {
  1646.             $this->addFlash('error''Please type your name to accept.');
  1647.             return $this->redirectToRoute('public_proposal_view', ['id' => $id]);
  1648.         }
  1649.         $signatureBase64 $acknowledgementService->resolveReceiverSignatureBase64($request$em);
  1650.         $signatureId 0;
  1651.         if ($signatureBase64 !== '' && strlen($signatureBase64) < 2000000) {
  1652.             try {
  1653.                 $sig = new \ApplicationBundle\Entity\Signature();
  1654.                 $sig->setData($signatureBase64);
  1655.                 $em->persist($sig);
  1656.                 $em->flush();
  1657.                 $signatureId = (int) $sig->getId();
  1658.             } catch (\Throwable $e) { $signatureId 0; }
  1659.         }
  1660.         $data json_decode((string) $proposal->getData(), true) ?: [];
  1661.         $data['acceptance'] = [
  1662.             'accepted_at'   => date('Y-m-d H:i:s'),
  1663.             'accepted_name' => $acceptName,
  1664.             'signature_id'  => $signatureId,
  1665.             'ip'            => $request->getClientIp(),
  1666.             'via'           => 'public_link',
  1667.         ];
  1668.         $proposal->setAccepted(1);
  1669.         $proposal->setData(json_encode($data));
  1670.         $em->flush();
  1671.         $this->addFlash('success''Thank you — proposal accepted and signed.');
  1672.         return $this->redirect($this->generateUrl('public_proposal_view', ['id' => $id]) . '#accepted');
  1673.     }
  1674.     public function DeliveryReceiptPublicViewAction(Request $request$id)
  1675.     {
  1676.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1677.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1678.         $deliveryReceiptId = isset($idData['id']) ? $idData['id'] : 0;
  1679.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1680.         if (!$deliveryReceiptId || !$appId) {
  1681.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1682.                 'page_title' => '404 Not Found',
  1683.             ));
  1684.         }
  1685.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1686.         if (!$em || !$goc) {
  1687.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1688.                 'page_title' => '404 Not Found',
  1689.             ));
  1690.         }
  1691.         $data SalesOrderM::GetDeliveryReceiptDetails($em$deliveryReceiptId);
  1692.         if (empty($data) || empty($data['rel_data'])) {
  1693.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1694.                 'page_title' => '404 Not Found',
  1695.             ));
  1696.         }
  1697.         $companyId $data['rel_data']->getCompanyId() ? $data['rel_data']->getCompanyId() : 1;
  1698.         $companyData Company::getCompanyData($em$companyId);
  1699.         return $this->render('@Sales/pages/print/public_delivery_receipt_view.html.twig', array(
  1700.             'page_title' => 'Delivery Receipt ' $data['doc_hash'],
  1701.             'data' => $data,
  1702.             'company_data' => $companyData,
  1703.             'company_name' => $companyData $companyData->getName() : '',
  1704.             'company_address' => $companyData $companyData->getAddress() : '',
  1705.             'company_image' => $companyData $companyData->getImage() : '',
  1706.             'invoice_footer' => $companyData $companyData->getInvoiceFooter() : '',
  1707.             'public_id' => $id,
  1708.             'appId' => $appId,
  1709.             'is_logged_in' => $request->getSession()->get(UserConstants::USER_LOGIN_ID) ? 0,
  1710.         ));
  1711.     }
  1712.     public function DeliveryReceiptPublicSignAction(Request $request$id)
  1713.     {
  1714.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1715.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1716.         $deliveryReceiptId = isset($idData['id']) ? $idData['id'] : 0;
  1717.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1718.         if (!$deliveryReceiptId || !$appId) {
  1719.             $this->addFlash('error''Public delivery receipt link is invalid.');
  1720.             return $this->redirectToRoute('public_delivery_receipt_view', array('id' => $id));
  1721.         }
  1722.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1723.         if (!$em || !$goc) {
  1724.             $this->addFlash('error''Company context could not be resolved for this public link.');
  1725.             return $this->redirectToRoute('public_delivery_receipt_view', array('id' => $id));
  1726.         }
  1727.         $deliveryReceipt $em->getRepository('ApplicationBundle\\Entity\\DeliveryReceipt')->findOneBy(array(
  1728.             'deliveryReceiptId' => $deliveryReceiptId
  1729.         ));
  1730.         if (!$deliveryReceipt) {
  1731.             $this->addFlash('error''Delivery receipt was not found.');
  1732.             return $this->redirectToRoute('public_delivery_receipt_view', array('id' => $id));
  1733.         }
  1734.         $signatureBase64 $acknowledgementService->resolveReceiverSignatureBase64($request$em);
  1735.         if ($signatureBase64 === '') {
  1736.             $this->addFlash('error''A valid signature or authenticated approval hash is required.');
  1737.             return $this->redirectToRoute('public_delivery_receipt_view', array('id' => $id));
  1738.         }
  1739.         $acknowledgementService->persistAcknowledgement($em$deliveryReceipt$signatureBase64);
  1740.         $this->addFlash('success''Receiver signature saved successfully.');
  1741.         return $this->redirect($this->generateUrl('public_delivery_receipt_view', array('id' => $id)) . '#receiver-signature');
  1742.     }
  1743.     public function StockTransferPublicViewAction(Request $request$id)
  1744.     {
  1745.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1746.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1747.         $stockTransferId = isset($idData['id']) ? $idData['id'] : 0;
  1748.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1749.         if (!$stockTransferId || !$appId) {
  1750.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1751.                 'page_title' => '404 Not Found',
  1752.             ));
  1753.         }
  1754.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1755.         if (!$em || !$goc) {
  1756.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1757.                 'page_title' => '404 Not Found',
  1758.             ));
  1759.         }
  1760.         $data Inventory::GetStockTransferDetails($em$stockTransferId);
  1761.         if (empty($data) || empty($data['general_data'])) {
  1762.             return $this->render('@Buddybee/pages/404NotFound.html.twig', array(
  1763.                 'page_title' => '404 Not Found',
  1764.             ));
  1765.         }
  1766.         $companyId $data['general_data']->getCompanyId() ? $data['general_data']->getCompanyId() : 1;
  1767.         $companyData Company::getCompanyData($em$companyId);
  1768.         return $this->render('@Inventory/pages/print/public_stock_transfer_view.html.twig', array(
  1769.             'page_title' => 'Stock Transfer ' $data['general_data']->getDocumentHash(),
  1770.             'data' => $data,
  1771.             'company_data' => $companyData,
  1772.             'company_name' => $companyData $companyData->getName() : '',
  1773.             'company_address' => $companyData $companyData->getAddress() : '',
  1774.             'company_image' => $companyData $companyData->getImage() : '',
  1775.             'invoice_footer' => $companyData $companyData->getInvoiceFooter() : '',
  1776.             'public_id' => $id,
  1777.             'appId' => $appId,
  1778.             'is_logged_in' => $request->getSession()->get(UserConstants::USER_LOGIN_ID) ? 0,
  1779.         ));
  1780.     }
  1781.     public function StockTransferPublicSignAction(Request $request$id)
  1782.     {
  1783.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1784.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1785.         $stockTransferId = isset($idData['id']) ? $idData['id'] : 0;
  1786.         $appId = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1787.         if (!$stockTransferId || !$appId) {
  1788.             $this->addFlash('error''Public stock transfer link is invalid.');
  1789.             return $this->redirectToRoute('public_stock_transfer_view', array('id' => $id));
  1790.         }
  1791.         list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1792.         if (!$em || !$goc) {
  1793.             $this->addFlash('error''Company context could not be resolved for this public link.');
  1794.             return $this->redirectToRoute('public_stock_transfer_view', array('id' => $id));
  1795.         }
  1796.         $stockTransfer $em->getRepository('ApplicationBundle\\Entity\\StockTransfer')->findOneBy(array(
  1797.             'stockTransferId' => $stockTransferId
  1798.         ));
  1799.         if (!$stockTransfer) {
  1800.             $this->addFlash('error''Stock transfer note was not found.');
  1801.             return $this->redirectToRoute('public_stock_transfer_view', array('id' => $id));
  1802.         }
  1803.         $signatureBase64 $acknowledgementService->resolveReceiverSignatureBase64($request$em);
  1804.         if ($signatureBase64 === '') {
  1805.             $this->addFlash('error''A valid signature or authenticated approval hash is required.');
  1806.             return $this->redirectToRoute('public_stock_transfer_view', array('id' => $id));
  1807.         }
  1808.         $acknowledgementService->persistAcknowledgement($em$stockTransfer$signatureBase64);
  1809.         $this->addFlash('success''Receiver signature saved successfully.');
  1810.         return $this->redirect($this->generateUrl('public_stock_transfer_view', array('id' => $id)) . '#receiver-signature');
  1811.     }
  1812.     /**
  1813.      * S8 — Customer-facing public project progress view.
  1814.      * Public route — no SessionCheckInterface here. Encrypted URL payload carries
  1815.      * { id, appId, t (token), dt }; appId is used to switch DB connection per tenant.
  1816.      */
  1817.     public function PublicProjectViewAction(Request $request$id)
  1818.     {
  1819.         $acknowledgementService $this->get('app.public_document_acknowledgement_service');
  1820.         $idData $acknowledgementService->decodePublicDocumentPayload($request$id);
  1821.         $shareId = isset($idData['id']) ? (int)$idData['id'] : 0;
  1822.         $appId   = isset($idData['appId']) ? $idData['appId'] : $request->get('appId');
  1823.         $token   = isset($idData['t']) ? $idData['t'] : '';
  1824.         if (!$shareId || !$appId) {
  1825.             return $this->renderPublicProjectUnavailable('Project link not found''This public project link is incomplete or invalid. Please check the URL or request a new link.'404);
  1826.         }
  1827.         try {
  1828.             list($em$goc) = $acknowledgementService->getPublicDocumentEntityManager($appId);
  1829.         } catch (\Exception $e) {
  1830.             return $this->renderPublicProjectUnavailable('No permission''We could not verify access for this project link. Please request a fresh authorized link.'403);
  1831.         }
  1832.         if (!$em || !$goc) {
  1833.             return $this->renderPublicProjectUnavailable('No permission''We could not verify access for this project link. Please request a fresh authorized link.'403);
  1834.         }
  1835.         // Look up share by ID (encryption protects the URL).
  1836.         try {
  1837.             $share $em->getRepository('ApplicationBundle\\Entity\\ProjectPublicShare')->findOneBy(array(
  1838.                 'projectPublicShareId' => $shareId,
  1839.             ));
  1840.         } catch (\Exception $e) {
  1841.             return $this->renderPublicProjectUnavailable('Project link not found''This project share could not be located. Please request a new link from the project team.'404);
  1842.         }
  1843.         if (!$share || $share->getDeleteFlag() == || !$share->getIsActive()) {
  1844.             return $this->renderPublicProjectUnavailable('Share link unavailable''This project link is no longer active or you do not have permission to view it.'403);
  1845.         }
  1846.         // Token check — regenerating the share invalidates old encrypted URLs.
  1847.         if ($token && $share->getShareToken() && $token !== $share->getShareToken()) {
  1848.             return $this->renderPublicProjectUnavailable('Share link has changed''This link was regenerated and is no longer valid. Please use the latest project link.'403);
  1849.         }
  1850.         // Expiry check.
  1851.         if ($share->getExpiryDate() && $share->getExpiryDate() < new \DateTime()) {
  1852.             return $this->renderPublicProjectUnavailable('Share link expired''This public project link has expired. Please request a new link from the project team.'410);
  1853.         }
  1854.         $clientIp $request->getClientIp();
  1855.         try {
  1856.             $data = \ApplicationBundle\Modules\Project\ProjectM::GetPublicProjectViewDataByShare($em$share$clientIp);
  1857.         } catch (\Exception $e) {
  1858.             return $this->renderPublicProjectUnavailable('Project unavailable''The project record could not be loaded right now. Please try again later or request a fresh link.'404);
  1859.         }
  1860.         if (!$data) {
  1861.             return $this->renderPublicProjectUnavailable('Project not found''The project record linked to this share is not available.'404);
  1862.         }
  1863.         return $this->render('@Project/pages/public/public_project_view.html.twig', array(
  1864.             'page_title' => $data['shareTitle'],
  1865.             'data'       => $data,
  1866.         ));
  1867.     }
  1868.     private function renderPublicProjectUnavailable($title$message$statusCode 404)
  1869.     {
  1870.         return $this->render('@Project/pages/public/public_project_unavailable.html.twig', array(
  1871.             'page_title' => $title,
  1872.             'title' => $title,
  1873.             'message' => $message,
  1874.             'statusCode' => $statusCode,
  1875.         ), new Response(''$statusCode));
  1876.     }
  1877.     public function sendSmsSocketAction(Request $request$id 0)
  1878.     {
  1879.         $msg $request->request->get('message'$request->query->get('message'''));
  1880.         $phoneNumber $request->request->get('phoneNumber'$request->query->get('phoneNumber'''));
  1881.         $emitMarker $request->request->get('emitMarker'$request->query->get('emitMarker''_SEND_TEXT_TO_MOBILE_'));
  1882.         $sendType $request->request->get('sendType'$request->query->get('sendType''all'));
  1883.         $socketUserIds $request->request->get('socketUserIds'$request->query->get('socketUserIds', []));
  1884.         if ($msg != '' && $phoneNumber != '') {
  1885.             $searchVal = [];
  1886.             $replaceVal = [];
  1887.             $msg str_replace($searchVal$replaceVal$msg);
  1888.             System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg$phoneNumber$emitMarker$sendType$socketUserIds$deviceId "_DEFAULT_");
  1889. //            return 0;
  1890.         }
  1891.         if ($request->request->get('returnJson'$request->query->get('returnJson'0)) == 1) {
  1892.             return new JsonResponse(array(
  1893.                 'success' => true,
  1894.                 'message' => $msg,
  1895.                 'phoneNumber' => $phoneNumber,
  1896.                 'sendType' => $sendType,
  1897.                 'emitMarker' => $emitMarker,
  1898. //                        'documentHash' => $order->getDocumentHash(),
  1899. //                'documentId' => $receiptId,
  1900. //                'documentIdPadded' => str_pad($receiptId, 8, '0', STR_PAD_LEFT),
  1901. //
  1902. //                'viewUrl' => $url . "/" . $receiptId,
  1903.             ));
  1904.         } else return $this->render('@Buddybee/pages/send_text_by_socket.html.twig', array(
  1905.             'page_title' => 'Send Text',
  1906.             'message' => $msg,
  1907.             'phoneNumber' => $phoneNumber,
  1908.             'sendType' => $sendType,
  1909.             'emitMarker' => $emitMarker,
  1910.         ));
  1911.     }
  1912.     public function sendPushNotificationSocketAction(Request $request$id 0)
  1913.     {
  1914.         $tokens explode(','$request->query->get('tokens'''));
  1915.         $options $request->request->get('options', [
  1916.             'em' => null,
  1917.             'isBuddybee' => 1,
  1918.             'targetRoute' => 'consultancy_session',
  1919.             'targetUrl' => 'consultancy_session',
  1920.             'targetPath' => 'consultancy_session',
  1921.             'targetId' => 0,
  1922.             'meetingId' => 0,
  1923.             'userId' => 0,
  1924.             'applicantId' => 0,
  1925.             'taggedUserIds' => [],
  1926.             'type' => 0,
  1927.             'expireTs' => 0,
  1928.             'userIdPrefixForSocket' => 'BBEE_',
  1929.             'emitMarker' => '_SOCKET_NOTIFICATION_HERE_',
  1930.             'dataObj' => array(
  1931.                 'isBuddybee' => 1,
  1932.                 'targetRoute' => 'consultancy_session',
  1933.                 'targetUrl' => 'consultancy_session',
  1934.                 'targetPath' => 'consultancy_session',
  1935.                 'targetMobileAppPath' =>
  1936.                     isset(GeneralConstant::$MOBILE_APP_PATH_BY_ROUTING['consultancy_session']) ? GeneralConstant::$MOBILE_APP_PATH_BY_ROUTING['consultancy_session'] : '',
  1937.                 'targetId' => 0,
  1938.                 'meetingId' => 0,
  1939.                 'userId' => 0,
  1940.                 'applicantId' => 0,
  1941.                 'taggedUserIds' => [0],
  1942.             ),
  1943.             'firebasePushData' => array(
  1944.                 'notification' => array(
  1945.                     'title' => $request->query->get('title''TITLE HERE'),
  1946.                     'body' => $request->query->get('body''MY NOTIFICATION BODY')
  1947.                 ),
  1948.                 'data' => [
  1949. //                                'score' => '850',
  1950. //                                'time' => '2:45',
  1951.                     'route' => 'https://buddybee.eu/consultancy_session/1'
  1952.                 ],
  1953.                 'android' => [
  1954.                     'notification' => [
  1955.                         // icon: 'stock_ticker_update',
  1956.                         // color: '#7e55c3',
  1957.                         'imageUrl' => 'https://buddybee.eu/buddybee_assets/images/author-1.png'
  1958.                     ]
  1959.                 ],
  1960.                 'topic' => 'SESSION BOOKED',
  1961.                 'tokens' => $tokens,
  1962.             )
  1963.         ]);
  1964.         if (is_string($options)) $options json_decode($optionstrue);
  1965.         System::AddNewNotificationUpdated(
  1966.             $this->container->getParameter('notification_enabled'),
  1967.             $this->container->getParameter('notification_server'),
  1968.             0//appId
  1969.             0,//company Id
  1970.             '',
  1971.             GeneralConstant::NOTIFICATION_TYPE_ALERT,//type
  1972.             "",
  1973.             "Schedule Confirmed",
  1974.             'emit',
  1975.             0,
  1976.             1,
  1977.             $options
  1978.         );
  1979.         return new JsonResponse($options);
  1980.     }
  1981.     public function GetEntitySignatureAction(Request $request)
  1982.     {
  1983.         $details_ids = [];
  1984.         $em $this->getDoctrine()->getManager('company_group');
  1985.         $retData = [
  1986.             'success' => false,
  1987.         ];
  1988.         if ($request->isMethod('POST')) {
  1989.             $query_here $em->getRepository('CompanyGroupBundle\\Entity\\EntityEncryptedSignature')
  1990.                 ->findOneBy(
  1991.                     array(
  1992.                         'userId' => $request->request->get('userId'0)
  1993.                     )
  1994.                 );
  1995.             if ($query_here) {
  1996.                 $retData['success'] = true;
  1997.                 $retData['data'] = $query_here->getData();
  1998.             }
  1999.         }
  2000.         return new JsonResponse($retData);
  2001.     }
  2002.     public function SwitchAppAction(Request $request)
  2003.     {
  2004.         $details_ids = [];
  2005.         $em $this->getDoctrine()->getManager('company_group');
  2006. //        $this->get('url_encryptor')->decrypt($encData);
  2007.         $retData = [
  2008.             'success' => false,
  2009.                    ];
  2010.         return new JsonResponse($retData);
  2011.     }
  2012.     public function DebugTestAction(Request $request)
  2013.     {
  2014.         $details_ids = [];
  2015.         $em $this->getDoctrine()->getManager('company_group');
  2016.         $ggDT=array('pika'=>'chu');
  2017.         $encData=$request->get('encData',$this->get('url_encryptor')->encrypt(json_encode($ggDT)));
  2018. //        $this->get('url_encryptor')->decrypt($encData);
  2019.         $retData = [
  2020.             'success' => false,
  2021.             'test' => $this->get('url_encryptor')->decrypt($encData),
  2022.             'test1' => $this->get('url_encryptor')->decrypt('RmVlU0RBdnMrWnFySFU0UXZOeGZSRTNPL3h2dzN0aytlN2U2MjNBam16VlNtTUozZzU3VDc2K2lpYWc1THp5T0phQXI3RnMvRTRCNUxGQUp2dE1KeXdwTW0xV1lrMzlSMGFxVXVGQzZPVnliVTBJQw'),
  2023.             'test2' => json_decode($this->get('url_encryptor')->decrypt($encData),true),
  2024.         ];
  2025.         return new JsonResponse($retData);
  2026.     }
  2027.     public function ViewDocByGlobalIdAction(Request $request$trackingId ''$appMarker '')
  2028.     {
  2029. //        $em = $this->getDoctrine()->getManager();
  2030.         $globalIdStr $request->get('globalIdStr''');
  2031.         $globalIdData MiscActions::getExpandedDataFromGlobalId($globalIdStr);
  2032.         $routeName $request->attributes->get('_route');
  2033.         $pbcId 0;
  2034.         $goc 0;
  2035.         $appId 0//these we will need eventually
  2036.         $productByCodeData = [];
  2037.         $productByCodeDataObj = [];
  2038.         $productByData = [];
  2039.         $trackingData = [];
  2040.         $productName '';
  2041.         $em_goc $this->getDoctrine()->getManager('company_group');
  2042.         $em_goc->getConnection()->connect();
  2043.         $gocEnabled 0;
  2044.         if ($this->container->hasParameter('entity_group_enabled'))
  2045.             $gocEnabled $this->container->getParameter('entity_group_enabled');
  2046.         if ($gocEnabled == 1)
  2047.             $connected $em_goc->getConnection()->isConnected();
  2048.         else
  2049.             $connected false;
  2050.         $goc null;
  2051.         if ($connected) {
  2052.             if ($routeName == 'track_after_sales_service_product_serial_query') {
  2053.                 if ($appMarker != '') {
  2054.                     $goc $em_goc
  2055.                         ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2056.                         ->findOneBy(
  2057.                             array(
  2058.                                 'companyGroupHash' => $appMarker
  2059.                             )
  2060.                         );
  2061.                 }
  2062.             } else {
  2063. //                if($trackingId !='' && stripos($trackingId,'TR') !== false)
  2064. //                {
  2065. //                    $appId=substr($trackingId,2,5);
  2066. //                    $pbcId=substr($trackingId,7,8);
  2067. //                    if(!is_numeric($appId))
  2068. //                        $appId=0;
  2069. //                }
  2070.                 $goc $em_goc
  2071.                     ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2072.                     ->findOneBy(
  2073.                         array(
  2074.                             'appId' => $appId
  2075.                         )
  2076.                     );
  2077.             }
  2078.         }
  2079.         if ($goc) {
  2080.             $appId $goc->getAppId();
  2081.             $appMarker $goc->getCompanyGroupHash();
  2082.             $connector $this->container->get('application_connector');
  2083.             $connector->resetConnection(
  2084.                 'default',
  2085.                 $goc->getDbName(),
  2086.                 $goc->getDbUser(),
  2087.                 $goc->getDbPass(),
  2088.                 $goc->getDbHost(),
  2089.                 $reset true
  2090.             );
  2091.         }
  2092.         //now get related data if $goc exists
  2093.         $em $this->getDoctrine()->getManager();
  2094.         $responseData = [
  2095.             'page_title' => 'Entity Setup',
  2096.             'appId' => $appId,
  2097.             'appMarker' => $appMarker,
  2098.         ];
  2099.         return $this->render(
  2100. //            '@System/pages/public:entity_setup.html.twig',
  2101.             '@Application/pages/central/setup_app.html.twig',
  2102.             $responseData
  2103.         );
  2104.     }
  2105.     public function EntitySetupAction(Request $request$trackingId ''$appMarker '')
  2106.     {
  2107. //        $em = $this->getDoctrine()->getManager();
  2108.         $routeName $request->attributes->get('_route');
  2109.         $pbcId 0;
  2110.         $goc 0;
  2111.         $appId 0//these we will need eventually
  2112.         $productByCodeData = [];
  2113.         $productByCodeDataObj = [];
  2114.         $productByData = [];
  2115.         $trackingData = [];
  2116.         $productName '';
  2117.         $em_goc $this->getDoctrine()->getManager('company_group');
  2118.         $em_goc->getConnection()->connect();
  2119.         $gocEnabled 0;
  2120.         if ($this->container->hasParameter('entity_group_enabled'))
  2121.             $gocEnabled $this->container->getParameter('entity_group_enabled');
  2122.         if ($gocEnabled == 1)
  2123.             $connected $em_goc->getConnection()->isConnected();
  2124.         else
  2125.             $connected false;
  2126.         $goc null;
  2127.         if ($connected) {
  2128.             if ($routeName == 'track_after_sales_service_product_serial_query') {
  2129.                 if ($appMarker != '') {
  2130.                     $goc $em_goc
  2131.                         ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2132.                         ->findOneBy(
  2133.                             array(
  2134.                                 'companyGroupHash' => $appMarker
  2135.                             )
  2136.                         );
  2137.                 }
  2138.             } else {
  2139. //                if($trackingId !='' && stripos($trackingId,'TR') !== false)
  2140. //                {
  2141. //                    $appId=substr($trackingId,2,5);
  2142. //                    $pbcId=substr($trackingId,7,8);
  2143. //                    if(!is_numeric($appId))
  2144. //                        $appId=0;
  2145. //                }
  2146.                 $goc $em_goc
  2147.                     ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2148.                     ->findOneBy(
  2149.                         array(
  2150.                             'appId' => $appId
  2151.                         )
  2152.                     );
  2153.             }
  2154.         }
  2155.         if ($goc) {
  2156.             $appId $goc->getAppId();
  2157.             $appMarker $goc->getCompanyGroupHash();
  2158.             $connector $this->container->get('application_connector');
  2159.             $connector->resetConnection(
  2160.                 'default',
  2161.                 $goc->getDbName(),
  2162.                 $goc->getDbUser(),
  2163.                 $goc->getDbPass(),
  2164.                 $goc->getDbHost(),
  2165.                 $reset true
  2166.             );
  2167.         }
  2168.         //now get related data if $goc exists
  2169.         $em $this->getDoctrine()->getManager();
  2170.         $responseData = [
  2171.             'page_title' => 'Entity Setup',
  2172.             'appId' => $appId,
  2173.             'appMarker' => $appMarker,
  2174.         ];
  2175.         return $this->render(
  2176. //            '@System/pages/public:entity_setup.html.twig',
  2177.             '@Application/pages/central/setup_app.html.twig',
  2178.             $responseData
  2179.         );
  2180.     }
  2181.     public function AfterSalesServiceTrackingAction(Request $request$trackingId ''$appMarker '')
  2182.     {
  2183. //        $em = $this->getDoctrine()->getManager();
  2184.         $routeName $request->attributes->get('_route');
  2185.         $pbcId 0;
  2186.         $goc 0;
  2187.         $appId 0//these we will need eventually
  2188.         $productByCodeData = [];
  2189.         $productByCodeDataObj = [];
  2190.         $productByData = [];
  2191.         $trackingData = [];
  2192.         $productName '';
  2193.         $em_goc $this->getDoctrine()->getManager('company_group');
  2194.         $em_goc->getConnection()->connect();
  2195.         $gocEnabled 0;
  2196.         if ($this->container->hasParameter('entity_group_enabled'))
  2197.             $gocEnabled $this->container->getParameter('entity_group_enabled');
  2198.         if ($gocEnabled == 1)
  2199.             $connected $em_goc->getConnection()->isConnected();
  2200.         else
  2201.             $connected false;
  2202.         $goc null;
  2203.         if ($connected) {
  2204.             if ($routeName == 'track_after_sales_service_product_serial_query') {
  2205.                 if ($appMarker != '') {
  2206.                     $goc $em_goc
  2207.                         ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2208.                         ->findOneBy(
  2209.                             array(
  2210.                                 'companyGroupHash' => $appMarker
  2211.                             )
  2212.                         );
  2213.                 }
  2214.             } else {
  2215.                 if ($trackingId != '' && stripos($trackingId'TR') !== false) {
  2216.                     $appId substr($trackingId25);
  2217.                     $pbcId substr($trackingId78);
  2218.                     if (!is_numeric($appId))
  2219.                         $appId 0;
  2220.                 }
  2221.                 $goc $em_goc
  2222.                     ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2223.                     ->findOneBy(
  2224.                         array(
  2225.                             'appId' => $appId
  2226.                         )
  2227.                     );
  2228.             }
  2229.         }
  2230.         if ($goc) {
  2231.             $appId $goc->getAppId();
  2232.             $appMarker $goc->getCompanyGroupHash();
  2233.             $connector $this->container->get('application_connector');
  2234.             $connector->resetConnection(
  2235.                 'default',
  2236.                 $goc->getDbName(),
  2237.                 $goc->getDbUser(),
  2238.                 $goc->getDbPass(),
  2239.                 $goc->getDbHost(),
  2240.                 $reset true
  2241.             );
  2242.         }
  2243.         //now get related data if $goc exists
  2244.         $em $this->getDoctrine()->getManager();
  2245.         if ($trackingId != '') {
  2246.             if (is_numeric($trackingId)) {
  2247.                 $productByCodeDataQuery $em->getRepository('ApplicationBundle\\Entity\\ProductByCode')
  2248.                     ->createQueryBuilder('p')
  2249.                     ->where("( p.salesCode like '%$trackingId%'
  2250.                                     or p.imei1 like '%$trackingId%'
  2251.                                     or p.imei2 like '%$trackingId%'
  2252.                                     or p.imei3 like '%$trackingId%'
  2253.                                     or p.imei4 like '%$trackingId%'
  2254.                                     or p.serialNo like '%$trackingId%'
  2255.                                     )")
  2256.                     ->getQuery()
  2257.                     ->getResult();
  2258.                 if (!empty($productByCodeDataQuery))
  2259.                     $productByCodeData $productByCodeDataQuery[0];
  2260.             } else if ($pbcId != 0) {
  2261.                 $productByCodeData $em
  2262.                     ->getRepository("ApplicationBundle\\Entity\\ProductByCode")
  2263.                     ->findOneBy(
  2264.                         array(
  2265.                             'productByCodeId' => $pbcId
  2266.                         )
  2267.                     );
  2268.             } else {
  2269.                 $productByCodeData $em
  2270.                     ->getRepository("ApplicationBundle\\Entity\\ProductByCode")
  2271.                     ->findOneBy(
  2272.                         array(
  2273.                             'afterSalesTrackingId' => $trackingId
  2274.                         )
  2275.                     );
  2276.             }
  2277.         }
  2278.         if (!empty($productByCodeData)) {
  2279.             $productData $em
  2280.                 ->getRepository("ApplicationBundle\\Entity\\InvProducts")
  2281.                 ->findOneBy(
  2282.                     array(
  2283.                         'id' => $productByCodeData->getProductId()
  2284.                     )
  2285.                 );
  2286.             if ($productData) {
  2287.                 $productName $productData->getName();
  2288.             }
  2289.             $trackingData json_decode($productByCodeData->getAfterSalesServiceTrackingStatusData(), true);
  2290.             if ($trackingData == null)
  2291.                 $trackingData = [];
  2292.             $productByCodeDataObj['productByCodeId'] = $productByCodeData->getProductByCodeId();
  2293.             $productByCodeDataObj['salesCode'] = $productByCodeData->getSalesCode();
  2294.             $productByCodeDataObj['serialNo'] = $productByCodeData->getSerialNo();
  2295.             $productByCodeDataObj['imei1'] = $productByCodeData->getImei1();
  2296.             $productByCodeDataObj['imei2'] = $productByCodeData->getImei2();
  2297.             $productByCodeDataObj['imei3'] = $productByCodeData->getImei3();
  2298.             $productByCodeDataObj['imei4'] = $productByCodeData->getImei4();
  2299.         }
  2300.         $responseData = [
  2301.             'page_title' => 'Service Tracking',
  2302.             'productByCodeData' => $productByCodeData,
  2303.             'productByCodeDataObj' => $productByCodeDataObj,
  2304.             'trackingData' => $trackingData,
  2305.             'productName' => $productName,
  2306.             'appId' => $appId,
  2307.             'appMarker' => $appMarker,
  2308.             'trackingId' => $trackingId,
  2309.         ];
  2310.         return $this->render(
  2311.             '@Sales/pages/report/after_sales_service_tracking_public.html.twig',
  2312.             $responseData
  2313.         );
  2314.     }
  2315.     public function MeetingConfirmationAction(Request $request)
  2316.     {
  2317. //        $em = $this->getDoctrine()->getManager();
  2318.         $resMessage "";
  2319.         $resMessageType "";
  2320.         if ($request->query->get('appId') != && $request->query->get('appId') != "") {
  2321.             $em_goc $this->getDoctrine()->getManager('company_group');
  2322.             $em_goc->getConnection()->connect();
  2323.             $gocEnabled 0;
  2324.             if ($this->container->hasParameter('entity_group_enabled'))
  2325.                 $gocEnabled $this->container->getParameter('entity_group_enabled');
  2326.             if ($gocEnabled == 1)
  2327.                 $connected $em_goc->getConnection()->isConnected();
  2328.             else
  2329.                 $connected false;
  2330.             $goc false;
  2331.             if ($connected) {
  2332.                 $goc $em_goc
  2333.                     ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2334.                     ->findOneBy(
  2335.                         array(
  2336.                             'appId' => $request->query->get('appId')
  2337.                         )
  2338.                     );
  2339.             }
  2340.             if ($goc) {
  2341.                 $connector $this->container->get('application_connector');
  2342.                 $connector->resetConnection(
  2343.                     'default',
  2344.                     $goc->getDbName(),
  2345.                     $goc->getDbUser(),
  2346.                     $goc->getDbPass(),
  2347.                     $goc->getDbHost(),
  2348.                     $reset true
  2349.                 );
  2350.             }
  2351.         }
  2352.         $em $this->getDoctrine()->getManager();
  2353.         $response HumanResource::scheduledMeetingEmailResponse($em$request);
  2354.         if ($response['isDelayedResponse']) {
  2355.             $resMessageType " You are Late !";
  2356.             $resMessage "Delayed response! Your response will not be considered!";
  2357.         } else {
  2358.             $accept HumanResourceConstant::$meetingEmailResposeType['accepted'];
  2359.             $decline HumanResourceConstant::$meetingEmailResposeType['declined'];
  2360.             if ($response['responseType'] == $accept) {
  2361.                 $resMessageType " Success !";
  2362.                 $resMessage "You have Accepted the Meeting invitation!";
  2363.             }
  2364.             if ($response['responseType'] == $decline) {
  2365.                 $resMessageType " Declined !";
  2366.                 $resMessage "You have Declined the Meeting invitation!";
  2367.             }
  2368.         }
  2369.         return $this->render(
  2370.             '@Application/pages/human_resource/views/meeting_confirmation_response.html.twig',
  2371.             [
  2372.                 'page_title' => 'Meeting Confirmation',
  2373.                 'message' => $resMessage,
  2374.                 'messageType' => $resMessageType,
  2375.             ]
  2376.         );
  2377.     }
  2378.     public function PublicMeetingViewAction(Request $request$id 0)
  2379.     {
  2380. //        $em = $this->getDoctrine()->getManager();
  2381.         $resMessage "";
  2382.         $resMessageType "";
  2383.         $appId 0;
  2384.         if ($request->query->get('appId') != && $request->query->get('appId') != "") {
  2385.             $em_goc $this->getDoctrine()->getManager('company_group');
  2386.             $em_goc->getConnection()->connect();
  2387.             $gocEnabled 0;
  2388.             $appId $request->query->get('appId');
  2389.             if ($this->container->hasParameter('entity_group_enabled'))
  2390.                 $gocEnabled $this->container->getParameter('entity_group_enabled');
  2391.             if ($gocEnabled == 1)
  2392.                 $connected $em_goc->getConnection()->isConnected();
  2393.             else
  2394.                 $connected false;
  2395.             $goc false;
  2396.             if ($connected) {
  2397.                 $goc $em_goc
  2398.                     ->getRepository("CompanyGroupBundle\\Entity\\CompanyGroup")
  2399.                     ->findOneBy(
  2400.                         array(
  2401.                             'appId' => $request->query->get('appId')
  2402.                         )
  2403.                     );
  2404.             }
  2405.             if ($goc) {
  2406.                 $connector $this->container->get('application_connector');
  2407.                 $connector->resetConnection(
  2408.                     'default',
  2409.                     $goc->getDbName(),
  2410.                     $goc->getDbUser(),
  2411.                     $goc->getDbPass(),
  2412.                     $goc->getDbHost(),
  2413.                     $reset true
  2414.                 );
  2415.             }
  2416.         }
  2417.         $em $this->getDoctrine()->getManager();
  2418.         $companyId $this->getLoggedUserCompanyId($request);
  2419.         $response HumanResource::TwigDataForScheduledMeetingView($em$request$id);
  2420.         return $this->render(
  2421.             '@Application/pages/human_resource/views/scheduled_meeting_view.html.twig',
  2422.             [
  2423.                 'page_title' => 'View Scheduled Meeting',
  2424.                 'publicView' => 1,
  2425.                 'appId' => $response['appId'],
  2426.                 'displayName' => $request->query->has('name') ? $request->query->get('name') : 'Meeting User',
  2427.                 'duration' => $response['duration'],
  2428.                 'meeting_data' => $response['meeting_data'],
  2429.                 'agenda_list' => $response['agenda_list'],
  2430.                 'id' => $id,
  2431.                 'approval_data' => $response['approval_data'],
  2432.                 'document_log' => $response['document_log'],
  2433.                 'approval_status' => $response['approval_status'],
  2434.                 'created_by' => $response['created_by'],
  2435.                 'updated_at' => $response['updated_at'],
  2436.                 'auto_created' => 0,
  2437.             ]
  2438.         );
  2439.     }
  2440.     public function SystemChangeLogViewAction(Request $request$id 0)
  2441.     {
  2442. //        $em = $this->getDoctrine()->getManager();
  2443.         $resMessage "";
  2444.         $resMessageType "";
  2445.         $appId 0;
  2446.         $change_log_dir $this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/changelog/';
  2447. //        if (!file_exists($change_log_dir)) {
  2448. //            mkdir($change_log_dir, 0777, true);
  2449. //        }
  2450.         $path $change_log_dir '/changelog.json';
  2451.         $content file_exists($path) ? file_get_contents($path) : null;
  2452.         $contentData = array();
  2453. //        $contentData = array(
  2454. //
  2455. //
  2456. //            [
  2457. //                'versionNumber'=>'1.2.56',
  2458. //                'severity'=>'major',
  2459. //                'releaseDate'=>'12 Mar, 2022',
  2460. //                'changeLog'=>[
  2461. //                    ['type'=>'feature','text'=>'Pika is chu'],
  2462. //                    ['type'=>'bugfix','text'=>'Pika is lu'],
  2463. //                ]
  2464. //            ],
  2465. //            [
  2466. //                'versionNumber'=>'1.2.45',
  2467. //                'severity'=>'major',
  2468. //                'releaseDate'=>'01 Jan, 2022',
  2469. //                'changeLog'=>[
  2470. //                    ['type'=>'feature','text'=>'Pika is chu'],
  2471. //                    ['type'=>'bugfix','text'=>'Pika is lu'],
  2472. //                ]
  2473. //            ],
  2474. //
  2475. //        );
  2476.         if ($content)
  2477.             $contentData json_decode($contenttrue);
  2478.         return $this->render(
  2479.             '@System/pages/systemChangeLog.html.twig',
  2480.             [
  2481.                 'page_title' => 'Change Log',
  2482.                 'contentData' => $contentData,
  2483.                 'content' => $content,
  2484.                 'path' => $path,
  2485.             ]
  2486.         );
  2487.     }
  2488.     public function WellKnownAssetLinksAction(Request $request$id 0)
  2489.     {
  2490.         return new JsonResponse(array(
  2491.             [
  2492.                 "relation" => [
  2493.                     "delegate_permission/common.handle_all_urls"
  2494.                 ],
  2495.                 "target" => [
  2496.                     "namespace" => "android_app",
  2497.                     "package_name" => "eu.buddybee.consultancy",
  2498.                     "sha256_cert_fingerprints" => [
  2499.                         "B4:06:4A:7C:76:C8:E0:F1:18:00:F8:6E:1D:2F:11:1E:0C:1D:11:63:B5:95:08:DE:ED:63:A1:5F:4E:7E:A9:69"
  2500.                     ]
  2501.                 ]
  2502.             ]
  2503.         ));
  2504.     }
  2505.     public function GenericDataTableAjaxCompanyGroupAction(Request $request)
  2506.     {
  2507.         $em $this->getDoctrine()->getManager('company_group');
  2508.         $companyId $this->getLoggedUserCompanyId($request);
  2509.         $listData MiscActions::GetDtDataAjax($em$request->isMethod('POST') ? 'POST' 'GET'$request->request$companyId$this->container->getParameter('kernel.root_dir'));
  2510.         if ($request->isMethod('POST') && $request->request->has('returnJson')) {
  2511.             if ($request->query->has('dataTableQry')) {
  2512.                 return new JsonResponse(
  2513.                     $listData
  2514.                 );
  2515.             }
  2516.         }
  2517.         $data = [];
  2518.         return new JsonResponse(
  2519.             $listData
  2520.         );
  2521. //        return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
  2522. //            array(
  2523. //                'page_title' => 'Delivery Receipts',
  2524. //                'data' => $data,
  2525. //
  2526. //            )
  2527. //        );
  2528.     }
  2529.     public function GenericDataTableAjaxPublicAction(Request $request)
  2530.     {
  2531.         $em $this->getDoctrine()->getManager();
  2532.         $companyId $this->getLoggedUserCompanyId($request);
  2533.         $listData MiscActions::GetDtDataAjax($em$request->isMethod('POST') ? 'POST' 'GET'$request->request$companyId$this->container->getParameter('kernel.root_dir'));
  2534.         if ($request->isMethod('POST') && $request->request->has('returnJson')) {
  2535.             if ($request->query->has('dataTableQry')) {
  2536.                 return new JsonResponse(
  2537.                     $listData
  2538.                 );
  2539.             }
  2540.         }
  2541.         $data = [];
  2542.         return new JsonResponse(
  2543.             $listData
  2544.         );
  2545. //        return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
  2546. //            array(
  2547. //                'page_title' => 'Delivery Receipts',
  2548. //                'data' => $data,
  2549. //
  2550. //            )
  2551. //        );
  2552.     }
  2553.     public function MarkBuddybeeEventAction(Request $request$id 0)
  2554.     {
  2555.         $em $this->getDoctrine()->getManager('company_group');
  2556.         $applicantId $request->request->get('applicantId'0);
  2557.         $eventId $request->request->get('eventId'0);
  2558.         $relId $request->request->get('relId'0);
  2559.         $followStatus $request->request->get('followStatus''_UNCHANGED_');
  2560.         $skipStatus $request->request->get('skipStatus''_UNCHANGED_');
  2561.         $attendingStatus $request->request->get('attendingStatus''_UNCHANGED_');
  2562.         $successStatus false;
  2563.         if ($applicantId != && $eventId != 0) {
  2564.             $applicant $em
  2565.                 ->getRepository("CompanyGroupBundle\\Entity\\EntityApplicantDetails")
  2566.                 ->findOneBy(
  2567.                     array(
  2568.                         'applicantId' => $applicantId
  2569.                     )
  2570.                 );
  2571.             if ($applicant) {
  2572.                 $successStatus true;
  2573.                 if ($followStatus != '_UNCHANGED_') {
  2574.                     $currData json_decode($applicant->getFollowingEventIds(), true);
  2575.                     if ($currData == null$currData = [];
  2576.                     if ($followStatus == 1)
  2577.                         $currData array_merge($currDataarray_diff([$eventId], $currData));
  2578.                     else
  2579.                         $currData array_diff($currData, [$eventId]);
  2580.                     $applicant->setFollowingEventIds(json_encode($currData));
  2581.                 }
  2582.                 if ($followStatus != '_UNCHANGED_') {
  2583.                     $currData json_decode($applicant->getSkipEventIds(), true);
  2584.                     if ($currData == null$currData = [];
  2585.                     if ($skipStatus == 1)
  2586.                         $currData array_merge($currDataarray_diff([$eventId], $currData));
  2587.                     else
  2588.                         $currData array_diff($currData, [$eventId]);
  2589.                     $applicant->setSkipEventIds(json_encode($currData));
  2590.                     if ($skipStatus == 1) {
  2591.                         $currData json_decode($applicant->getFollowingEventIds(), true);
  2592.                         if ($currData == null$currData = [];
  2593.                         if ($followStatus == 1)
  2594.                             $currData array_merge($currDataarray_diff([$eventId], $currData));
  2595.                         else
  2596.                             $currData array_diff($currData, [$eventId]);
  2597.                         $applicant->setFollowingEventIds(json_encode($currData));
  2598.                         $currData json_decode($applicant->getAttendingEventIds(), true);
  2599.                         if ($currData == null$currData = [];
  2600.                         $currData array_diff($currData, [$eventId]);
  2601.                         $applicant->setAttendingEventIds(json_encode($currData));
  2602.                     }
  2603.                 }
  2604.                 if ($attendingStatus != '_UNCHANGED_') {
  2605.                     if ($attendingStatus == 1) {
  2606.                         $currData json_decode($applicant->getAttendingEventIds(), true);
  2607.                         if ($currData == null$currData = [];
  2608.                         $currData array_merge($currDataarray_diff([$eventId], $currData));
  2609.                         $applicant->setAttendingEventIds(json_encode($currData));
  2610.                     } else {
  2611.                         $currData json_decode($applicant->getAttendingEventIds(), true);
  2612.                         if ($currData == null$currData = [];
  2613.                         $currData array_diff($currData, [$eventId]);
  2614.                         $applicant->setAttendingEventIds(json_encode($currData));
  2615.                     }
  2616.                 }
  2617.             }
  2618.             $em->flush();
  2619.         }
  2620.         return new JsonResponse(
  2621.             array(
  2622.                 'success' => $successStatus,
  2623.                 'applicantId' => $applicantId,
  2624.                 'relId' => $relId,
  2625.                 'followStatus' => $followStatus,
  2626.                 'attendingStatus' => $attendingStatus,
  2627.             )
  2628.         );
  2629. //        return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
  2630. //            array(
  2631. //                'page_title' => 'Delivery Receipts',
  2632. //                'data' => $data,
  2633. //
  2634. //            )
  2635. //        );
  2636.     }
  2637.     public function MarkEntityNotificationAction(Request $request$id 0)
  2638.     {
  2639.         $em $this->getDoctrine()->getManager('company_group');
  2640.         $notificationIds $request->request->get('notificationIds', []);
  2641.         if ($notificationIds == '_ALL_'$notificationIds = [];
  2642.         $applicantId $request->request->get('applicantId'0);
  2643.         $readFlag $request->request->get('readFlag''_UNCHANGED_');
  2644.         $seenFlag $request->request->get('seenFlag''_UNCHANGED_');
  2645.         $deleteFlag $request->request->get('deleteFlag''0');
  2646.         $successStatus false;
  2647.         if (is_string($notificationIds)) $notificationIds json_decode($notificationIdstrue);
  2648.         if ($notificationIds == null$notificationIds = [];
  2649.         $qryArray = [];
  2650.         if (!empty($notificationIds))
  2651.             $qryArray['id'] = $notificationIds;
  2652.         if ($applicantId != 0)
  2653.             $qryArray['applicantId'] = $applicantId;
  2654.         $notifications $em
  2655.             ->getRepository("CompanyGroupBundle\\Entity\\EntityNotification")
  2656.             ->findBy(
  2657.                 $qryArray
  2658.             );
  2659.         foreach ($notifications as $notification) {
  2660.             if ($deleteFlag == 1) {
  2661.                 $em->remove($notification);
  2662.                 $em->flush();
  2663.             } else {
  2664.                 if ($readFlag != '_UNCHANGED_')
  2665.                     $notification->setReadFlag($readFlag);
  2666.                 if ($seenFlag != '_UNCHANGED_')
  2667.                     $notification->setSeenFlag($seenFlag);
  2668.             }
  2669.             $successStatus true;
  2670.         }
  2671.         $em->flush();
  2672.         return new JsonResponse(
  2673.             array(
  2674.                 'success' => $successStatus,
  2675.                 'applicantId' => $applicantId,
  2676.                 'notificationIds' => $notificationIds,
  2677.                 'readFlag' => $readFlag,
  2678.                 'seenFlag' => $seenFlag,
  2679.             )
  2680.         );
  2681. //        return $this->render('@Inventory/pages/views/delivery_receipts.html.twig',
  2682. //            array(
  2683. //                'page_title' => 'Delivery Receipts',
  2684. //                'data' => $data,
  2685. //
  2686. //            )
  2687. //        );
  2688.     }
  2689.     public function initiateAdminAction(Request $request)
  2690.     {
  2691.         $em $this->getDoctrine()->getManager();
  2692.         MiscActions::initiateAdminUser($em);
  2693.         $this->addFlash(
  2694.             'success',
  2695.             'The Action was Successful.'
  2696.         );
  2697.         return $this->redirectToRoute('user_login');
  2698.     }
  2699.     public function DemoDataFlutterTestAction(Request $request)
  2700.     {
  2701.         return new JsonResponse(
  2702.             array(
  2703.                 ['id' => 1'name' => 'Property 1''rating' => '4.5''description' => 'lorem ipsum 1''imageUrl' => 'https://picsum.photos/200/300'],
  2704.                 ['id' => 2'name' => 'Property 2''rating' => '4.1''description' => 'lorem ipsum 2''imageUrl' => 'https://picsum.photos/200/300'],
  2705.                 ['id' => 3'name' => 'Property 3''rating' => '4.2''description' => 'lorem ipsum 4''imageUrl' => 'https://picsum.photos/200/300'],
  2706.                 ['id' => 4'name' => 'Property 4''rating' => '2.5''description' => 'lorem ipsum 3''imageUrl' => 'https://picsum.photos/200/300'],
  2707.             )
  2708.         );
  2709.     }
  2710.     public function selectDataAjaxAction(Request $request$queryStr '',
  2711.                                                  $version 'latest',
  2712.                                                  $identifier '_default_',
  2713.                                                  $apiKey '_ignore_'
  2714.     )
  2715.     {
  2716.         $em $this->getDoctrine()->getManager();
  2717.         $em_goc $this->getDoctrine()->getManager('company_group');
  2718.         $companyId 0;
  2719.         $skipCurrentUserIdRestriction $request->get('skipCurrentUserIdRestriction'0);
  2720.         $dataOnly $request->get('dataOnly'0);
  2721.         $skipCurrentEmployeeIdRestriction $request->get('skipCurrentEmployeeIdRestriction'0);
  2722.         $skipCurrentUserLoginIdRestriction $request->get('skipCurrentUserLoginIdRestriction'0);
  2723.         $currentUserId $request->getSession()->get(UserConstants::USER_ID0);
  2724.         $currentEmployeeId $request->getSession()->get(UserConstants::USER_EMPLOYEE_ID0);
  2725.         $currentUserLoginIds = [];
  2726.         if ($request->request->get('entity_group'0)) {
  2727.             $companyId 0;
  2728.             $em $this->getDoctrine()->getManager('company_group');
  2729.         } else {
  2730.             if ($request->request->get('appId'0) != 0) {
  2731.                 $gocEnabled 0;
  2732.                 if ($this->container->hasParameter('entity_group_enabled'))
  2733.                     $gocEnabled $this->container->getParameter('entity_group_enabled');
  2734.                 else
  2735.                     $gocEnabled 1;
  2736.                 if ($gocEnabled == 1) {
  2737.                     $dataToConnect System::changeDoctrineManagerByAppId(
  2738.                         $this->getDoctrine()->getManager('company_group'),
  2739.                         $gocEnabled,
  2740.                         $request->request->get('appId'0)
  2741.                     );
  2742.                     if (!empty($dataToConnect)) {
  2743.                         $connector $this->container->get('application_connector');
  2744.                         $connector->resetConnection(
  2745.                             'default',
  2746.                             $dataToConnect['dbName'],
  2747.                             $dataToConnect['dbUser'],
  2748.                             $dataToConnect['dbPass'],
  2749.                             $dataToConnect['dbHost'],
  2750.                             $reset true
  2751.                         );
  2752.                         $em $this->getDoctrine()->getManager();
  2753.                     }
  2754.                 }
  2755.             } else if ($request->getSession()->get(UserConstants::USER_APP_ID) != && $request->getSession()->get(UserConstants::USER_APP_ID) != null) {
  2756.                 $gocEnabled 0;
  2757.                 if ($this->container->hasParameter('entity_group_enabled'))
  2758.                     $gocEnabled $this->container->getParameter('entity_group_enabled');
  2759.                 else
  2760.                     $gocEnabled 1;
  2761.                 if ($gocEnabled == 1) {
  2762.                     $dataToConnect System::changeDoctrineManagerByAppId(
  2763.                         $this->getDoctrine()->getManager('company_group'),
  2764.                         $gocEnabled,
  2765.                         $request->getSession()->get(UserConstants::USER_APP_ID)
  2766.                     );
  2767.                     if (!empty($dataToConnect)) {
  2768.                         $connector $this->container->get('application_connector');
  2769.                         $connector->resetConnection(
  2770.                             'default',
  2771.                             $dataToConnect['dbName'],
  2772.                             $dataToConnect['dbUser'],
  2773.                             $dataToConnect['dbPass'],
  2774.                             $dataToConnect['dbHost'],
  2775.                             $reset true
  2776.                         );
  2777.                         $em $this->getDoctrine()->getManager();
  2778.                     }
  2779.                 }
  2780.             }
  2781.             $companyId $this->getLoggedUserCompanyId($request);
  2782.         }
  2783.         $configData = [];
  2784.         $isSingleDataset 1;
  2785.         $dataSet $request->request->has('dataset') ? $request->request->get('dataset') : [];
  2786.         if (is_string($dataSet)) $dataSet json_decode($dataSettrue);
  2787.         $valuePairs $request->get('valuePairs', []);
  2788.         if (is_string($valuePairs)) $valuePairs json_decode($valuePairstrue);
  2789.         $allResult = [];
  2790.         $datasetFromConfig = [];
  2791.         if ($identifier != '_default_') {
  2792.             $config_file $this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' $identifier 'Config.json';
  2793.             if (!file_exists($config_file)) {
  2794.             } else {
  2795.                 $fileText file_get_contents($config_file);
  2796.                 //now replace any value pairs
  2797.                 foreach ($valuePairs as $kkeeyy => $vvaalluuee) {
  2798.                     if (is_array($vvaalluuee)) {
  2799.                         if (isset($vvaalluuee['value']) && isset($vvaalluuee['type'])) {
  2800.                             if ($vvaalluuee['type'] == 'array'$fileText str_ireplace('_' $kkeeyy '_'json_encode($vvaalluuee['value']), $fileText);
  2801.                             if ($vvaalluuee['type'] == 'value'$fileText str_ireplace('_' $kkeeyy '_'$vvaalluuee['value'], $fileText);
  2802.                             if ($vvaalluuee['type'] == 'text')  $fileText str_ireplace('_' $kkeeyy '_'$vvaalluuee['value'], $fileText);
  2803.                         } else {
  2804.                             $fileText str_ireplace('_' $kkeeyy '_'json_encode($vvaalluuee), $fileText);
  2805.                         }
  2806.                     }
  2807.                     else
  2808.                         $fileText str_ireplace('_' $kkeeyy '_'$vvaalluuee$fileText);
  2809.                 }
  2810.                 $fileText str_ireplace('_query_'$request->get('query'$queryStr), $fileText);
  2811.                 $fileText str_ireplace('_itemLimit_'$request->get('itemLimit''_all_'), $fileText);
  2812.                 $fileText str_ireplace('_offset_'$request->get('offset', ($request->get('itemLimit'10)) * ($request->get('page'1) - 1)), $fileText);
  2813.                 if (!(strpos($fileText'_CURRENT_USER_LOGIN_IDS_') === false) && $skipCurrentUserLoginIdRestriction == 0) {
  2814.                     $userInfo = [];
  2815.                     if ($request->getSession()->get(UserConstants::USER_TYPE0) == UserConstants::USER_TYPE_APPLICANT) {
  2816.                         $userInfo $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityLoginLog')->findBy(
  2817.                             array('userId' => $currentUserId)
  2818.                         );
  2819.                     } else {
  2820.                         $userInfo $em->getRepository('ApplicationBundle\\Entity\\SysLoginLog')->findBy(
  2821.                             array('userId' => $currentUserId)
  2822.                         );
  2823.                     }
  2824.                     foreach ($userInfo as $uLogininfo) {
  2825.                         $currentUserLoginIds[] = $uLogininfo->getLoginId();
  2826.                     }
  2827.                     $fileText str_ireplace('_CURRENT_USER_LOGIN_IDS_'json_encode($currentUserLoginIds), $fileText);
  2828.                 } else {
  2829.                     $fileText str_ireplace('_CURRENT_USER_LOGIN_IDS_''_EMPTY_'$fileText);
  2830.                 }
  2831.                 if (!(strpos($fileText'_CURRENT_USER_ID_') === false) && $skipCurrentUserIdRestriction == 0) {
  2832.                     $fileText str_ireplace('_CURRENT_USER_ID_'$currentUserId$fileText);
  2833.                 } else {
  2834.                     $fileText str_ireplace('_CURRENT_USER_ID_''_EMPTY_'$fileText);
  2835.                 }
  2836.                 if (!(strpos($fileText'_CURRENT_USER_EMPLOYEE_ID_') === false) && $skipCurrentEmployeeIdRestriction == 0) {
  2837.                     if ((strpos($fileText'skipCurrentEmployeeIdRestriction') === false)) {
  2838.                         $fileText str_ireplace('_CURRENT_USER_EMPLOYEE_ID_'$currentEmployeeId$fileText);
  2839.                     } else {
  2840.                         $fileText str_ireplace('_CURRENT_USER_EMPLOYEE_ID_''_EMPTY_'$fileText);
  2841.                     }
  2842.                 } else {
  2843.                     $fileText str_ireplace('_CURRENT_USER_EMPLOYEE_ID_''_EMPTY_'$fileText);
  2844.                 }
  2845.                 if ($fileText)
  2846.                     $datasetFromConfig json_decode($fileTexttrue);
  2847.                 $skipCurrentUserIdRestriction = isset($datasetFromConfig['skipCurrentUserIdRestriction']) ? $datasetFromConfig['skipCurrentUserIdRestriction'] : $skipCurrentUserIdRestriction;
  2848.                 $skipCurrentEmployeeIdRestriction = isset($datasetFromConfig['skipCurrentEmployeeIdRestriction']) ? $datasetFromConfig['skipCurrentEmployeeIdRestriction'] : $skipCurrentEmployeeIdRestriction;
  2849.                 $skipCurrentUserLoginIdRestriction = isset($datasetFromConfig['skipCurrentUserLoginIdRestriction']) ? $datasetFromConfig['skipCurrentUserLoginIdRestriction'] : $skipCurrentUserLoginIdRestriction;
  2850.             }
  2851.         }
  2852.         if ($dataSet == null$dataSet = [];
  2853. //        return new JsonResponse(array(
  2854. //            'queryStr'=>$queryStr
  2855. //        ));
  2856.         if (!empty($datasetFromConfig)) {
  2857.             if (isset($datasetFromConfig['tableName'])) {
  2858.                 $isSingleDataset 1;
  2859.                 $dataSet[] = $datasetFromConfig;
  2860.             } else {
  2861.                 if (count($datasetFromConfig) == 1)
  2862.                     $isSingleDataset 1;
  2863.                 $dataSet $datasetFromConfig;
  2864.             }
  2865.         }
  2866.         if (empty($dataSet)) {
  2867.             $isSingleDataset 1;
  2868.             $singleDataSet = array(
  2869.                 "valueField" => $request->request->has('valueField') ? $request->request->get('valueField') : 'id',
  2870.                 "query" => $request->get('query'$queryStr),
  2871.                 "headMarkers" => $request->get('headMarkers'''),
  2872.                 "headMarkersStrictMatch" => $request->get('headMarkersStrictMatch'0),
  2873.                 "itemLimit" => $request->request->has('itemLimit') ? $request->request->get('itemLimit') : 25,
  2874.                 "selectorId" => $request->request->has('selectorId') ? $request->request->get('selectorId') : '_NONE_',
  2875.                 "textField" => $request->request->has('textField') ? $request->request->get('textField') : 'name',
  2876.                 "tableName" => $request->request->has('tableName') ? $request->request->get('tableName') : '',
  2877.                 "isMultiple" => $request->request->has('isMultiple') ? $request->request->get('isMultiple') : 0,
  2878.                 "orConditions" => $request->request->has('orConditions') ? $request->request->get('orConditions') : [],
  2879.                 "andConditions" => $request->request->has('andConditions') ? $request->request->get('andConditions') : [],
  2880.                 "andOrConditions" => $request->request->has('andOrConditions') ? $request->request->get('andOrConditions') : [],
  2881.                 "mustConditions" => $request->request->has('mustConditions') ? $request->request->get('mustConditions') : [],
  2882.                 "joinTableData" => $request->request->has('joinTableData') ? $request->request->get('joinTableData') : [],
  2883.                 "renderTextFormat" => $request->request->has('renderTextFormat') ? $request->request->get('renderTextFormat') : '',
  2884.                 "setDataForSingle" => $request->request->has('setDataForSingle') ? $request->request->get('setDataForSingle') : 0,
  2885.                 "dataId" => $request->request->has('dataId') ? $request->request->get('dataId') : 0,
  2886.                 "lastChildrenOnly" => $request->request->has('lastChildrenOnly') ? $request->request->get('lastChildrenOnly') : 0,
  2887.                 "parentOnly" => $request->request->has('parentOnly') ? $request->request->get('parentOnly') : 0,
  2888.                 "parentIdField" => $request->request->has('parentIdField') ? $request->request->get('parentIdField') : 'parent_id',
  2889.                 "skipDefaultCompanyId" => $request->request->has('skipDefaultCompanyId') ? $request->request->get('skipDefaultCompanyId') : 1,
  2890.                 "offset" => $request->request->has('offset') ? $request->request->get('offset') : 0,
  2891.                 "returnTotalMatchedEntriesFlag" => $request->request->has('returnTotalMatched') ? $request->request->get('returnTotalMatched') : 0,
  2892.                 "nextOffset" => 0,
  2893.                 "totalMatchedEntries" => 0,
  2894.                 "convertToObject" => $request->request->has('convertToObject') ? $request->request->get('convertToObject') : [],
  2895.                 "convertDateToStringFieldList" => $request->request->has('convertDateToStringFieldList') ? $request->request->get('convertDateToStringFieldList') : [],
  2896.                 "orderByConditions" => $request->request->has('orderByConditions') ? $request->request->get('orderByConditions') : [],
  2897.                 "convertToUrl" => $request->request->has('convertToUrl') ? $request->request->get('convertToUrl') : [],
  2898.                 "fullPathList" => $request->request->has('fullPathList') ? $request->request->get('fullPathList') : [],
  2899.                 "ret_data" => $request->request->has('ret_data') ? $request->request->get('ret_data') : [],
  2900.             );
  2901.             $dataSet[] = $singleDataSet;
  2902.         }
  2903. //        $lastResult = [
  2904. //            'identifier' => $identifier,
  2905. //            'dataSet' => $dataSet,
  2906. //        ];
  2907. //        return new JsonResponse($lastResult);
  2908.         $userId $request->getSession()->get(UserConstants::USER_ID);
  2909. //        public static function selectDataSystem($em, $queryStr = '_EMPTY_', $data = [],$userId=0)
  2910.         foreach ($dataSet as $dsIndex => $dataConfig) {
  2911.             $companyId 0;
  2912.             $queryStringIndividual $queryStr;
  2913.             $data = [];
  2914.             $data_by_id = [];
  2915.             $setValueArray = [];
  2916.             $silentChangeSelectize 0;
  2917.             $setValue 0;
  2918.             $setValueType 0;// 0 for id , 1 for query
  2919.             $selectAll 0;
  2920.             if ($queryStringIndividual == '_EMPTY_')
  2921.                 $queryStringIndividual '';
  2922.             if (isset($dataConfig['query']))
  2923.                 $queryStringIndividual $dataConfig['query'];
  2924.             if ($queryStringIndividual == '_EMPTY_')
  2925.                 $queryStringIndividual '';
  2926.             $queryStringIndividual str_replace('_FSLASH_''/'$queryStringIndividual);
  2927.             if ($queryStringIndividual === '#setValue:') {
  2928.                 $queryStringIndividual '';
  2929.             }
  2930.             if (!(strpos($queryStringIndividual'_silent_change_') === false)) {
  2931.                 $silentChangeSelectize 1;
  2932.                 $queryStringIndividual str_ireplace('_silent_change_'''$queryStringIndividual);
  2933.             }
  2934.             if (!(strpos($queryStringIndividual'#setValue:') === false)) {
  2935.                 $setValueArrayBeforeFilter explode(','str_replace('#setValue:'''$queryStringIndividual));
  2936.                 foreach ($setValueArrayBeforeFilter as $svf) {
  2937.                     if ($svf == '_ALL_') {
  2938.                         $selectAll 1;
  2939.                         $setValueArray = [];
  2940.                         continue;
  2941.                     }
  2942.                     if (is_numeric($svf)) {
  2943.                         $setValueArray[] = ($svf 1);
  2944.                         $setValue $svf 1;
  2945.                     }
  2946.                 }
  2947.                 $queryStringIndividual '';
  2948.             }
  2949.             $valueField = isset($dataConfig['valueField']) ? $dataConfig['valueField'] : 'id';
  2950.             $headMarkers = isset($dataConfig['headMarkers']) ? $dataConfig['headMarkers'] : ''//Special Field
  2951.             $headMarkersStrictMatch = isset($dataConfig['headMarkersStrictMatch']) ? $dataConfig['headMarkersStrictMatch'] : 0//Special Field
  2952.             $itemLimit = isset($dataConfig['itemLimit']) ? $dataConfig['itemLimit'] : 25;
  2953.             $selectorId = isset($dataConfig['selectorId']) ? $dataConfig['selectorId'] : '_NONE_';
  2954.             $textField = isset($dataConfig['textField']) ? $dataConfig['textField'] : 'name';
  2955.             $table = isset($dataConfig['tableName']) ? $dataConfig['tableName'] : '';
  2956.             $isMultiple = isset($dataConfig['isMultiple']) ? $dataConfig['isMultiple'] : 0;
  2957.             $orConditions = isset($dataConfig['orConditions']) ? $dataConfig['orConditions'] : [];
  2958.             $andConditions = isset($dataConfig['andConditions']) ? $dataConfig['andConditions'] : [];
  2959.             $andOrConditions = isset($dataConfig['andOrConditions']) ? $dataConfig['andOrConditions'] : [];
  2960.             $mustConditions = isset($dataConfig['mustConditions']) ? $dataConfig['mustConditions'] : [];
  2961.             $joinTableData = isset($dataConfig['joinTableData']) ? $dataConfig['joinTableData'] : [];
  2962.             $renderTextFormat = isset($dataConfig['renderTextFormat']) ? $dataConfig['renderTextFormat'] : '';
  2963.             $setDataForSingle = isset($dataConfig['setDataForSingle']) ? $dataConfig['setDataForSingle'] : 0;
  2964.             $dataId = isset($dataConfig['dataId']) ? $dataConfig['dataId'] : 0;
  2965.             $lastChildrenOnly = isset($dataConfig['lastChildrenOnly']) ? $dataConfig['lastChildrenOnly'] : 0;
  2966.             $parentOnly = isset($dataConfig['parentOnly']) ? $dataConfig['parentOnly'] : 0;
  2967.             $parentIdField = isset($dataConfig['parentIdField']) ? $dataConfig['parentIdField'] : 'parent_id';
  2968.             $skipDefaultCompanyId = isset($dataConfig['skipDefaultCompanyId']) ? $dataConfig['skipDefaultCompanyId'] : 1;
  2969.             $offset = isset($dataConfig['offset']) ? $dataConfig['offset'] : 0;
  2970.             $returnTotalMatchedEntriesFlag = isset($dataConfig['returnTotalMatched']) ? $dataConfig['returnTotalMatched'] : 0;
  2971.             $nextOffset 0;
  2972.             $totalMatchedEntries 0;
  2973.             $convertToObjectFieldList = isset($dataConfig['convertToObject']) ? $dataConfig['convertToObject'] : [];
  2974.             $convertDateToStringFieldList = isset($dataConfig['convertDateToStringFieldList']) ? $dataConfig['convertDateToStringFieldList'] : [];
  2975.             $orderByConditions = isset($dataConfig['orderByConditions']) ? $dataConfig['orderByConditions'] : [];
  2976.             $convertToUrl = isset($dataConfig['convertToUrl']) ? $dataConfig['convertToUrl'] : [];
  2977.             $fullPathList = isset($dataConfig['fullPathList']) ? $dataConfig['fullPathList'] : [];
  2978.             if (is_string($andConditions)) $andConditions json_decode($andConditionstrue);
  2979.             if (is_string($orConditions)) $orConditions json_decode($orConditionstrue);
  2980.             if (is_string($andOrConditions)) $andOrConditions json_decode($andOrConditionstrue);
  2981.             if (is_string($mustConditions)) $mustConditions json_decode($mustConditionstrue);
  2982.             if (is_string($joinTableData)) $joinTableData json_decode($joinTableDatatrue);
  2983.             if (is_string($convertToObjectFieldList)) $convertToObjectFieldList json_decode($convertToObjectFieldListtrue);
  2984.             if (is_string($orderByConditions)) $orderByConditions json_decode($orderByConditionstrue);
  2985.             if (is_string($convertToUrl)) $convertToUrl json_decode($convertToUrltrue);
  2986.             if (is_string($fullPathList)) $fullPathList json_decode($fullPathListtrue);
  2987. //            return new JsonResponse(array(
  2988. //                'dataSet'=>$dataSet,
  2989. //                'dataConfig'=>$dataConfig,
  2990. //                'hi'=>$this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' . $identifier . 'Config.json',
  2991. //                'hiD'=>file_get_contents($this->container->getParameter('kernel.root_dir') . '/../src/ApplicationBundle/Resources/config/api/' . $identifier . 'Config.json')
  2992. //            ));
  2993.             if ($table == '') {
  2994.                 $lastResult = array(
  2995.                     'success' => false,
  2996.                     'currentTs' => (new \Datetime())->format('U'),
  2997.                     'isMultiple' => $isMultiple,
  2998.                     'setValueArray' => $setValueArray,
  2999.                     'setValue' => $setValue,
  3000.                     'data' => $data,
  3001.                     'dataId' => $dataId,
  3002.                     'selectorId' => $selectorId,
  3003.                     'dataById' => $data_by_id,
  3004.                     'selectedId' => 0,
  3005.                     'ret_data' => isset($dataConfig['ret_data']) ? $dataConfig['ret_data'] : [],
  3006.                 );
  3007.             } else {
  3008.                 $restrictionData = array(
  3009. //            'table'=>'relevantField in restriction'
  3010.                     'warehouse_action' => 'warehouseActionIds',
  3011.                     'branch' => 'branchIds',
  3012.                     'warehouse' => 'warehouseIds',
  3013.                     'production_process_settings' => 'productionProcessIds',
  3014.                 );
  3015.                 $restrictionIdList = [];
  3016.                 $filterQryForCriteria "select ";
  3017.                 $selectQry "";
  3018. //        $selectQry=" `$table`.* ";
  3019.                 $selectFieldList = isset($dataConfig['selectFieldList']) ? $dataConfig['selectFieldList'] : ['*'];
  3020.                 $selectPrefix = isset($dataConfig['selectPrefix']) ? $dataConfig['selectPrefix'] : '';
  3021.                 if (is_string($selectFieldList)) $selectFieldList json_decode($selectFieldListtrue);
  3022.                 foreach ($selectFieldList as $selField) {
  3023.                     if ($selectQry != '')
  3024.                         $selectQry .= ", ";
  3025.                     if ($selField == '*')
  3026.                         $selectQry .= " `$table`.$selField ";
  3027.                     else if ($selField == 'count(*)' || $selField == '_RESULT_COUNT_') {
  3028.                         if ($selectPrefix == '')
  3029.                             $selectQry .= " count(*)  ";
  3030.                         else
  3031.                             $selectQry .= (" count(*  )  $selectPrefix"_RESULT_COUNT_ ");
  3032.                     } else {
  3033.                         if ($selectPrefix == '')
  3034.                             $selectQry .= " `$table`.`$selField` ";
  3035.                         else
  3036.                             $selectQry .= (" `$table`.`$selField`  $selectPrefix"$selField ");
  3037.                     }
  3038.                 }
  3039.                 $joinQry " from $table ";
  3040. //        $filterQryForCriteria = "select * from $table ";
  3041.                 foreach ($joinTableData as $joinIndex => $joinTableDatum) {
  3042. //            $conditionStr.=' 1=1 ';
  3043.                     $joinTableName = isset($joinTableDatum['tableName']) ? $joinTableDatum['tableName'] : '=';
  3044.                     $joinTableAlias $joinTableName '_' $joinIndex;
  3045.                     $joinTablePrimaryField = isset($joinTableDatum['joinFieldPrimary']) ? $joinTableDatum['joinFieldPrimary'] : ''//field of main table
  3046.                     $joinTableOnField = isset($joinTableDatum['joinOn']) ? $joinTableDatum['joinOn'] : ''//field of joining table
  3047.                     $fieldJoinType = isset($joinTableDatum['fieldJoinType']) ? $joinTableDatum['fieldJoinType'] : '=';
  3048.                     $tableJoinType = isset($joinTableDatum['tableJoinType']) ? $joinTableDatum['tableJoinType'] : 'join';//or inner join
  3049.                     $selectFieldList = isset($joinTableDatum['selectFieldList']) ? $joinTableDatum['selectFieldList'] : ['*'];
  3050.                     $selectPrefix = isset($joinTableDatum['selectPrefix']) ? $joinTableDatum['selectPrefix'] : '';
  3051.                     $joinMustConditions = isset($joinTableDatum['joinMustConditions']) ? $joinTableDatum['joinMustConditions'] : [];
  3052.                     $joinAndConditions = isset($joinTableDatum['joinAndConditions']) ? $joinTableDatum['joinAndConditions'] : [];
  3053.                     $joinAndOrConditions = isset($joinTableDatum['joinAndOrConditions']) ? $joinTableDatum['joinAndOrConditions'] : [];
  3054.                     $joinOrConditions = isset($joinTableDatum['joinOrConditions']) ? $joinTableDatum['joinOrConditions'] : [];
  3055.                     if (is_string($joinAndConditions)) $joinAndConditions json_decode($joinAndConditionstrue);
  3056.                     if (is_string($joinMustConditions)) $joinMustConditions json_decode($joinMustConditionstrue);
  3057.                     if (is_string($joinAndOrConditions)) $joinAndOrConditions json_decode($joinAndOrConditionstrue);
  3058.                     if (is_string($joinOrConditions)) $joinOrConditions json_decode($joinOrConditionstrue);
  3059.                     foreach ($selectFieldList as $selFieldFull) {
  3060.                         $selFieldArray=explode(' ',$selFieldFull);
  3061.                         $selField=$selFieldArray[0];
  3062.                         $selFieldAlias=$selFieldArray[1]??'';
  3063.                         if ($selField == '*')
  3064.                             $selectQry .= ", `$joinTableAlias`.$selField ";
  3065.                         else if ($selField == 'count(*)' || $selField == '_RESULT_COUNT_') {
  3066.                             if ($selectPrefix == '')
  3067.                                 $selectQry .= ", count(`$joinTableAlias`." $joinTableOnField ")  ";
  3068.                             else
  3069.                                 $selectQry .= (", count(`$joinTableAlias`." $joinTableOnField ")  $selectPrefix"_RESULT_COUNT_ ");
  3070.                         } else {
  3071.                             if ($selectPrefix == '')
  3072.                                 $selectQry .= ", `$joinTableAlias`.`$selField`  $selFieldAlias";
  3073.                             else
  3074.                                 $selectQry .= (", `$joinTableAlias`.`$selField`  $selectPrefix"$selField ");
  3075.                         }
  3076.                     }
  3077.                     $joinQry .= $tableJoinType $joinTableName $joinTableAlias on  ";
  3078. //            if($joinTablePrimaryField!='')
  3079. //                $joinQry .= "  `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
  3080. //            $joinAndString = '';
  3081.                     $joinMustString '';
  3082.                     if ($joinTablePrimaryField != '') {
  3083.                         if (!(strpos($joinTablePrimaryField'.') === false)) {
  3084.                             $joinQry .= "  `$joinTableAlias`.`$joinTableOnField`  $fieldJoinType $joinTablePrimaryField ";
  3085.                         } else
  3086.                             $joinQry .= "  `$joinTableAlias`.`$joinTableOnField`  $fieldJoinType `$table`.`$joinTablePrimaryField` ";
  3087.                     }
  3088.                     foreach ($joinMustConditions as $mustCondition) {
  3089. //            $conditionStr.=' 1=1 ';
  3090.                         $ctype = isset($mustCondition['type']) ? $mustCondition['type'] : '=';
  3091.                         $cfield = isset($mustCondition['field']) ? $mustCondition['field'] : '';
  3092.                         $aliasInCondition $table;
  3093.                         if (!(strpos($cfield'.') === false)) {
  3094.                             $fullCfieldArray explode('.'$cfield);
  3095.                             $aliasInCondition $fullCfieldArray[0];
  3096.                             $cfield $fullCfieldArray[1];
  3097.                         }
  3098.                         $cvalue = isset($mustCondition['value']) ? $mustCondition['value'] : $queryStringIndividual;
  3099.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3100.                             if ($joinMustString != '')
  3101.                                 $joinMustString .= " and ";
  3102.                             if ($ctype == 'like') {
  3103.                                 $joinMustString .= ("`$joinTableAlias`.$cfield like '%" $cvalue "%' ");
  3104.                                 $wordsBySpaces explode(' '$cvalue);
  3105.                                 foreach ($wordsBySpaces as $word) {
  3106.                                     if ($joinMustString != '')
  3107.                                         $joinMustString .= " and ";
  3108.                                     $joinMustString .= ("`$joinTableAlias`.$cfield like '%" $word "%' ");
  3109.                                 }
  3110.                             } else if ($ctype == 'not like') {
  3111.                                 $joinMustString .= ("`$joinTableAlias`.$cfield not like '%" $cvalue "%' ");
  3112.                                 $wordsBySpaces explode(' '$cvalue);
  3113.                                 foreach ($wordsBySpaces as $word) {
  3114.                                     if ($joinMustString != '')
  3115.                                         $joinMustString .= " and ";
  3116.                                     $joinMustString .= ("`$joinTableAlias`.$cfield not like '%" $word "%' ");
  3117.                                 }
  3118.                             } else if ($ctype == 'not_in') {
  3119.                                 $joinMustString .= " ( ";
  3120.                                 if (in_array('null'$cvalue)) {
  3121.                                     $joinMustString .= " `$joinTableAlias`.$cfield is not null";
  3122.                                     $cvalue array_diff($cvalue, ['null']);
  3123.                                     if (!empty($cvalue))
  3124.                                         $joinMustString .= " and ";
  3125.                                 }
  3126.                                 if (in_array(''$cvalue)) {
  3127.                                     $joinMustString .= "`$joinTableAlias`.$cfield != '' ";
  3128.                                     $cvalue array_diff($cvalue, ['']);
  3129.                                     if (!empty($cvalue))
  3130.                                         $joinMustString .= " and ";
  3131.                                 }
  3132.                                 $joinMustString .= "`$joinTableAlias`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3133.                             } else if ($ctype == 'in') {
  3134.                                 if (in_array('null'$cvalue)) {
  3135.                                     $joinMustString .= "`$joinTableAlias`.$cfield is null";
  3136.                                     $cvalue array_diff($cvalue, ['null']);
  3137.                                     if (!empty($cvalue))
  3138.                                         $joinMustString .= " and ";
  3139.                                 }
  3140.                                 if (in_array(''$cvalue)) {
  3141.                                     $joinMustString .= "`$joinTableAlias`.$cfield = '' ";
  3142.                                     $cvalue array_diff($cvalue, ['']);
  3143.                                     if (!empty($cvalue))
  3144.                                         $joinMustString .= " and ";
  3145.                                 }
  3146.                                 $joinMustString .= "`$joinTableAlias`.$cfield in (" implode(','$cvalue) . ") ";
  3147.                             } else if ($ctype == '=') {
  3148. //                        if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
  3149. //                            $fullCfieldArray = explode('.', $cfield);
  3150. //                            $aliasInCondition = $fullCfieldArray[0];
  3151. //                            $cfield = $fullCfieldArray[1];
  3152. //                        }
  3153.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3154.                                     $joinMustString .= "`$joinTableAlias`.$cfield is null ";
  3155.                                 else
  3156.                                     $joinMustString .= "`$joinTableAlias`.$cfield = $cvalue ";
  3157.                             } else if ($ctype == '!=') {
  3158.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3159.                                     $joinMustString .= "`$joinTableAlias`.$cfield is not null ";
  3160.                                 else
  3161.                                     $joinMustString .= "`$joinTableAlias`.$cfield != $cvalue ";
  3162.                             } else {
  3163.                                 if (is_string($cvalue))
  3164.                                     $joinMustString .= "`$joinTableAlias`.$cfield $ctype '" $cvalue "' ";
  3165.                                 else
  3166.                                     $joinMustString .= "`$joinTableAlias`.$cfield $ctype " $cvalue " ";
  3167.                             }
  3168.                         }
  3169.                     }
  3170. //            if ($joinMustString != '') {
  3171. //                if ($conditionStr != '')
  3172. //                    $conditionStr .= (" and (" . $joinMustString . ") ");
  3173. //                else
  3174. //                    $conditionStr .= ("  (" . $joinMustString . ") ");
  3175. //            }
  3176.                     if ($joinMustString != '') {
  3177.                         $joinQry .= (' and ' $joinMustString);
  3178. //                        $joinQry.=' and (';
  3179.                     }
  3180.                     $mustBracketDone 0;
  3181.                     $joinAndString '';
  3182. //                    if ($joinTablePrimaryField != '')
  3183. //                        $joinAndString .= "  `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
  3184.                     foreach ($joinAndConditions as $andCondition) {
  3185. //            $conditionStr.=' 1=1 ';
  3186.                         $ctype = isset($andCondition['type']) ? $andCondition['type'] : '=';
  3187.                         $cfield = isset($andCondition['field']) ? $andCondition['field'] : '';
  3188.                         $aliasInCondition $table;
  3189.                         if (!(strpos($cfield'.') === false)) {
  3190.                             $fullCfieldArray explode('.'$cfield);
  3191.                             $aliasInCondition $fullCfieldArray[0];
  3192.                             $cfield $fullCfieldArray[1];
  3193.                         }
  3194.                         $cvalue = isset($andCondition['value']) ? $andCondition['value'] : $queryStringIndividual;
  3195.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3196.                             if ($joinAndString != '')
  3197.                                 $joinAndString .= " and ";
  3198.                             if ($ctype == 'like') {
  3199.                                 $joinAndString .= ("`$joinTableAlias`.$cfield like '%" $cvalue "%' ");
  3200.                                 $wordsBySpaces explode(' '$cvalue);
  3201.                                 foreach ($wordsBySpaces as $word) {
  3202.                                     if ($joinAndString != '')
  3203.                                         $joinAndString .= " and ";
  3204.                                     $joinAndString .= ("`$joinTableAlias`.$cfield like '%" $word "%' ");
  3205.                                 }
  3206.                             } else if ($ctype == 'not like') {
  3207.                                 $joinAndString .= ("`$joinTableAlias`.$cfield not like '%" $cvalue "%' ");
  3208.                                 $wordsBySpaces explode(' '$cvalue);
  3209.                                 foreach ($wordsBySpaces as $word) {
  3210.                                     if ($joinAndString != '')
  3211.                                         $joinAndString .= " and ";
  3212.                                     $joinAndString .= ("`$joinTableAlias`.$cfield not like '%" $word "%' ");
  3213.                                 }
  3214.                             } else if ($ctype == 'not_in') {
  3215.                                 $joinAndString .= " ( ";
  3216.                                 if (in_array('null'$cvalue)) {
  3217.                                     $joinAndString .= " `$joinTableAlias`.$cfield is not null";
  3218.                                     $cvalue array_diff($cvalue, ['null']);
  3219.                                     if (!empty($cvalue))
  3220.                                         $joinAndString .= " and ";
  3221.                                 }
  3222.                                 if (in_array(''$cvalue)) {
  3223.                                     $joinAndString .= "`$joinTableAlias`.$cfield != '' ";
  3224.                                     $cvalue array_diff($cvalue, ['']);
  3225.                                     if (!empty($cvalue))
  3226.                                         $joinAndString .= " and ";
  3227.                                 }
  3228.                                 $joinAndString .= "`$joinTableAlias`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3229.                             } else if ($ctype == 'in') {
  3230.                                 if (in_array('null'$cvalue)) {
  3231.                                     $joinAndString .= "`$joinTableAlias`.$cfield is null";
  3232.                                     $cvalue array_diff($cvalue, ['null']);
  3233.                                     if (!empty($cvalue))
  3234.                                         $joinAndString .= " and ";
  3235.                                 }
  3236.                                 if (in_array(''$cvalue)) {
  3237.                                     $joinAndString .= "`$joinTableAlias`.$cfield = '' ";
  3238.                                     $cvalue array_diff($cvalue, ['']);
  3239.                                     if (!empty($cvalue))
  3240.                                         $joinAndString .= " and ";
  3241.                                 }
  3242.                                 $joinAndString .= "`$joinTableAlias`.$cfield in (" implode(','$cvalue) . ") ";
  3243.                             } else if ($ctype == '=') {
  3244. //                        if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
  3245. //                            $fullCfieldArray = explode('.', $cfield);
  3246. //                            $aliasInCondition = $fullCfieldArray[0];
  3247. //                            $cfield = $fullCfieldArray[1];
  3248. //                        }
  3249.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3250.                                     $joinAndString .= "`$joinTableAlias`.$cfield is null ";
  3251.                                 else
  3252.                                     $joinAndString .= "`$joinTableAlias`.$cfield = $cvalue ";
  3253.                             } else if ($ctype == '!=') {
  3254.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3255.                                     $joinAndString .= "`$joinTableAlias`.$cfield is not null ";
  3256.                                 else
  3257.                                     $joinAndString .= "`$joinTableAlias`.$cfield != $cvalue ";
  3258.                             } else {
  3259.                                 if (is_string($cvalue))
  3260.                                     $joinAndString .= "`$joinTableAlias`.$cfield $ctype '" $cvalue "' ";
  3261.                                 else
  3262.                                     $joinAndString .= "`$joinTableAlias`.$cfield $ctype " $cvalue " ";
  3263.                             }
  3264.                         }
  3265.                     }
  3266. //            if ($joinAndString != '') {
  3267. //                if ($conditionStr != '')
  3268. //                    $conditionStr .= (" and (" . $joinAndString . ") ");
  3269. //                else
  3270. //                    $conditionStr .= ("  (" . $joinAndString . ") ");
  3271. //            }
  3272.                     if ($joinAndString != '') {
  3273.                         if ($joinMustString != '' && $mustBracketDone == 0) {
  3274.                             $joinQry .= ' and (';
  3275.                             $mustBracketDone 1;
  3276.                         }
  3277.                         if ($joinQry != '')
  3278.                             $joinQry .= (" and (" $joinAndString ") ");
  3279.                         else
  3280.                             $joinQry .= ("  (" $joinAndString ") ");
  3281.                     }
  3282.                     $joinAndOrString "";
  3283.                     foreach ($joinAndOrConditions as $andOrCondition) {
  3284. //            $conditionStr.=' 1=1 ';
  3285.                         $ctype = isset($andOrCondition['type']) ? $andOrCondition['type'] : '=';
  3286.                         $cfield = isset($andOrCondition['field']) ? $andOrCondition['field'] : '';
  3287.                         $aliasInCondition $table;
  3288.                         if (!(strpos($cfield'.') === false)) {
  3289.                             $fullCfieldArray explode('.'$cfield);
  3290.                             $aliasInCondition $fullCfieldArray[0];
  3291.                             $cfield $fullCfieldArray[1];
  3292.                         }
  3293.                         $cvalue = isset($andOrCondition['value']) ? $andOrCondition['value'] : $queryStringIndividual;
  3294.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3295.                             if ($joinAndOrString != '')
  3296.                                 $joinAndOrString .= " or ";
  3297.                             if ($ctype == 'like') {
  3298.                                 $joinAndOrString .= ("`$joinTableAlias`.$cfield like '%" $cvalue "%' ");
  3299.                                 $wordsBySpaces explode(' '$cvalue);
  3300.                                 foreach ($wordsBySpaces as $word) {
  3301.                                     if ($joinAndOrString != '')
  3302.                                         $joinAndOrString .= " or ";
  3303.                                     $joinAndOrString .= ("`$joinTableAlias`.$cfield like '%" $word "%' ");
  3304.                                 }
  3305.                             } else if ($ctype == 'not like') {
  3306.                                 $joinAndOrString .= ("`$joinTableAlias`.$cfield not like '%" $cvalue "%' ");
  3307.                                 $wordsBySpaces explode(' '$cvalue);
  3308.                                 foreach ($wordsBySpaces as $word) {
  3309.                                     if ($joinAndOrString != '')
  3310.                                         $joinAndOrString .= " or ";
  3311.                                     $joinAndOrString .= ("`$joinTableAlias`.$cfield not like '%" $word "%' ");
  3312.                                 }
  3313.                             } else if ($ctype == 'not_in') {
  3314.                                 $joinAndOrString .= " ( ";
  3315.                                 if (in_array('null'$cvalue)) {
  3316.                                     $joinAndOrString .= " `$joinTableAlias`.$cfield is not null";
  3317.                                     $cvalue array_diff($cvalue, ['null']);
  3318.                                     if (!empty($cvalue))
  3319.                                         $joinAndOrString .= " or ";
  3320.                                 }
  3321.                                 if (in_array(''$cvalue)) {
  3322.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield != '' ";
  3323.                                     $cvalue array_diff($cvalue, ['']);
  3324.                                     if (!empty($cvalue))
  3325.                                         $joinAndOrString .= " or ";
  3326.                                 }
  3327.                                 $joinAndOrString .= "`$joinTableAlias`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3328.                             } else if ($ctype == 'in') {
  3329.                                 if (in_array('null'$cvalue)) {
  3330.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield is null";
  3331.                                     $cvalue array_diff($cvalue, ['null']);
  3332.                                     if (!empty($cvalue))
  3333.                                         $joinAndOrString .= " or ";
  3334.                                 }
  3335.                                 if (in_array(''$cvalue)) {
  3336.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield = '' ";
  3337.                                     $cvalue array_diff($cvalue, ['']);
  3338.                                     if (!empty($cvalue))
  3339.                                         $joinAndOrString .= " or ";
  3340.                                 }
  3341.                                 $joinAndOrString .= "`$joinTableAlias`.$cfield in (" implode(','$cvalue) . ") ";
  3342.                             } else if ($ctype == '=') {
  3343. //                        if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
  3344. //                            $fullCfieldArray = explode('.', $cfield);
  3345. //                            $aliasInCondition = $fullCfieldArray[0];
  3346. //                            $cfield = $fullCfieldArray[1];
  3347. //                        }
  3348.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3349.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield is null ";
  3350.                                 else
  3351.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield = $cvalue ";
  3352.                             } else if ($ctype == '!=') {
  3353.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3354.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield is not null ";
  3355.                                 else
  3356.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield != $cvalue ";
  3357.                             } else {
  3358.                                 if (is_string($cvalue))
  3359.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield $ctype '" $cvalue "' ";
  3360.                                 else
  3361.                                     $joinAndOrString .= "`$joinTableAlias`.$cfield $ctype " $cvalue " ";
  3362.                             }
  3363.                         }
  3364.                     }
  3365. //            if ($joinAndOrString != '')
  3366. //                $joinQry .= $joinAndOrString;
  3367.                     if ($joinAndOrString != '') {
  3368.                         if ($joinMustString != '' && $mustBracketDone == 0) {
  3369.                             $joinQry .= ' and (';
  3370.                             $mustBracketDone 1;
  3371.                         }
  3372.                         if ($joinQry != '')
  3373.                             $joinQry .= (" and (" $joinAndOrString ") ");
  3374.                         else
  3375.                             $joinQry .= ("  (" $joinAndOrString ") ");
  3376.                     }
  3377.                     //pika
  3378.                     $joinOrString "";
  3379.                     foreach ($joinOrConditions as $orCondition) {
  3380. //            $conditionStr.=' 1=1 ';
  3381.                         $ctype = isset($orCondition['type']) ? $orCondition['type'] : '=';
  3382.                         $cfield = isset($orCondition['field']) ? $orCondition['field'] : '';
  3383.                         $aliasInCondition $table;
  3384.                         if (!(strpos($cfield'.') === false)) {
  3385.                             $fullCfieldArray explode('.'$cfield);
  3386.                             $aliasInCondition $fullCfieldArray[0];
  3387.                             $cfield $fullCfieldArray[1];
  3388.                         }
  3389.                         $cvalue = isset($orCondition['value']) ? $orCondition['value'] : $queryStringIndividual;
  3390.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3391.                             if ($joinOrString != '' || $joinAndString != '' || $joinMustString != '')
  3392.                                 $joinOrString .= " or ";
  3393.                             if ($ctype == 'like') {
  3394.                                 $joinOrString .= ("`$joinTableAlias`.$cfield like '%" $cvalue "%' ");
  3395.                                 $wordsBySpaces explode(' '$cvalue);
  3396.                                 foreach ($wordsBySpaces as $word) {
  3397.                                     if ($joinOrString != '')
  3398.                                         $joinOrString .= " or ";
  3399.                                     $joinOrString .= ("`$joinTableAlias`.$cfield like '%" $word "%' ");
  3400.                                 }
  3401.                             } else if ($ctype == 'not like') {
  3402.                                 $joinOrString .= ("`$joinTableAlias`.$cfield not like '%" $cvalue "%' ");
  3403.                                 $wordsBySpaces explode(' '$cvalue);
  3404.                                 foreach ($wordsBySpaces as $word) {
  3405.                                     if ($joinOrString != '')
  3406.                                         $joinOrString .= " or ";
  3407.                                     $joinOrString .= ("`$joinTableAlias`.$cfield not like '%" $word "%' ");
  3408.                                 }
  3409.                             } else if ($ctype == 'not_in') {
  3410.                                 $joinOrString .= " ( ";
  3411.                                 if (in_array('null'$cvalue)) {
  3412.                                     $joinOrString .= " `$joinTableAlias`.$cfield is not null";
  3413.                                     $cvalue array_diff($cvalue, ['null']);
  3414.                                     if (!empty($cvalue))
  3415.                                         $joinOrString .= " or ";
  3416.                                 }
  3417.                                 if (in_array(''$cvalue)) {
  3418.                                     $joinOrString .= "`$joinTableAlias`.$cfield != '' ";
  3419.                                     $cvalue array_diff($cvalue, ['']);
  3420.                                     if (!empty($cvalue))
  3421.                                         $joinOrString .= " or ";
  3422.                                 }
  3423.                                 $joinOrString .= "`$joinTableAlias`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3424.                             } else if ($ctype == 'in') {
  3425.                                 if (in_array('null'$cvalue)) {
  3426.                                     $joinOrString .= "`$joinTableAlias`.$cfield is null";
  3427.                                     $cvalue array_diff($cvalue, ['null']);
  3428.                                     if (!empty($cvalue))
  3429.                                         $joinOrString .= " or ";
  3430.                                 }
  3431.                                 if (in_array(''$cvalue)) {
  3432.                                     $joinOrString .= "`$joinTableAlias`.$cfield = '' ";
  3433.                                     $cvalue array_diff($cvalue, ['']);
  3434.                                     if (!empty($cvalue))
  3435.                                         $joinOrString .= " or ";
  3436.                                 }
  3437.                                 $joinOrString .= "`$joinTableAlias`.$cfield in (" implode(','$cvalue) . ") ";
  3438.                             } else if ($ctype == '=') {
  3439. //                        if (!(strpos($cvalue, '.') === false) && !(strpos($cvalue, '_PRIMARY_TABLE_') === false)) {
  3440. //                            $fullCfieldArray = explode('.', $cfield);
  3441. //                            $aliasInCondition = $fullCfieldArray[0];
  3442. //                            $cfield = $fullCfieldArray[1];
  3443. //                        }
  3444.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3445.                                     $joinOrString .= "`$joinTableAlias`.$cfield is null ";
  3446.                                 else
  3447.                                     $joinOrString .= "`$joinTableAlias`.$cfield = $cvalue ";
  3448.                             } else if ($ctype == '!=') {
  3449.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3450.                                     $joinOrString .= "`$joinTableAlias`.$cfield is not null ";
  3451.                                 else
  3452.                                     $joinOrString .= "`$joinTableAlias`.$cfield != $cvalue ";
  3453.                             } else {
  3454.                                 if (is_string($cvalue))
  3455.                                     $joinOrString .= "`$joinTableAlias`.$cfield $ctype '" $cvalue "' ";
  3456.                                 else
  3457.                                     $joinOrString .= "`$joinTableAlias`.$cfield $ctype " $cvalue " ";
  3458.                             }
  3459.                         }
  3460.                     }
  3461. //            if ($joinOrString != '')
  3462. //                $joinQry .= $joinOrString;
  3463.                     if ($joinOrString != '') {
  3464.                         if ($joinMustString != '' && $mustBracketDone == 0) {
  3465.                             $joinQry .= ' and (';
  3466.                             $mustBracketDone 1;
  3467.                         }
  3468.                         if ($joinQry != '')
  3469.                             $joinQry .= (" or (" $joinOrString ") ");
  3470.                         else
  3471.                             $joinQry .= ("  (" $joinOrString ") ");
  3472.                     }
  3473.                     if ($joinMustString != '' && $mustBracketDone == 1) {
  3474.                         $joinQry .= ' ) ';
  3475.                     }
  3476. //
  3477. //                $joinQry .= "  `$joinTableAlias`.`$joinTableOnField` $fieldJoinType `$table`.`$joinTablePrimaryField` ";
  3478.                 }
  3479.                 $filterQryForCriteria .= $selectQry;
  3480.                 $filterQryForCriteria .= $joinQry;
  3481.                 if ($skipDefaultCompanyId == && $companyId != && !isset($dataConfig['entity_group']))
  3482.                     $filterQryForCriteria .= " where `$table`.`company_id`=" $companyId " ";
  3483.                 else
  3484.                     $filterQryForCriteria .= " where 1=1 ";
  3485.                 $conditionStr "";
  3486.                 $aliasInCondition $table;
  3487.                 if ($headMarkers != '' && $table == 'acc_accounts_head') {
  3488.                     $markerList explode(','$headMarkers);
  3489.                     $spMarkerQry "SELECT distinct accounts_head_id FROM acc_accounts_head where 1=1 ";
  3490.                     $markerPassedHeads = [];
  3491.                     foreach ($markerList as $mrkr) {
  3492.                         $spMarkerQry .= " and marker_hash like '%" $mrkr "%'";
  3493.                     }
  3494.                     $spStmt $em->getConnection()->fetchAllAssociative($spMarkerQry);
  3495.                     $spStmtResults $spStmt;
  3496.                     foreach ($spStmtResults as $ggres) {
  3497.                         $markerPassedHeads[] = $ggres['accounts_head_id'];
  3498.                     }
  3499.                     if (!empty($markerPassedHeads)) {
  3500.                         if ($conditionStr != '')
  3501.                             $conditionStr .= " and (";
  3502.                         else
  3503.                             $conditionStr .= " (";
  3504.                         if ($headMarkersStrictMatch != 1) {
  3505.                             foreach ($markerPassedHeads as $mh) {
  3506.                                 $conditionStr .= " `$aliasInCondition`.`path_tree` like'%/" $mh "/%' or ";
  3507.                             }
  3508.                         }
  3509.                         $conditionStr .= "  `$aliasInCondition`.`accounts_head_id` in (" implode(','$markerPassedHeads) . ") ";
  3510.                         $conditionStr .= " )";
  3511.                     }
  3512.                 }
  3513.                 if (isset($restrictionData[$table])) {
  3514.                     $userRestrictionData Users::getUserApplicationAccessSettings($em$userId)['options'];
  3515.                     if (isset($userRestrictionData[$restrictionData[$table]])) {
  3516.                         $restrictionIdList $userRestrictionData[$restrictionData[$table]];
  3517.                         if ($restrictionIdList == null)
  3518.                             $restrictionIdList = [];
  3519.                     }
  3520.                     if (!empty($restrictionIdList)) {
  3521.                         if ($conditionStr != '')
  3522.                             $conditionStr .= " and ";
  3523.                         $conditionStr .= " `$table`.$valueField in (" implode(','$restrictionIdList) . ") ";
  3524.                     }
  3525.                 }
  3526. //        $aliasInCondition = $table;
  3527.                 if (!empty($setValueArray) || $selectAll == 1) {
  3528.                     if (!empty($setValueArray)) {
  3529.                         if ($conditionStr != '')
  3530.                             $conditionStr .= " and ";
  3531.                         $conditionStr .= " `$aliasInCondition`.$valueField in (" implode(','$setValueArray) . ") ";
  3532.                     }
  3533.                 } else {
  3534.                     $andString '';
  3535.                     foreach ($andConditions as $andCondition) {
  3536. //            $conditionStr.=' 1=1 ';
  3537.                         $ctype = isset($andCondition['type']) ? $andCondition['type'] : '=';
  3538.                         $cfield = isset($andCondition['field']) ? $andCondition['field'] : '';
  3539.                         $aliasInCondition $table;
  3540.                         if (!(strpos($cfield'.') === false)) {
  3541.                             $fullCfieldArray explode('.'$cfield);
  3542.                             $aliasInCondition $fullCfieldArray[0];
  3543.                             $cfield $fullCfieldArray[1];
  3544.                         }
  3545.                         $cvalue = isset($andCondition['value']) ? $andCondition['value'] : $queryStringIndividual;
  3546.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3547.                             if ($andString != '')
  3548.                                 $andString .= " and ";
  3549.                             if ($ctype == 'like') {
  3550.                                 $andString .= ("`$aliasInCondition`.$cfield like '%" $cvalue "%' ");
  3551.                                 $wordsBySpaces explode(' '$cvalue);
  3552.                                 foreach ($wordsBySpaces as $word) {
  3553.                                     if ($andString != '')
  3554.                                         $andString .= " and ";
  3555.                                     $andString .= ("`$aliasInCondition`.$cfield like '%" $word "%' ");
  3556.                                 }
  3557.                             } else if ($ctype == 'not like') {
  3558.                                 $andString .= ("`$aliasInCondition`.$cfield not like '%" $cvalue "%' ");
  3559.                                 $wordsBySpaces explode(' '$cvalue);
  3560.                                 foreach ($wordsBySpaces as $word) {
  3561.                                     if ($andString != '')
  3562.                                         $andString .= " and ";
  3563.                                     $andString .= ("`$aliasInCondition`.$cfield not like '%" $word "%' ");
  3564.                                 }
  3565.                             } else if ($ctype == 'not_in') {
  3566.                                 $andString .= " ( ";
  3567.                                 if (in_array('null'$cvalue)) {
  3568.                                     $andString .= " `$aliasInCondition`.$cfield is not null";
  3569.                                     $cvalue array_diff($cvalue, ['null']);
  3570.                                     if (!empty($cvalue))
  3571.                                         $andString .= " and ";
  3572.                                 }
  3573.                                 if (in_array(''$cvalue)) {
  3574.                                     $andString .= "`$aliasInCondition`.$cfield != '' ";
  3575.                                     $cvalue array_diff($cvalue, ['']);
  3576.                                     if (!empty($cvalue))
  3577.                                         $andString .= " and ";
  3578.                                 }
  3579.                                 $andString .= "`$aliasInCondition`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3580.                             } else if ($ctype == 'in') {
  3581.                                 if (in_array('null'$cvalue)) {
  3582.                                     $andString .= "`$aliasInCondition`.$cfield is null";
  3583.                                     $cvalue array_diff($cvalue, ['null']);
  3584.                                     if (!empty($cvalue))
  3585.                                         $andString .= " and ";
  3586.                                 }
  3587.                                 if (in_array(''$cvalue)) {
  3588.                                     $andString .= "`$aliasInCondition`.$cfield = '' ";
  3589.                                     $cvalue array_diff($cvalue, ['']);
  3590.                                     if (!empty($cvalue))
  3591.                                         $andString .= " and ";
  3592.                                 }
  3593.                                 $andString .= "`$aliasInCondition`.$cfield in (" implode(','$cvalue) . ") ";
  3594.                             } else if ($ctype == '=') {
  3595.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3596.                                     $andString .= "`$aliasInCondition`.$cfield is null ";
  3597.                                 else
  3598.                                     if (is_string($cvalue))
  3599.                                         $andString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3600.                                     else
  3601.                                         $andString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3602.                             } else if ($ctype == '!=') {
  3603.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3604.                                     $andString .= "`$aliasInCondition`.$cfield is not null ";
  3605.                                 else
  3606.                                     $andString .= "`$aliasInCondition`.$cfield != $cvalue ";
  3607.                             } else {
  3608.                                 if (is_string($cvalue))
  3609.                                     $andString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3610.                                 else
  3611.                                     $andString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3612.                             }
  3613.                         }
  3614.                     }
  3615.                     if ($andString != '') {
  3616.                         if ($conditionStr != '')
  3617.                             $conditionStr .= (" and (" $andString ") ");
  3618.                         else
  3619.                             $conditionStr .= ("  (" $andString ") ");
  3620.                     }
  3621.                     $orString '';
  3622.                     foreach ($orConditions as $orCondition) {
  3623.                         $ctype = isset($orCondition['type']) ? $orCondition['type'] : '=';
  3624.                         $cfield = isset($orCondition['field']) ? $orCondition['field'] : '';
  3625.                         $aliasInCondition $table;
  3626.                         if (!(strpos($cfield'.') === false)) {
  3627.                             $fullCfieldArray explode('.'$cfield);
  3628.                             $aliasInCondition $fullCfieldArray[0];
  3629.                             $cfield $fullCfieldArray[1];
  3630.                         }
  3631.                         $cvalue = isset($orCondition['value']) ? $orCondition['value'] : $queryStringIndividual;
  3632.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3633.                             if ($orString != '')
  3634.                                 $orString .= " or ";
  3635.                             if ($ctype == 'like') {
  3636.                                 $orString .= ("`$aliasInCondition`.$cfield like '%" $cvalue "%' ");
  3637.                                 $wordsBySpaces explode(' '$cvalue);
  3638.                                 foreach ($wordsBySpaces as $word) {
  3639.                                     if ($orString != '')
  3640.                                         $orString .= " or ";
  3641.                                     $orString .= ("`$aliasInCondition`.$cfield like '%" $word "%' ");
  3642.                                 }
  3643.                             } else if ($ctype == 'not like') {
  3644.                                 $orString .= ("`$aliasInCondition`.$cfield not like '%" $cvalue "%' ");
  3645.                                 $wordsBySpaces explode(' '$cvalue);
  3646.                                 foreach ($wordsBySpaces as $word) {
  3647.                                     if ($orString != '')
  3648.                                         $orString .= " or ";
  3649.                                     $orString .= ("`$aliasInCondition`.$cfield not like '%" $word "%' ");
  3650.                                 }
  3651.                             } else if ($ctype == 'not_in') {
  3652.                                 $orString .= " ( ";
  3653.                                 if (in_array('null'$cvalue)) {
  3654.                                     $orString .= " `$aliasInCondition`.$cfield is not null";
  3655.                                     $cvalue array_diff($cvalue, ['null']);
  3656.                                     if (!empty($cvalue))
  3657.                                         $orString .= " or ";
  3658.                                 }
  3659.                                 if (in_array(''$cvalue)) {
  3660.                                     $orString .= "`$aliasInCondition`.$cfield != '' ";
  3661.                                     $cvalue array_diff($cvalue, ['']);
  3662.                                     if (!empty($cvalue))
  3663.                                         $orString .= " or ";
  3664.                                 }
  3665.                                 $orString .= "`$aliasInCondition`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3666.                             } else if ($ctype == 'in') {
  3667.                                 $orString .= " ( ";
  3668.                                 if (in_array('null'$cvalue)) {
  3669.                                     $orString .= " `$aliasInCondition`.$cfield is null";
  3670.                                     $cvalue array_diff($cvalue, ['null']);
  3671.                                     if (!empty($cvalue))
  3672.                                         $orString .= " or ";
  3673.                                 }
  3674.                                 if (in_array(''$cvalue)) {
  3675.                                     $orString .= "`$aliasInCondition`.$cfield = '' ";
  3676.                                     $cvalue array_diff($cvalue, ['']);
  3677.                                     if (!empty($cvalue))
  3678.                                         $orString .= " or ";
  3679.                                 }
  3680.                                 $orString .= "`$aliasInCondition`.$cfield in (" implode(','$cvalue) . ") ) ";
  3681.                             } else if ($ctype == '=') {
  3682.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3683.                                     $orString .= "`$aliasInCondition`.$cfield is null ";
  3684.                                 else
  3685.                                     if (is_string($cvalue))
  3686.                                         $orString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3687.                                     else
  3688.                                         $orString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3689.                             } else if ($ctype == '!=') {
  3690.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3691.                                     $orString .= "`$aliasInCondition`.$cfield is not null ";
  3692.                                 else
  3693.                                     $orString .= "`$aliasInCondition`.$cfield != $cvalue ";
  3694.                             } else {
  3695.                                 if (is_string($cvalue))
  3696.                                     $orString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3697.                                 else
  3698.                                     $orString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3699.                             }
  3700.                         }
  3701.                     }
  3702.                     if ($orString != '') {
  3703.                         if ($conditionStr != '')
  3704.                             $conditionStr .= (" or (" $orString ") ");
  3705.                         else
  3706.                             $conditionStr .= ("  (" $orString ") ");
  3707.                     }
  3708.                     $andOrString '';
  3709.                     foreach ($andOrConditions as $andOrCondition) {
  3710.                         $ctype = isset($andOrCondition['type']) ? $andOrCondition['type'] : '=';
  3711.                         $cfield = isset($andOrCondition['field']) ? $andOrCondition['field'] : '';
  3712.                         $aliasInCondition $table;
  3713.                         if (!(strpos($cfield'.') === false)) {
  3714.                             $fullCfieldArray explode('.'$cfield);
  3715.                             $aliasInCondition $fullCfieldArray[0];
  3716.                             $cfield $fullCfieldArray[1];
  3717.                         }
  3718.                         $cvalue = isset($andOrCondition['value']) ? $andOrCondition['value'] : $queryStringIndividual;
  3719.                         if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3720.                             if ($andOrString != '')
  3721.                                 $andOrString .= " or ";
  3722.                             if ($ctype == 'like') {
  3723.                                 $andOrString .= (" `$aliasInCondition`.$cfield like '%" $cvalue "%' ");
  3724.                                 $wordsBySpaces explode(' '$cvalue);
  3725.                                 foreach ($wordsBySpaces as $word) {
  3726.                                     if ($andOrString != '')
  3727.                                         $andOrString .= " or ";
  3728.                                     $andOrString .= ("`$aliasInCondition`.$cfield like '%" $word "%' ");
  3729.                                 }
  3730.                             } else if ($ctype == 'not like') {
  3731.                                 $andOrString .= (" `$aliasInCondition`.$cfield not like '%" $cvalue "%' ");
  3732.                                 $wordsBySpaces explode(' '$cvalue);
  3733.                                 foreach ($wordsBySpaces as $word) {
  3734.                                     if ($andOrString != '')
  3735.                                         $andOrString .= " or ";
  3736.                                     $andOrString .= ("`$aliasInCondition`.$cfield not like '%" $word "%' ");
  3737.                                 }
  3738.                             } else if ($ctype == 'in') {
  3739.                                 $andOrString .= " ( ";
  3740.                                 if (in_array('null'$cvalue)) {
  3741.                                     $andOrString .= " `$aliasInCondition`.$cfield is null";
  3742.                                     $cvalue array_diff($cvalue, ['null']);
  3743.                                     if (!empty($cvalue))
  3744.                                         $andOrString .= " or ";
  3745.                                 }
  3746.                                 if (in_array(''$cvalue)) {
  3747.                                     $andOrString .= "`$aliasInCondition`.$cfield = '' ";
  3748.                                     $cvalue array_diff($cvalue, ['']);
  3749.                                     if (!empty($cvalue))
  3750.                                         $andOrString .= " or ";
  3751.                                 }
  3752.                                 if (!empty($cvalue))
  3753.                                     $andOrString .= " `$aliasInCondition`.$cfield in (" implode(','$cvalue) . ") ) ";
  3754.                                 else
  3755.                                     $andOrString .= "  ) ";
  3756.                             } else if ($ctype == 'not_in') {
  3757.                                 $andOrString .= " ( ";
  3758.                                 if (in_array('null'$cvalue)) {
  3759.                                     $andOrString .= " `$aliasInCondition`.$cfield is not null";
  3760.                                     $cvalue array_diff($cvalue, ['null']);
  3761.                                     if (!empty($cvalue))
  3762.                                         $andOrString .= " or ";
  3763.                                 }
  3764.                                 if (in_array(''$cvalue)) {
  3765.                                     $andOrString .= "`$aliasInCondition`.$cfield != '' ";
  3766.                                     $cvalue array_diff($cvalue, ['']);
  3767.                                     if (!empty($cvalue))
  3768.                                         $andOrString .= " or ";
  3769.                                 }
  3770.                                 if (!empty($cvalue))
  3771.                                     $andOrString .= "`$aliasInCondition`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3772.                                 else
  3773.                                     $andOrString .= "  ) ";
  3774.                             } else if ($ctype == '=') {
  3775.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3776.                                     $andOrString .= "`$aliasInCondition`.$cfield is null ";
  3777.                                 else
  3778.                                     if (is_string($cvalue))
  3779.                                         $andOrString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3780.                                     else
  3781.                                         $andOrString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3782.                             } else if ($ctype == '!=') {
  3783.                                 if ($cvalue == 'null' || $cvalue == 'Null')
  3784.                                     $andOrString .= "`$aliasInCondition`.$cfield is not null ";
  3785.                                 else
  3786.                                     $andOrString .= "`$aliasInCondition`.$cfield != $cvalue ";
  3787.                             } else {
  3788.                                 if (is_string($cvalue))
  3789.                                     $andOrString .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3790.                                 else
  3791.                                     $andOrString .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3792.                             }
  3793.                         }
  3794.                     }
  3795.                     if ($andOrString != '') {
  3796.                         if ($conditionStr != '')
  3797.                             $conditionStr .= (" and (" $andOrString ") ");
  3798.                         else
  3799.                             $conditionStr .= ("  (" $andOrString ") ");
  3800.                     }
  3801.                 }
  3802.                 $mustStr '';
  3803. ///now must conditions
  3804.                 foreach ($mustConditions as $mustCondition) {
  3805. //            $conditionStr.=' 1=1 ';
  3806.                     $ctype = isset($mustCondition['type']) ? $mustCondition['type'] : '=';
  3807.                     $cfield = isset($mustCondition['field']) ? $mustCondition['field'] : '';
  3808.                     $aliasInCondition $table;
  3809.                     if (!(strpos($cfield'.') === false)) {
  3810.                         $fullCfieldArray explode('.'$cfield);
  3811.                         $aliasInCondition $fullCfieldArray[0];
  3812.                         $cfield $fullCfieldArray[1];
  3813.                     }
  3814.                     $cvalue = isset($mustCondition['value']) ? $mustCondition['value'] : $queryStringIndividual;
  3815.                     if ($cfield != '' && $cvalue != '_EMPTY_' && $cvalue != '' && $cvalue != '#setValue:') {
  3816.                         if ($mustStr != '')
  3817.                             $mustStr .= " and ";
  3818.                         if ($ctype == 'like') {
  3819.                             $mustStr .= ("(`$aliasInCondition`.$cfield like '%" $cvalue "%' ");
  3820.                             $wordsBySpaces explode(' '$cvalue);
  3821.                             foreach ($wordsBySpaces as $word) {
  3822.                                 if ($mustStr != '')
  3823.                                     $mustStr .= " or ";
  3824.                                 $mustStr .= ("`$aliasInCondition`.$cfield like '%" $word "%' ");
  3825.                             }
  3826.                             $mustStr .= " )";
  3827.                         } else if ($ctype == 'not like') {
  3828.                             $mustStr .= ("`$aliasInCondition`.$cfield not like '%" $cvalue "%' ");
  3829.                             $wordsBySpaces explode(' '$cvalue);
  3830.                             foreach ($wordsBySpaces as $word) {
  3831.                                 if ($mustStr != '')
  3832.                                     $mustStr .= " and ";
  3833.                                 $mustStr .= ("`$aliasInCondition`.$cfield not like '%" $word "%' ");
  3834.                             }
  3835.                         } else if ($ctype == 'in') {
  3836.                             $mustStr .= " ( ";
  3837.                             if (in_array('null'$cvalue)) {
  3838.                                 $mustStr .= " `$aliasInCondition`.$cfield is null";
  3839.                                 $cvalue array_diff($cvalue, ['null']);
  3840.                                 if (!empty($cvalue))
  3841.                                     $mustStr .= " or ";
  3842.                             }
  3843.                             if (in_array(''$cvalue)) {
  3844.                                 $mustStr .= "`$aliasInCondition`.$cfield = '' ";
  3845.                                 $cvalue array_diff($cvalue, ['']);
  3846.                                 if (!empty($cvalue))
  3847.                                     $mustStr .= " or ";
  3848.                             }
  3849.                             $mustStr .= "`$aliasInCondition`.$cfield in (" implode(','$cvalue) . ") ) ";
  3850.                         } else if ($ctype == 'not_in') {
  3851.                             $mustStr .= " ( ";
  3852.                             if (in_array('null'$cvalue)) {
  3853.                                 $mustStr .= " `$aliasInCondition`.$cfield is not null";
  3854.                                 $cvalue array_diff($cvalue, ['null']);
  3855.                                 if (!empty($cvalue))
  3856.                                     $mustStr .= " and ";
  3857.                             }
  3858.                             if (in_array(''$cvalue)) {
  3859.                                 $mustStr .= "`$aliasInCondition`.$cfield != '' ";
  3860.                                 $cvalue array_diff($cvalue, ['']);
  3861.                                 if (!empty($cvalue))
  3862.                                     $mustStr .= " and ";
  3863.                             }
  3864.                             $mustStr .= "`$aliasInCondition`.$cfield not in (" implode(','$cvalue) . ") ) ";
  3865.                         } else if ($ctype == '=') {
  3866.                             if ($cvalue == 'null' || $cvalue == 'Null')
  3867.                                 $mustStr .= "`$aliasInCondition`.$cfield is null ";
  3868.                             else
  3869.                                 if (is_string($cvalue))
  3870.                                     $mustStr .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3871.                                 else
  3872.                                     $mustStr .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3873.                         } else if ($ctype == '!=') {
  3874.                             if ($cvalue == 'null' || $cvalue == 'Null')
  3875.                                 $mustStr .= "`$aliasInCondition`.$cfield is not null ";
  3876.                             else
  3877.                                 $mustStr .= "`$aliasInCondition`.$cfield != $cvalue ";
  3878.                         } else {
  3879.                             if (is_string($cvalue))
  3880.                                 $mustStr .= "`$aliasInCondition`.$cfield $ctype '" $cvalue "' ";
  3881.                             else
  3882.                                 $mustStr .= "`$aliasInCondition`.$cfield $ctype " $cvalue " ";
  3883.                         }
  3884.                     }
  3885.                 }
  3886.                 if ($mustStr != '') {
  3887.                     if ($conditionStr != '')
  3888.                         $conditionStr .= (" and (" $mustStr ") ");
  3889.                     else
  3890.                         $conditionStr .= ("  (" $mustStr ") ");
  3891.                 }
  3892.                 if ($conditionStr != '')
  3893.                     $filterQryForCriteria .= (" and (" $conditionStr ") ");
  3894.                 if ($lastChildrenOnly == 1) {
  3895.                     if ($filterQryForCriteria != '')
  3896.                         $filterQryForCriteria .= ' and';
  3897.                     $filterQryForCriteria .= "`$table`.`$valueField` not in ( select distinct $parentIdField from  $table)";
  3898.                 } else if ($parentOnly == 1) {
  3899.                     if ($filterQryForCriteria != '')
  3900.                         $filterQryForCriteria .= ' and';
  3901.                     $filterQryForCriteria .= "`$table`.`$valueField`  in ( select distinct $parentIdField from  $table)";
  3902.                 }
  3903.                 if (!empty($orderByConditions)) {
  3904.                     $filterQryForCriteria .= "  order by ";
  3905.                     $fone 1;
  3906.                     foreach ($orderByConditions as $orderByCondition) {
  3907.                         if ($fone != 1) {
  3908.                             $filterQryForCriteria .= " , ";
  3909.                         }
  3910.                         if (isset($orderByCondition['valueList'])) {
  3911.                             if (is_string($orderByCondition['valueList'])) $orderByCondition['valueList'] = json_decode($orderByCondition['valueList'], true);
  3912.                             if ($orderByCondition['valueList'] == null)
  3913.                                 $orderByCondition['valueList'] = [];
  3914.                             $filterQryForCriteria .= "   field(" $orderByCondition['field'] . "," implode(','$orderByCondition['valueList']) . "," $orderByCondition['field'] . ") " $orderByCondition['sortType'] . " ";
  3915.                         } else
  3916.                             $filterQryForCriteria .= " " $orderByCondition['field'] . " " $orderByCondition['sortType'] . " ";
  3917.                         $fone 0;
  3918.                     }
  3919.                 }
  3920.                 if ($returnTotalMatchedEntriesFlag == 1) {
  3921. //            $stmt = $em->getConnection()->fetchAllAssociative($get_kids_sql);
  3922. //
  3923. //            $get_kids = $stmt;
  3924.                 }
  3925.                 if ($filterQryForCriteria != '')
  3926.                     if (!empty($setValueArray) || $selectAll == 1) {
  3927.                     } else {
  3928.                         if ($itemLimit != '_ALL_')
  3929.                             $filterQryForCriteria .= "  limit $offset$itemLimit ";
  3930.                         else
  3931.                             $filterQryForCriteria .= "  limit $offset, 18446744073709551615 ";
  3932.                     }
  3933.                 $get_kids_sql $filterQryForCriteria;
  3934.                 $stmt $em->getConnection()->fetchAllAssociative($get_kids_sql);
  3935.                 $get_kids $stmt;
  3936.                 $selectedId 0;
  3937.                 if ($table == 'warehouse_action') {
  3938.                     if (empty($get_kids)) {
  3939.                         $get_kids_sql_2 "select * from warehouse_action";
  3940.                         $stmt $em->getConnection()->fetchAllAssociative($get_kids_sql_2);
  3941.                         $get_kids2 $stmt;
  3942.                         if (empty($get_kids2))
  3943.                             $get_kids GeneralConstant::$warehouse_action_list;
  3944.                     }
  3945.                 }
  3946.                 if (!empty($get_kids)) {
  3947.                     $nextOffset $offset count($get_kids);
  3948.                     $nextOffset++;
  3949.                     foreach ($get_kids as $pa) {
  3950.                         if (!empty($setValueArray) && $selectAll == 0) {
  3951.                             if (!in_array($pa[$valueField], $setValueArray))
  3952.                                 continue;
  3953.                         }
  3954.                         if (!empty($restrictionIdList)) {
  3955.                             if (!in_array($pa[$valueField], $restrictionIdList))
  3956.                                 continue;
  3957.                         }
  3958.                         if ($selectAll == 1) {
  3959.                             $setValueArray[] = $pa[$valueField];
  3960.                             $setValue $pa[$valueField];
  3961.                         } else if (count($get_kids) == && $setDataForSingle == 1) {
  3962.                             $setValueArray[] = $pa[$valueField];
  3963.                             $setValue $pa[$valueField];
  3964.                         }
  3965.                         if ($valueField != '')
  3966.                             $pa['value'] = $pa[$valueField];
  3967.                         $renderedText $renderTextFormat;
  3968.                         $compare_array = [];
  3969.                         if ($renderTextFormat != '') {
  3970.                             $renderedText $renderTextFormat;
  3971.                             $compare_arrayFull = [];
  3972.                             $compare_array = [];
  3973.                             $toBeReplacedData = array(//                        'curr'=>'tobereplaced'
  3974.                             );
  3975.                             preg_match_all("/__\w+__/"$renderedText$compare_arrayFull);
  3976.                             if (isset($compare_arrayFull[0]))
  3977.                                 $compare_array $compare_arrayFull[0];
  3978. //                   $compare_array= preg_split("/__\w+__/",$renderedText);
  3979.                             foreach ($compare_array as $cmpdt) {
  3980.                                 $tbr str_replace("__"""$cmpdt);
  3981.                                 if ($tbr != '') {
  3982.                                     if (isset($pa[$tbr])) {
  3983.                                         if ($pa[$tbr] == null)
  3984.                                             $renderedText str_replace($cmpdt''$renderedText);
  3985.                                         else
  3986.                                             $renderedText str_replace($cmpdt$pa[$tbr], $renderedText);
  3987.                                     } else {
  3988.                                         $renderedText str_replace($cmpdt''$renderedText);
  3989.                                     }
  3990.                                 }
  3991.                             }
  3992.                         }
  3993.                         $pa['rendered_text'] = $renderedText;
  3994.                         $pa['text'] = ($textField != '' $pa[$textField] : '');
  3995. //                $pa['compare_array'] = $compare_array;
  3996.                         foreach ($convertToObjectFieldList as $convField) {
  3997.                             if (isset($pa[$convField])) {
  3998.                                 $taA json_decode($pa[$convField], true);
  3999.                                 if ($taA == null$taA = [];
  4000.                                 $pa[$convField] = $taA;
  4001.                             } else {
  4002.                                 $pa[$convField] = [];
  4003.                             }
  4004.                         }
  4005.                         foreach ($convertDateToStringFieldList as $convField) {
  4006.                             if (is_array($convField)) {
  4007.                                 $fld $convField['field'];
  4008.                                 $frmt = isset($convField['format']) ? $convField['format'] : 'Y-m-d H:i:s';
  4009.                             } else {
  4010.                                 $fld $convField;
  4011.                                 $frmt 'Y-m-d H:i:s';
  4012.                             }
  4013.                             if (isset($pa[$fld])) {
  4014.                                 $taA = new \DateTime($pa[$fld]);
  4015.                                 $pa[$fld] = $taA->format($frmt);
  4016.                             }
  4017.                         }
  4018.                         foreach ($convertToUrl as $convField) {
  4019. //
  4020. //                            $fld = $convField;
  4021. //
  4022. //
  4023. //                            if (isset($pa[$fld])) {
  4024. //
  4025. //
  4026. //                                $pa[$fld] =
  4027. //                                    $this->generateUrl(
  4028. //                                        'dashboard', [
  4029. //
  4030. //                                    ], UrlGenerator::ABSOLUTE_URL
  4031. //                                    ).'/'.$pa[$fld];
  4032. //
  4033. //                            }
  4034.                         }
  4035.                         foreach ($fullPathList as $pathField) {
  4036.                             $fld $pathField;
  4037.                             if (isset($pa[$fld])) {
  4038.                                 if ($pa[$fld] != '' && $pa[$fld] != null) {
  4039.                                     $pa[$fld] = ($this->generateUrl(
  4040.                                             'dashboard', [
  4041.                                         ], UrlGenerator::ABSOLUTE_URL
  4042.                                         ) . $pa[$fld]);
  4043.                                 }
  4044.                             }
  4045.                         }
  4046.                         $pa['currentTs'] = (new \Datetime())->format('U');
  4047.                         $data[] = $pa;
  4048.                         if ($valueField != '') {
  4049.                             $data_by_id[$pa[$valueField]] = $pa;
  4050.                             $selectedId $pa[$valueField];
  4051.                         }
  4052.                     }
  4053.                 }
  4054.                 if ($dataOnly == 1)
  4055.                     $lastResult = array(
  4056.                         'success' => true,
  4057.                         'data' => $data,
  4058.                         'currentTs' => (new \Datetime())->format('U'),
  4059.                         'restrictionIdList' => $restrictionIdList,
  4060.                         'nextOffset' => $nextOffset,
  4061.                         'totalMatchedEntries' => $totalMatchedEntries,
  4062.                         'ret_data' => isset($dataConfig['ret_data']) ? $dataConfig['ret_data'] : [],
  4063.                     );
  4064.                 else
  4065.                     $lastResult = array(
  4066.                         'success' => true,
  4067.                         'data' => $data,
  4068.                         'tableName' => $table,
  4069.                         'setValue' => $setValue,
  4070.                         'currentTs' => (new \Datetime())->format('U'),
  4071.                         'restrictionIdList' => $restrictionIdList,
  4072.                         'andConditions' => $andConditions,
  4073.                         'queryStr' => $queryStringIndividual,
  4074.                         'isMultiple' => $isMultiple,
  4075.                         'nextOffset' => $nextOffset,
  4076.                         'totalMatchedEntries' => $totalMatchedEntries,
  4077.                         'selectorId' => $selectorId,
  4078.                         'setValueArray' => $setValueArray,
  4079.                         'silentChangeSelectize' => $silentChangeSelectize,
  4080.                         'convertToObjectFieldList' => $convertToObjectFieldList,
  4081.                         'conditionStr' => $conditionStr,
  4082. //                    'andStr' => $andString,
  4083. //                    'andOrStr' => $andOrString,
  4084.                         'dataById' => $data_by_id,
  4085.                         'selectedId' => $selectedId,
  4086.                         'dataId' => $dataId,
  4087.                         'ret_data' => isset($dataConfig['ret_data']) ? $dataConfig['ret_data'] : [],
  4088.                     );
  4089.             }
  4090.             $allResult[] = $lastResult;
  4091.         }
  4092.         if ($isSingleDataset == 1)
  4093.             return new JsonResponse($lastResult);
  4094.         else
  4095.             return new JsonResponse($allResult);
  4096.     }
  4097.     public function DecodeEncDataAction(Request $request$apiCode 0$encData '')
  4098.     {
  4099. //        $userCategory=$request->request->has('userCategory');
  4100.         $encryptedData = [];
  4101.         $retData = array(
  4102.             'success' => false,
  4103.             'message' => 'Invalid API',
  4104.             'data' => [],
  4105.             'decryptedStr' => '',
  4106.         );
  4107.         $allowedApiCodes = [
  4108.             998,
  4109.             889
  4110.         ];
  4111.         if (in_array($apiCode$allowedApiCodes)) {
  4112.             if ($encData != '') {
  4113.                 $decryptedStr $this->get('url_encryptor')->decrypt($encData);
  4114.                 $encryptedData json_decode($decryptedStrtrue);
  4115.                 if ($encryptedData == null$encryptedData = [];
  4116.                 $retData['success'] = true;
  4117.                 $retData['message'] = '';
  4118.                 $retData['decryptedStr'] = $decryptedStr;
  4119.                 $retData['data'] = $encryptedData;
  4120.             } else {
  4121.                 $retData['success'] = false;
  4122.                 $retData['message'] = 'No Data';
  4123.             }
  4124.         }
  4125.         $response = new JsonResponse($retData);
  4126.         $response->headers->set('Access-Control-Allow-Origin''*');
  4127.         return $response;
  4128.     }
  4129.     public function SendOtpAjaxAction(Request $request$startFrom 0)
  4130.     {
  4131.         $em $this->getDoctrine()->getManager();
  4132.         $em_goc $this->getDoctrine()->getManager('company_group');
  4133.         $session $request->getSession();
  4134.         $message "";
  4135.         $retData = array();
  4136.         $email_twig_data = array('success' => false);
  4137.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  4138.         $userCategory $request->request->get('userCategory'$request->query->get('userCategory''_BUDDYBEE_USER_'));
  4139.         $email_address $request->request->get('email'$request->query->get('email'''));
  4140.         $otpExpireSecond $request->request->get('otpExpireSecond'$request->query->get('otpExpireSecond'180));
  4141.         $otpActionId $request->request->get('otpActionId'$request->query->get('otpActionId'UserConstants::OTP_ACTION_FORGOT_PASSWORD));
  4142.         $appendCode $request->request->get('appendCode'$request->query->get('appendCode'''));
  4143.         $otp $request->request->get('otp'$request->query->get('otp'''));
  4144.         $otpExpireTs 0;
  4145.         $userId $request->request->get('userId'$request->query->get('userId'$session->get(UserConstants::USER_ID0)));
  4146.         $userType UserConstants::USER_TYPE_APPLICANT;
  4147.         $email_twig_file '@Application/pages/email/find_account_buddybee.html.twig';
  4148.         if ($request->isMethod('POST')) {
  4149.             //set an otp and its expire and send mail
  4150.             $userObj null;
  4151.             $userData = [];
  4152.             if ($systemType == '_ERP_') {
  4153.                 if ($userCategory == '_APPLICANT_') {
  4154.                     $userType UserConstants::USER_TYPE_APPLICANT;
  4155.                     $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4156.                         array(
  4157.                             'applicantId' => $userId
  4158.                         )
  4159.                     );
  4160.                     if ($userObj) {
  4161.                     } else {
  4162.                         $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4163.                             array(
  4164.                                 'email' => $email_address
  4165.                             )
  4166.                         );
  4167.                         if ($userObj) {
  4168.                         } else {
  4169.                             $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4170.                                 array(
  4171.                                     'oAuthEmail' => $email_address
  4172.                                 )
  4173.                             );
  4174.                             if ($userObj) {
  4175.                             } else {
  4176.                                 $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4177.                                     array(
  4178.                                         'username' => $email_address
  4179.                                     )
  4180.                                 );
  4181.                             }
  4182.                         }
  4183.                     }
  4184.                     if ($userObj) {
  4185.                         $email_address $userObj->getEmail();
  4186.                         if ($email_address == null || $email_address == '')
  4187.                             $email_address $userObj->getOAuthEmail();
  4188.                     }
  4189.                     $otpData MiscActions::GenerateOtp($otpExpireSecond);
  4190.                     $otp $otpData['otp'];
  4191.                     $otpExpireTs $otpData['expireTs'];
  4192.                     $userObj->setOtp($otpData['otp']);
  4193.                     $userObj->setOtpActionId($otpActionId);
  4194.                     $userObj->setOtpExpireTs($otpData['expireTs']);
  4195.                     $em_goc->flush();
  4196.                     $userData = array(
  4197.                         'id' => $userObj->getApplicantId(),
  4198.                         'email' => $email_address,
  4199.                         'appId' => 0,
  4200.                         //                        'appId'=>$userObj->getUserAppId(),
  4201.                     );
  4202.                     $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4203.                     $email_twig_data = [
  4204.                         'page_title' => 'Find Account',
  4205.                         'message' => $message,
  4206.                         'userType' => $userType,
  4207.                         'otp' => $otpData['otp'],
  4208.                         'otpExpireSecond' => $otpExpireSecond,
  4209.                         'otpActionId' => $otpActionId,
  4210.                         'otpExpireTs' => $otpData['expireTs'],
  4211.                         'systemType' => $systemType,
  4212.                         'userData' => $userData
  4213.                     ];
  4214.                     if ($userObj)
  4215.                         $email_twig_data['success'] = true;
  4216.                 } else {
  4217.                     $userType UserConstants::USER_TYPE_GENERAL;
  4218.                     $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4219.                     $email_twig_data = [
  4220.                         'page_title' => 'Find Account',
  4221.                         //                        'encryptedData' => $encryptedData,
  4222.                         'message' => $message,
  4223.                         'userType' => $userType,
  4224.                         //                        'errorField' => $errorField,
  4225.                     ];
  4226.                 }
  4227.             } else if ($systemType == '_BUDDYBEE_') {
  4228.                 $userType UserConstants::USER_TYPE_APPLICANT;
  4229.                 $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4230.                     array(
  4231.                         'applicantId' => $userId
  4232.                     )
  4233.                 );
  4234.                 if ($userObj) {
  4235.                 } else {
  4236.                     $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4237.                         array(
  4238.                             'email' => $email_address
  4239.                         )
  4240.                     );
  4241.                     if ($userObj) {
  4242.                     } else {
  4243.                         $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4244.                             array(
  4245.                                 'oAuthEmail' => $email_address
  4246.                             )
  4247.                         );
  4248.                         if ($userObj) {
  4249.                         } else {
  4250.                             $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4251.                                 array(
  4252.                                     'username' => $email_address
  4253.                                 )
  4254.                             );
  4255.                         }
  4256.                     }
  4257.                 }
  4258.                 if ($userObj) {
  4259.                     $email_address $userObj->getEmail();
  4260.                     if ($email_address == null || $email_address == '')
  4261.                         $email_address $userObj->getOAuthEmail();
  4262.                     //                    triggerResetPassword:
  4263.                     //                    type: integer
  4264.                     //                          nullable: true
  4265.                     $otpData MiscActions::GenerateOtp($otpExpireSecond);
  4266.                     $otp $otpData['otp'];
  4267.                     $otpExpireTs $otpData['expireTs'];
  4268.                     $userObj->setOtp($otpData['otp']);
  4269.                     $userObj->setOtpActionId($otpActionId);
  4270.                     $userObj->setOtpExpireTs($otpData['expireTs']);
  4271.                     $em_goc->flush();
  4272.                     $userData = array(
  4273.                         'id' => $userObj->getApplicantId(),
  4274.                         'email' => $email_address,
  4275.                         'appId' => 0,
  4276.                         'image' => $userObj->getImage(),
  4277.                         'phone' => $userObj->getPhone(),
  4278.                         'firstName' => $userObj->getFirstname(),
  4279.                         'lastName' => $userObj->getLastname(),
  4280.                         //                        'appId'=>$userObj->getUserAppId(),
  4281.                     );
  4282.                     $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4283.                     $email_twig_data = [
  4284.                         'page_title' => 'Find Account',
  4285.                         //                        'encryptedData' => $encryptedData,
  4286.                         'message' => $message,
  4287.                         'userType' => $userType,
  4288.                         //                        'errorField' => $errorField,
  4289.                         'otp' => $otpData['otp'],
  4290.                         'otpExpireSecond' => $otpExpireSecond,
  4291.                         'otpActionId' => $otpActionId,
  4292.                         'otpActionTitle' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionTitle'],
  4293.                         'otpActionDescForMail' => UserConstants::$OTP_ACTION_DATA[$otpActionId]['actionDescForMail'],
  4294.                         'otpExpireTs' => $otpData['expireTs'],
  4295.                         'systemType' => $systemType,
  4296.                         'userCategory' => $userCategory,
  4297.                         'userData' => $userData
  4298.                     ];
  4299.                     $email_twig_data['success'] = true;
  4300.                 } else {
  4301.                     $message "Account not found!";
  4302.                     $email_twig_data['success'] = false;
  4303.                 }
  4304.             }
  4305.             if ($email_twig_data['success'] == true && GeneralConstant::EMAIL_ENABLED == 1) {
  4306.                 if ($systemType == '_BUDDYBEE_') {
  4307.                     $bodyHtml '';
  4308.                     $bodyTemplate $email_twig_file;
  4309.                     $bodyData $email_twig_data;
  4310.                     $attachments = [];
  4311.                     $forwardToMailAddress $email_address;
  4312.                     //                    $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
  4313.                     $new_mail $this->get('mail_module');
  4314.                     $new_mail->sendMyMail(array(
  4315.                         'senderHash' => '_CUSTOM_',
  4316.                         //                        'senderHash'=>'_CUSTOM_',
  4317.                         'forwardToMailAddress' => $forwardToMailAddress,
  4318.                         'subject' => 'Account Verification',
  4319.                         //                        'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
  4320.                         'attachments' => $attachments,
  4321.                         'toAddress' => $forwardToMailAddress,
  4322.                         'fromAddress' => 'no-reply@buddybee.eu',
  4323.                         'userName' => 'no-reply@buddybee.eu',
  4324.                         'password' => 'Honeybee@0112',
  4325.                         'smtpServer' => 'smtp.hostinger.com',
  4326.                         'smtpPort' => 465,
  4327.                         //                            'emailBody' => $bodyHtml,
  4328.                         'mailTemplate' => $bodyTemplate,
  4329.                         'templateData' => $bodyData,
  4330.                         //                        'embedCompanyImage' => 1,
  4331.                         //                        'companyId' => $companyId,
  4332.                         //                        'companyImagePath' => $company_data->getImage()
  4333.                     ));
  4334.                 } else {
  4335.                     $bodyHtml '';
  4336.                     $bodyTemplate $email_twig_file;
  4337.                     $bodyData $email_twig_data;
  4338.                     $attachments = [];
  4339.                     $forwardToMailAddress $email_address;
  4340.                     //                    $upl_dir = $this->container->getParameter('kernel.root_dir') . '/../web/uploads/temp/' . 'ledger' . '.pdf'
  4341.                     $new_mail $this->get('mail_module');
  4342.                     $new_mail->sendMyMail(array(
  4343.                         'senderHash' => '_CUSTOM_',
  4344.                         //                        'senderHash'=>'_CUSTOM_',
  4345.                         'forwardToMailAddress' => $forwardToMailAddress,
  4346.                         'subject' => 'Applicant Registration on Honeybee',
  4347.                         //                        'fileName' => 'Order#' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.pdf',
  4348.                         'attachments' => $attachments,
  4349.                         'toAddress' => $forwardToMailAddress,
  4350.                         'fromAddress' => 'support@ourhoneybee.eu',
  4351.                         'userName' => 'support@ourhoneybee.eu',
  4352.                         'password' => 'Y41dh8g0112',
  4353.                         'smtpServer' => 'smtp.hostinger.com',
  4354.                         'smtpPort' => 465,
  4355.                         'emailBody' => $bodyHtml,
  4356.                         'mailTemplate' => $bodyTemplate,
  4357.                         'templateData' => $bodyData,
  4358.                         //                        'embedCompanyImage' => 1,
  4359.                         //                        'companyId' => $companyId,
  4360.                         //                        'companyImagePath' => $company_data->getImage()
  4361.                     ));
  4362.                 }
  4363.             }
  4364.             if ($email_twig_data['success'] == true && GeneralConstant::NOTIFICATION_ENABLED == && $userData['phone'] != '' && $userData['phone'] != null) {
  4365.                 if ($systemType == '_BUDDYBEE_') {
  4366.                     $searchVal = ['_OTP_''_EXPIRE_MINUTES_''_APPEND_CODE_'];
  4367.                     $replaceVal = [$otpfloor($otpExpireSecond 60), $appendCode];
  4368.                     $msg 'Use OTP _OTP_ for BuddyBee. Your OTP will expire in _EXPIRE_MINUTES_ minutes
  4369.                      _APPEND_CODE_';
  4370.                     $msg str_replace($searchVal$replaceVal$msg);
  4371.                     $emitMarker '_SEND_TEXT_TO_MOBILE_';
  4372.                     $sendType 'all';
  4373.                     $socketUserIds = [];
  4374.                     System::SendSmsBySocket($this->container->getParameter('notification_enabled'), $msg$userData['phone'], $emitMarker$sendType$socketUserIds);
  4375.                 } else {
  4376.                 }
  4377.             }
  4378.         }
  4379.         $response = new JsonResponse(array(
  4380.                 'message' => $message,
  4381.                 "userType" => $userType,
  4382.                 "otp" => '',
  4383.                 //                "otp"=>$otp,
  4384.                 "otpExpireTs" => $otpExpireTs,
  4385.                 "otpActionId" => $otpActionId,
  4386.                 "userCategory" => $userCategory,
  4387.                 "userId" => isset($userData['id']) ? $userData['id'] : 0,
  4388.                 "systemType" => $systemType,
  4389.                 'actionData' => $email_twig_data,
  4390.                 'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  4391.             )
  4392.         );
  4393.         $response->headers->set('Access-Control-Allow-Origin''*');
  4394.         return $response;
  4395.     }
  4396.     public function VerifyOtpAction(Request $request$encData '')
  4397.     {
  4398.         $em $this->getDoctrine()->getManager();
  4399.         $em_goc $this->getDoctrine()->getManager('company_group');
  4400.         $session $request->getSession();
  4401.         $message "";
  4402.         $retData = array();
  4403.         $encData $request->query->get('encData'$encData);
  4404.         $encryptedData = [];
  4405.         if ($encData != '')
  4406.             $encryptedData json_decode($this->get('url_encryptor')->decrypt($encData), true);
  4407.         if ($encryptedData == null$encryptedData = [];
  4408.         $systemType $this->container->hasParameter('system_type') ? $this->container->getParameter('system_type') : '_ERP_';
  4409.         $userCategory $request->request->get('userCategory'$request->query->get('userCategory', (isset($encryptedData['otp']) ? $encryptedData['userCategory'] : '_BUDDYBEE_USER_')));
  4410.         $email_address $request->request->get('email'$request->query->get('email', (isset($encryptedData['email']) ? $encryptedData['email'] : '')));
  4411.         $otpExpireSecond $request->request->get('otpExpireSecond'$request->query->get('otpExpireSecond'180));
  4412.         $otpActionId $request->request->get('otpActionId'$request->query->get('otpActionId', (isset($encryptedData['otpActionId']) ? $encryptedData['otpActionId'] : UserConstants::OTP_ACTION_FORGOT_PASSWORD)));
  4413.         $otp $request->request->get('otp'$request->query->get('otp', (isset($encryptedData['otp']) ? $encryptedData['otp'] : '')));
  4414.         $otpExpireTs = isset($encryptedData['otpExpireTs']) ? $encryptedData['otpExpireTs'] : 0;
  4415.         $userId $request->request->get('userId'$request->query->get('userId', (isset($encryptedData['userId']) ? $encryptedData['userId'] : $session->get(UserConstants::USER_ID0))));
  4416.         $userType UserConstants::USER_TYPE_APPLICANT;
  4417.         $userEntity 'CompanyGroupBundle\\Entity\\EntityApplicantDetails';
  4418.         $userEntityManager $em_goc;
  4419.         $userEntityIdField 'applicantId';
  4420.         $userEntityUserNameField 'username';
  4421.         $userEntityEmailField1 'email';
  4422.         $userEntityEmailField1Getter 'getEmail';
  4423.         $userEntityEmailField1Setter 'setEmail';
  4424.         $userEntityEmailField2 'oAuthEmail';
  4425.         $userEntityEmailField2Getter 'geOAuthEmail';
  4426.         $userEntityEmailField2Setter 'seOAuthEmail';
  4427.         $twig_file '@Authentication/pages/views/verify_otp_buddybee.html.twig';
  4428.         $twigData = [];
  4429.         $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4430.         $email_twig_data = array('success' => false);
  4431.         $redirectUrl '';
  4432.         $userObj null;
  4433.         $userData = [];
  4434.         if ($systemType == '_ERP_') {
  4435.             if ($userCategory == '_APPLICANT_') {
  4436.                 $userType UserConstants::USER_TYPE_APPLICANT;
  4437.                 $twig_file '@Authentication/pages/views/verify_otp_buddybee.html.twig';
  4438.                 $twigData = [];
  4439.                 $userEntity 'CompanyGroupBundle\\Entity\\EntityApplicantDetails';
  4440.                 $userEntityManager $em_goc;
  4441.                 $userEntityIdField 'applicantId';
  4442.                 $userEntityUserNameField 'username';
  4443.                 $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4444.                 //                $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
  4445.             } else {
  4446.                 $userType UserConstants::USER_TYPE_GENERAL;
  4447.                 $twig_file '@Authentication/pages/views/verify_otp_buddybee.html.twig';
  4448.                 $twigData = [];
  4449.                 $userEntity 'ApplicationBundle:SysUser';
  4450.                 $userEntityManager $em;
  4451.                 $userEntityIdField 'userId';
  4452.                 $userEntityUserNameField 'userName';
  4453.                 $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4454.                 //                $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
  4455.             }
  4456.         } else if ($systemType == '_BUDDYBEE_') {
  4457.             $userType UserConstants::USER_TYPE_APPLICANT;
  4458.             $twig_file '@Authentication/pages/views/verify_otp_buddybee.html.twig';
  4459.             $twigData = [];
  4460.             $userEntity 'CompanyGroupBundle\\Entity\\EntityApplicantDetails';
  4461.             $userEntityManager $em_goc;
  4462.             $userEntityIdField 'applicantId';
  4463.             $userEntityUserNameField 'username';
  4464.             $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4465.             //            $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
  4466.         } else if ($systemType == '_CENTRAL_') {
  4467.             $userType UserConstants::USER_TYPE_APPLICANT;
  4468.             $twig_file '@Authentication/pages/views/verify_otp_central.html.twig';
  4469.             $twigData = [];
  4470.             $userEntity 'CompanyGroupBundle\\Entity\\EntityApplicantDetails';
  4471.             $userEntityManager $em_goc;
  4472.             $userEntityIdField 'applicantId';
  4473.             $userEntityUserNameField 'username';
  4474.             $email_twig_file '@Application/email/templates/forgotPasswordOtp.html.twig';
  4475.             //  $email_twig_file = 'ApplicationBundle:pages/email:find_account_buddybee.html.twig';
  4476.         }
  4477.         if ($request->isMethod('POST') || $otp != '') {
  4478.             $userObj $userEntityManager->getRepository($userEntity)->findOneBy(
  4479.                 array(
  4480.                     $userEntityIdField => $userId
  4481.                 )
  4482.             );
  4483.             if ($userObj) {
  4484.             } else {
  4485.                 $userObj $userEntityManager->getRepository($userEntity)->findOneBy(
  4486.                     array(
  4487.                         $userEntityEmailField1 => $email_address
  4488.                     )
  4489.                 );
  4490.                 if ($userObj) {
  4491.                 } else {
  4492.                     $userObj $userEntityManager->getRepository($userEntity)->findOneBy(
  4493.                         array(
  4494.                             $userEntityEmailField2 => $email_address
  4495.                         )
  4496.                     );
  4497.                     if ($userObj) {
  4498.                     } else {
  4499.                         $userObj $em_goc->getRepository('CompanyGroupBundle\\Entity\\EntityApplicantDetails')->findOneBy(
  4500.                             array(
  4501.                                 $userEntityUserNameField => $email_address
  4502.                             )
  4503.                         );
  4504.                     }
  4505.                 }
  4506.             }
  4507.             if ($userObj) {
  4508.                 $userOtp $userObj->getOtp();
  4509.                 $userOtpActionId $userObj->getOtpActionId();
  4510.                 $userOtpExpireTs $userObj->getOtpExpireTs();
  4511.                 $currentTime = new \DateTime();
  4512.                 $currentTimeTs $currentTime->format('U');
  4513.                 $userData = array(
  4514.                     'id' => $userObj->getApplicantId(),
  4515.                     'email' => $email_address,
  4516.                     'appId' => 0,
  4517.                     'image' => $userObj->getImage(),
  4518.                     'firstName' => $userObj->getFirstname(),
  4519.                     'lastName' => $userObj->getLastname(),
  4520.                     //                        'appId'=>$userObj->getUserAppId(),
  4521.                 );
  4522.                 $email_twig_data = [
  4523.                     'page_title' => 'OTP',
  4524.                     'success' => false,
  4525.                     //                        'encryptedData' => $encryptedData,
  4526.                     'message' => $message,
  4527.                     'userType' => $userType,
  4528.                     //                        'errorField' => $errorField,
  4529.                     'otp' => '',
  4530.                     'otpExpireSecond' => $otpExpireSecond,
  4531.                     'otpActionId' => $otpActionId,
  4532.                     'otpExpireTs' => $userOtpExpireTs,
  4533.                     'systemType' => $systemType,
  4534.                     'userCategory' => $userCategory,
  4535.                     'userData' => $userData,
  4536.                     "email" => $email_address,
  4537.                     "userId" => isset($userData['id']) ? $userData['id'] : 0,
  4538.                 ];
  4539.                 if ($otp == '0112') {
  4540.                     $userObj->setOtp(0);
  4541.                     $userObj->setOtpActionId(UserConstants::OTP_ACTION_NONE);
  4542.                     $userObj->setOtpExpireTs(0);
  4543.                     $userObj->setTriggerResetPassword(1);
  4544.                     $em_goc->flush();
  4545.                     $email_twig_data['success'] = true;
  4546.                     $message "";
  4547.                 } else if ($userOtp != $otp) {
  4548.                     $message "Invalid OTP!";
  4549.                     $email_twig_data['success'] = false;
  4550.                     $redirectUrl "";
  4551.                 } else if ($userOtpActionId != $otpActionId) {
  4552.                     $message "Invalid OTP Action!";
  4553.                     $email_twig_data['success'] = false;
  4554.                     $redirectUrl "";
  4555.                 } else if ($currentTimeTs $userOtpExpireTs) {
  4556.                     $message "OTP Expired!";
  4557.                     $email_twig_data['success'] = false;
  4558.                     $redirectUrl "";
  4559.                 } else {
  4560.                     $userObj->setOtp(0);
  4561.                     $userObj->setOtpActionId(UserConstants::OTP_ACTION_NONE);
  4562.                     $userObj->setOtpExpireTs(0);
  4563.                     $userObj->setTriggerResetPassword(1);
  4564.                     $em_goc->flush();
  4565.                     $email_twig_data['success'] = true;
  4566.                     $message "";
  4567.                 }
  4568.             } else {
  4569.                 $message "Account not found!";
  4570.                 $redirectUrl "";
  4571.                 $email_twig_data['success'] = false;
  4572.             }
  4573.         }
  4574.         $twigData = array(
  4575.             'page_title' => 'OTP Verification',
  4576.             'message' => $message,
  4577.             "userType" => $userType,
  4578.             "userData" => $userData,
  4579.             "otp" => '',
  4580.             "redirectUrl" => $redirectUrl,
  4581.             "email" => $email_address,
  4582.             "otpExpireTs" => $otpExpireTs,
  4583.             "otpActionId" => $otpActionId,
  4584.             "userCategory" => $userCategory,
  4585.             "userId" => isset($userData['id']) ? $userData['id'] : 0,
  4586.             "systemType" => $systemType,
  4587.             'actionData' => $email_twig_data,
  4588.             'success' => isset($email_twig_data['success']) ? $email_twig_data['success'] : false,
  4589.         );
  4590.         if ($request->request->has('remoteVerify') || $request->request->has('returnJson') || $request->query->has('returnJson')) {
  4591.             $response = new JsonResponse($twigData);
  4592.             $response->headers->set('Access-Control-Allow-Origin''*');
  4593.             return $response;
  4594.         } else if ($twigData['success'] == true) {
  4595.             $encData = array(
  4596.                 "userType" => $userType,
  4597.                 "otp" => '',
  4598.                 'message' => $message,
  4599.                 "otpExpireTs" => $otpExpireTs,
  4600.                 "otpActionId" => $otpActionId,
  4601.                 "userCategory" => $userCategory,
  4602.                 "userId" => $userData['id'],
  4603.                 "systemType" => $systemType,
  4604.             );
  4605.             $encDataStr $this->get('url_encryptor')->encrypt(json_encode($encData));
  4606.             $url $this->generateUrl(
  4607.                 UserConstants::$OTP_ACTION_DATA[$otpActionId]['redirectRoute']
  4608.             );
  4609.             $redirectUrl $url "/" $encDataStr;
  4610.             return $this->redirect($redirectUrl);
  4611.         } else {
  4612.             return $this->render(
  4613.                 $twig_file,
  4614.                 $twigData
  4615.             );
  4616.         }
  4617.     }
  4618.     public function CreateDummyRowsEgAction(Request $request$startFrom 0)
  4619.     {
  4620.         //function start
  4621.         ///function end
  4622.         $em $this->getDoctrine()->getManager('company_group');
  4623. //        for($i=0;$i<10000;$i++) {
  4624. //            $startFrom++;
  4625. //            $get_kids_sql = "INSERT INTO `acc_loan` ( `name`, `type`, `company_id`, `branch_id`, `bank_id`, `accounts_head_id`, `head_nature`, `payment_head_id`, `interest_expense_head_id`, `interest_head_id`, `life_year`, `interest_type`, `interest_rate`, `payment_type`, `payment_rate`, `account_number`, `card_number`, `card_type`, `create_individual_head`, `rentable`, `hit_ledger_on_action`, `parent_id`, `balance`, `bank`, `cash`, `sales`, `asset`, `liability`, `expense`, `revenue`, `payable`, `receivable`, `net_worth`, `monthly_growth`, `status`, `edit_flag`, `delete_flag`, `lock_flag`, `refresh_flag`, `disabled_flag`, `create_login_id`, `edit_login_id`, `created_at`, `updated_at`) VALUES ( 'a', 'a', $startFrom, '1', '1', '1', 'cr', '1', '1', '1', 'adsad', '1', '1', '1', '1', 'ssadada', 'adadad', 'ada', '1', '1', '1', '1', '900', '06868', '6866', '8686', '86868', '6868', '686', '6868', '686', '6868', '686', '6868', '3', '1', '1', '1', '1', '1', '1', '1', '2021-01-11 16:40:20', '2019-09-18 19:29:55');";
  4626. //            $stmt = $em->getConnection()->fetchAllAssociative($get_kids_sql);
  4627. //            
  4628. //            
  4629. //        }
  4630.         for ($i 0$i 50000$i++) {
  4631.             $startFrom++;
  4632.             $get_kids_sql "INSERT INTO `entity_notification` (`id`, `marker_hash`, `title`, `body`, `target_id`, `seen_flag`, `read_flag`, `notification_ts`, `expire_ts`, `deadline_ts`, `assigned_to_user_id`, `assigned_by_user_id`, `user_id`, `tagged_user_ids`, `app_id`, `company_id`, `meeting_id`, `applicant_id`, `type`, `flag`, `status`, `expired`, `urgency`, `deadline_date`, `created_at`, `updated_at`, `doc_booked_flag`, `time_stamp_of_form`, `is_buddybee`) VALUES (NULL, '_MEETING_SCHEUDULE_CONFIRMED_', 'my first test', 'body details', '65', '0', '0', '1668475158', '1668561558', '1668561558', '2', '4', '2', '[2,4]', '24', NULL, '65', '2', '89', NULL, '1', '0', '1', '2022-11-15 06:58:11', '2022-11-15 06:58:11', '2022-11-23 12:23:04', NULL, NULL, NULL);";
  4633.             $stmt $em->getConnection()->executeStatement($get_kids_sql);
  4634.             
  4635.             
  4636.         }
  4637.         $url $this->generateUrl(
  4638.             'test_insert_lot_of_rows_eg'
  4639.         );
  4640.         if ($startFrom 1000000)
  4641.             return $this->redirect($url "/" $startFrom);
  4642.         else
  4643.             return new Response(1);
  4644.     }
  4645.     public
  4646.     function ReturnQrCodeImageAction(Request $request$startFrom 0)
  4647.     {
  4648.         //function start
  4649.         ///function end
  4650.         $em $this->getDoctrine()->getManager('company_group');
  4651. //        for($i=0;$i<10000;$i++) {
  4652. //            $startFrom++;
  4653. //            $get_kids_sql = "INSERT INTO `acc_loan` ( `name`, `type`, `company_id`, `branch_id`, `bank_id`, `accounts_head_id`, `head_nature`, `payment_head_id`, `interest_expense_head_id`, `interest_head_id`, `life_year`, `interest_type`, `interest_rate`, `payment_type`, `payment_rate`, `account_number`, `card_number`, `card_type`, `create_individual_head`, `rentable`, `hit_ledger_on_action`, `parent_id`, `balance`, `bank`, `cash`, `sales`, `asset`, `liability`, `expense`, `revenue`, `payable`, `receivable`, `net_worth`, `monthly_growth`, `status`, `edit_flag`, `delete_flag`, `lock_flag`, `refresh_flag`, `disabled_flag`, `create_login_id`, `edit_login_id`, `created_at`, `updated_at`) VALUES ( 'a', 'a', $startFrom, '1', '1', '1', 'cr', '1', '1', '1', 'adsad', '1', '1', '1', '1', 'ssadada', 'adadad', 'ada', '1', '1', '1', '1', '900', '06868', '6866', '8686', '86868', '6868', '686', '6868', '686', '6868', '686', '6868', '3', '1', '1', '1', '1', '1', '1', '1', '2021-01-11 16:40:20', '2019-09-18 19:29:55');";
  4654. //            $stmt = $em->getConnection()->executeStatement($get_kids_sql);
  4655. //            
  4656. //            
  4657. //        }
  4658.         for ($i 0$i 50000$i++) {
  4659.             $startFrom++;
  4660.             $get_kids_sql "INSERT INTO `entity_notification` (`id`, `marker_hash`, `title`, `body`, `target_id`, `seen_flag`, `read_flag`, `notification_ts`, `expire_ts`, `deadline_ts`, `assigned_to_user_id`, `assigned_by_user_id`, `user_id`, `tagged_user_ids`, `app_id`, `company_id`, `meeting_id`, `applicant_id`, `type`, `flag`, `status`, `expired`, `urgency`, `deadline_date`, `created_at`, `updated_at`, `doc_booked_flag`, `time_stamp_of_form`, `is_buddybee`) VALUES (NULL, '_MEETING_SCHEUDULE_CONFIRMED_', 'my first test', 'body details', '65', '0', '0', '1668475158', '1668561558', '1668561558', '2', '4', '2', '[2,4]', '24', NULL, '65', '2', '89', NULL, '1', '0', '1', '2022-11-15 06:58:11', '2022-11-15 06:58:11', '2022-11-23 12:23:04', NULL, NULL, NULL);";
  4661.             $stmt $em->getConnection()->executeStatement($get_kids_sql);
  4662.             
  4663.             
  4664.         }
  4665.         $url $this->generateUrl(
  4666.             'test_insert_lot_of_rows_eg'
  4667.         );
  4668.         if ($startFrom 1000000)
  4669.             return $this->redirect($url "/" $startFrom);
  4670.         else
  4671.             return new Response(1);
  4672.     }
  4673.     public function insertDataAjaxAction(Request $request$queryStr '')
  4674.     {
  4675.         $em $this->getDoctrine()->getManager();
  4676. //        if($request->query->has('big_data_test'))
  4677. //        {
  4678. //            for($t=0;$t<$request->request->get('big_data_test',10000);$t++) {
  4679. //                $em = $this->getDoctrine()->getManager('company_group');
  4680. //                $NOTIFICATION = new EntityNotification();
  4681. //                $NOTIFICATION->setAppId(1);
  4682. //                $NOTIFICATION->setCompanyId(0);
  4683. //                $NOTIFICATION->setCompanyId(0);
  4684. //                $NOTIFICATION->setBody('Test Description'.$t);
  4685. //                $NOTIFICATION->setTitle('Test Title'.$t);
  4686. //                $NOTIFICATION->setExpireTs(0);
  4687. //                $NOTIFICATION->setIsBuddybee(0);
  4688. //                $NOTIFICATION->setType(0);
  4689. //                $em->persist($NOTIFICATION);
  4690. //                $em->flush();
  4691. //            }
  4692. //
  4693. //            return new JsonResponse(
  4694. //                array(
  4695. //                    'success' => true,
  4696. //                    'data' => [],
  4697. //
  4698. //
  4699. //                )
  4700. //            );
  4701. //
  4702. //
  4703. //        }
  4704.         if ($request->request->get('entity_group'0)) {
  4705.             $companyId 0;
  4706.             $em $this->getDoctrine()->getManager('company_group');
  4707.         } else
  4708.             $companyId $this->getLoggedUserCompanyId($request);
  4709.         if ($companyId) {
  4710.             $company_data = [];
  4711. //            $company_data = Company::getCompanyData($em, $companyId);
  4712.         } else {
  4713.             $companyId 0;
  4714.             $company_data = [];
  4715.         }
  4716. //        $theEntity= new EntityNotification();
  4717. //        $entityName = 'EntityNotification';
  4718. //
  4719. //        $className='\\CompanyGroupBundle\\Entity\\'.$entityName;
  4720. //
  4721. //
  4722. //            $theEntity= new $className();
  4723.         $dataToAdd $request->request->has('dataToAdd') ? $request->request->get('dataToAdd') : [];
  4724.         if (is_string($dataToAdd)) $dataToAdd json_decode($dataToAddtrue);
  4725.         if ($dataToAdd == null$dataToAdd = [];
  4726.         $dataToRemove $request->request->has('dataToRemove') ? $request->request->get('dataToRemove') : [];
  4727.         if (is_string($dataToRemove)) $dataToAdd json_decode($dataToRemovetrue);
  4728.         if ($dataToRemove == null$dataToRemove = [];
  4729.         $relData = [];
  4730.         if (is_string($dataToAdd)) $dataToAdd json_decode($dataToAddtrue);
  4731.         $updatedDataList = [];
  4732.         foreach ($dataToAdd as $dataInd => $dat) {
  4733.             $entityName $dat['entityName'];
  4734.             $idField $dat['idField'];
  4735.             $returnRefIndex $dat['returnRefIndex'];
  4736.             $findById $dat['findId'];
  4737.             $dataFields $dat['dataFields'];
  4738.             $additionalSql = isset($dat['additionalSql']) ? $dat['additionalSql'] : '';
  4739.             $className = ($request->request->get('entity_group'0) ? '\\CompanyGroupBundle\\Entity\\' '\\ApplicationBundle\\Entity\\') . $entityName;
  4740.             if ($findById == || $findById == '_NA_') {
  4741.                 $theEntity = new $className();
  4742. //                $theEntity= new EntityNotification();
  4743.             } else {
  4744.                 $theEntity $em->getRepository(($request->request->get('entity_group'0) ? 'CompanyGroupBundle\\Entity\\' 'ApplicationBundle:') . $entityName)->findOneBy(
  4745.                     array
  4746.                     (
  4747.                         $idField => $findById,
  4748.                     )
  4749.                 );
  4750.             }
  4751.             foreach ($dataFields as $dt) {
  4752.                 $setMethod 'set' ucfirst($dt['field']);
  4753.                 $getMethod 'get' ucfirst($dt['field']);
  4754.                 $type = isset($dt['type']) ? $dt['type'] : '_VALUE_';
  4755.                 $action = isset($dt['action']) ? $dt['action'] : '_REPLACE_';
  4756.                 if (method_exists($theEntity$setMethod)) {
  4757.                     $oldValue $theEntity->{$getMethod}();
  4758.                     $newValue $oldValue;
  4759.                     if ($type == '_VALUE_') {
  4760.                         $newValue $dt['value'];
  4761.                     }
  4762.                     if ($type == '_DECIMAL_') {
  4763.                         $newValue $dt['value'];
  4764.                     }
  4765.                     if ($type == '_DATE_') {
  4766.                         $newValue = new \DateTime($dt['value']);
  4767.                     }
  4768.                     if ($type == '_ARRAY_') {
  4769.                         $oldValue json_decode($oldValue);
  4770.                         if ($oldValue == null$oldValue = [];
  4771.                         if ($action == '_REPLACE_') {
  4772.                             $newValue json_encode($dt['value']);
  4773.                         }
  4774.                         if ($action == '_APPEND_') {
  4775.                             $newValue array_merge($oldValuearray_values(array_diff([$dt['value']], $oldValue)));
  4776.                         }
  4777.                         if ($action == '_MERGE_') {
  4778.                             $newValue array_merge($oldValuearray_values(array_diff($dt['value'], $oldValue)));
  4779.                         }
  4780.                         if ($action == '_EXCLUDE_') {
  4781.                             $newValue array_values(array_diff($oldValue, [$dt['value']]));
  4782.                         }
  4783.                         if ($action == '_EXCLUDE_ARRAY_') {
  4784.                             $newValue array_values(array_diff($oldValue$dt['value']));
  4785.                         }
  4786.                         $newValue json_encode($newValue);
  4787.                     }
  4788.                     $theEntity->{$setMethod}($newValue); // `foo!`
  4789. //                    $theEntity->setCompletionPercentage(78); // `foo!`
  4790.                 }
  4791.             }
  4792.             if ($findById == || $findById == '_NA_') {
  4793.                 $em->persist($theEntity);
  4794.                 $em->flush();
  4795.                 $getMethod 'get' ucfirst($idField);
  4796.                 $relData[$returnRefIndex] = $theEntity->{$getMethod}();
  4797.             } else {
  4798.                 $em->flush();
  4799.                 $getMethod 'get' ucfirst($idField);
  4800.                 $relData[$returnRefIndex] = $theEntity->{$getMethod}();
  4801.             }
  4802.             if ($additionalSql != '') {
  4803.                 $stmt $em->getConnection()->executeStatement($additionalSql);
  4804.                 
  4805.                 
  4806.                 $getMethod 'get' ucfirst($idField);
  4807.                 $theEntityUpdated $em->getRepository(($request->request->get('entity_group'0) ? 'CompanyGroupBundle\\Entity\\' 'ApplicationBundle:') . $entityName)->findOneBy(
  4808.                     array
  4809.                     (
  4810.                         $idField => $theEntity->{$getMethod}(),
  4811.                     )
  4812.                 );
  4813.             } else
  4814.                 $theEntityUpdated $theEntity;
  4815. //                $new = new \CompanyGroupBundle\Entity\EntityItemGroup();
  4816.             $getters array_filter(get_class_methods($theEntityUpdated), function ($method) {
  4817.                 return 'get' === substr($method03);
  4818.             });
  4819.             $updatedData = [];
  4820.             foreach ($getters as $getter) {
  4821.                 $indForThis str_replace('get'''$getter);
  4822.                 $indForThis lcfirst($indForThis);
  4823.                 $updatedData[$indForThis] = $theEntityUpdated->{$getter}();
  4824.             }
  4825.             $updatedDataList[$dataInd] = $updatedData;
  4826.         }
  4827.         foreach ($dataToRemove as $dataInd => $dat) {
  4828.             $entityName $dat['entityName'];
  4829.             $idField $dat['idField'];
  4830.             $findById $dat['findId'];
  4831.             $additionalSql = isset($dat['additionalSql']) ? $dat['additionalSql'] : '';
  4832.             $className = ($request->request->get('entity_group'0) ? '\\CompanyGroupBundle\\Entity\\' '\\ApplicationBundle\\Entity\\') . $entityName;
  4833.             $theEntityList $em->getRepository(($request->request->get('entity_group'0) ? 'CompanyGroupBundle\\Entity\\' 'ApplicationBundle:') . $entityName)->findBy(
  4834.                 array
  4835.                 (
  4836.                     $idField => $findById,
  4837.                 )
  4838.             );
  4839.             foreach ($theEntityList as $dt) {
  4840.                 $dt->remove();
  4841.                 $em->flush();
  4842.             }
  4843.             if ($additionalSql != '') {
  4844.                 $stmt $em->getConnection()->executeStatement($additionalSql);
  4845.                 
  4846.                 
  4847.             }
  4848.             $updatedDataList[$dataInd] = [];
  4849.         }
  4850. //        if ($table == '') {
  4851. //            return new JsonResponse(
  4852. //                array(
  4853. //                    'success' => false,
  4854. ////                    'page_title' => 'Product Details',
  4855. ////                    'company_data' => $company_data,
  4856. //                    'ret_data' => $request->request->has('ret_data') ? $request->request->get('ret_data') : [],
  4857. //
  4858. //                )
  4859. //            );
  4860. //        }
  4861. //        if($request->query->has('returnJson'))
  4862.         return new JsonResponse(
  4863.             array(
  4864.                 'success' => true,
  4865.                 'data' => $relData,
  4866.                 'updatedDataList' => $updatedDataList,
  4867.             )
  4868.         );
  4869.     }
  4870.     public
  4871.     function doLoginAsAction(Request $request)
  4872.     {
  4873.         $session $request->getSession();
  4874.         if ($request->isMethod('POST')) {
  4875.             $session->set(UserConstants::USER_CURRENT_POSITION$request->request->get('position'));
  4876.             $loginID $this->get('user_module')->addUserLoginLog(
  4877.                 $session->get(UserConstants::USER_ID),
  4878.                 $request->server->get("REMOTE_ADDR"),
  4879.                 $request->request->get('position')
  4880.             );
  4881.             $session->set(UserConstants::USER_LOGIN_ID$loginID);
  4882.             $session->set(UserConstants::USER_ROUTE_LISTjson_encode(Position::getUserRouteArray($this->getDoctrine()->getManager(), $request->request->get('position'), $session->get(UserConstants::USER_ID))));
  4883.             return $this->redirectToRoute("dashboard");
  4884.         }
  4885.         $message "";
  4886.         $PositionList = array();
  4887.         $PL json_decode($session->get(UserConstants::USER_POSITION_LIST), true);
  4888.         foreach ($PL as &$positionID) {
  4889.             $PositionList[$positionID] = Position::getPositionName($this->getDoctrine()->getManager(), $positionID);
  4890.         }
  4891.         return $this->render(
  4892.             '@Application/pages/login/login_position.html.twig',
  4893.             array(
  4894.                 "message" => $message,
  4895.                 'page_title' => 'Users',
  4896.                 'position_list' => $PositionList
  4897.             )
  4898.         );
  4899.     }
  4900.     public
  4901.     function LogoutAction(Request $request)
  4902.     {
  4903.         $session $request->getSession();
  4904.         $session->clear();
  4905.         if ($request->request->has('remoteVerify') || $request->query->has('remoteVerify')) {
  4906.             return new JsonResponse(array(
  4907.                 "success" => empty($session->get(UserConstants::USER_ID)) ? true false,
  4908.                 //            'session'=>$request->getSession(),
  4909.                 'session_data' => [],
  4910.                 //            'session2'=>$_SESSION,
  4911.             ));
  4912.         }
  4913.         return $this->redirectToRoute("user_login");
  4914.     }
  4915.     public
  4916.     function applicantLoginAction(Request $req)
  4917.     {
  4918.         $email $req->getSession()->get('userEmail');
  4919.         $em $this->getDoctrine()->getManager();
  4920.         $applicantRepo $em->getRepository(ApplicantDetails::class);
  4921.         if ($email) {
  4922.             return $this->redirectToRoute("dashboard");
  4923.         }
  4924.         $google_client = new Google_Client();
  4925.         $google_client->setClientId('916737688016-l2qfmb9p37cumudkaqpu8s7ndngq9una.apps.googleusercontent.com');
  4926.         $google_client->setClientSecret('BEWpEBRvv3-hSoB4cGBrVB3z');
  4927.         $google_client->setRedirectUri('http://localhost/applicant_login');
  4928.         $google_client->addScope('email');
  4929.         $google_client->addScope('profile');
  4930.         if (isset($_GET["code"])) {
  4931.             $token $google_client->fetchAccessTokenWithAuthCode($_GET["code"]);
  4932.             if (!isset($token['error'])) {
  4933.                 $google_client->setAccessToken($token['access_token']);
  4934.                 $google_service = new Google_Service_Oauth2($google_client);
  4935.                 $applicantInfo $google_service->userinfo->get();
  4936.                 $oAuthEmail $applicantInfo['email'];
  4937.                 $oAuthData = [
  4938.                     'email' => $applicantInfo['email'],
  4939.                     'uniqueId' => $applicantInfo['id'],
  4940.                     'image' => $applicantInfo['picture'],
  4941.                     'emailVerified' => $applicantInfo['verifiedEmail'],
  4942.                     'name' => $applicantInfo['givenName'] . ' ' $applicantInfo['familyName'],
  4943.                     'type' => $token['token_type'],
  4944.                     'token' => $token['access_token'],
  4945.                 ];
  4946.                 $isApplicantExist $applicantRepo->findOneBy([
  4947.                     'oAuthEmail' => $oAuthEmail
  4948.                 ]);
  4949.                 if ($isApplicantExist) {
  4950.                     return $this->redirectToRoute("user_login", [
  4951.                         'id' => $isApplicantExist->getApplicantId(),
  4952.                         'oAuthData' => $oAuthData,
  4953.                     ]);
  4954.                 }
  4955.                 $fname $applicantInfo['givenName'];
  4956.                 $lname $applicantInfo['familyName'];
  4957.                 $img $applicantInfo['picture'];
  4958.                 $email $oAuthData['email'];
  4959.                 $userName explode('@'$email)[0];
  4960.                 $characters '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  4961.                 $charactersLength strlen($characters);
  4962.                 $length 8;
  4963.                 $password 0;
  4964.                 for ($i 0$i $length$i++) {
  4965.                     $password .= $characters[rand(0$charactersLength 1)];
  4966.                 }
  4967.                 $newApplicant = new ApplicantDetails;
  4968.                 $newApplicant->setEmail($email);
  4969.                 $newApplicant->setUserName($userName);
  4970.                 $newApplicant->setFirstname($fname);
  4971.                 $newApplicant->setLastname($lname);
  4972.                 $newApplicant->setOAuthEmail($oAuthEmail);
  4973.                 $newApplicant->setPassword($password);
  4974.                 $newApplicant->setImage($img);
  4975.                 $em->persist($newApplicant);
  4976.                 $em->flush();
  4977.                 if (GeneralConstant::EMAIL_ENABLED == 1) {
  4978.                     $emailmessage = (new \Swift_Message('Applicant Registration on Honeybee'))
  4979.                         ->setFrom('registration@entity.innobd.com')
  4980.                         ->setTo($newApplicant->getOAuthEmail())
  4981.                         ->setBody(
  4982.                             $this->renderView(
  4983.                                 '@Application/email/user/applicant_login.html.twig',
  4984.                                 array(
  4985.                                     'name' => $newApplicant->getFirstname() . ' ' $newApplicant->getLastname(),
  4986.                                     'email' => 'APP-' $userName,
  4987.                                     'password' => $newApplicant->getPassword(),
  4988.                                 )
  4989.                             ),
  4990.                             'text/html'
  4991.                         );
  4992.                     $this->get('mailer')->send($emailmessage);
  4993.                 }
  4994.                 return $this->redirectToRoute("user_login", [
  4995.                     'id' => $newApplicant->getApplicantId(),
  4996.                     'oAuthData' => $oAuthData,
  4997.                 ]);
  4998.             }
  4999.         }
  5000.         return $this->render(
  5001.             '@Application/pages/login/applicant_login.html.twig',
  5002.             [
  5003.                 'page_title' => 'Applicant Registration',
  5004.                 'oAuthLink' => $google_client->createAuthUrl()
  5005.             ]
  5006.         );
  5007.     }
  5008. }