Beispiel #1
0
 if (isset($_GET['dateExp']) && $_GET['dateExp'] != "null") {
     $date = \DateTime::createFromFormat('d/m/Y', $_GET['dateExp']);
     if (is_object($date)) {
         $pdDateExpe = "'" . $date->format('Ymd') . "'";
     }
 }
 $objSmartgang->logFile(basename(__FILE__), "script", "EXE", "Commande -> {$pnIdCommande}");
 $conDbo = $objSmartgang->getConDbo();
 //-- conn to dbo
 if (!$conDbo) {
     //-- success connect
     $pnIdPlanche = $objSmartgang->getCreationPlancheNegoce($pnIdCommande, $pnIDAtelier, $pnIdUtilisateur, $pdDateExpe);
     //-- creationsql planche negoce
     if (is_numeric($pnIdPlanche)) {
         //-- recuperation des infos de planches
         $objSmartgang->getPapierBrochure($pnIdCommande, $pnIdPlanche);
         //-- add format "BROCHURE" if needed
         $resu_info = $objSmartgang->getInfoPlanche($pnIdPlanche);
         //-- recup info planche
         $objSmartgang->getFicheFabV2($resu_info);
         //-- create Fiche de fab negoce PDF
         $objSmartgang->getXmlFile($pnIdPlanche);
         //-- genere le xml de la fiche de fab
         sleep(120);
         //-- wait 120sec to be sur that all the files are copied
         $objSmartgang->getImport($resu_info);
         //-- appel au script de déplacement des fichiers dans IMPORTS
         $objSmartgang->getRenameImport($pnIdPlanche, $pnIdCommande);
         //-- rename IMPORTS
         if ($pnIdPlanche > 0) {
             $resu_negoce = $objSmartgang->execMsSql("SELECT\n     CONVERT(CHAR(11),TP.DateExpeditionUrgente, 13) AS DateExp\n     , TP.IDAtelier AS IDAtelier\n     , TA.Code AS CodeAtelier\n FROM\n     dbo.TBL_PLANCHE AS TP\n     JOIN TBL_ATELIER AS TA ON TP.IDAtelier = TA.IDAtelier\n WHERE\n     TP.IDPlanche = '{$pnIdPlanche}'");