//-- 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}'"); $pdDateExpe = $resu_negoce[0]->DateExp; $idatelier = $resu_negoce[0]->IDAtelier; $psCodeAtelier = $resu_negoce[0]->CodeAtelier; $objSmartgang->logFile(basename(__FILE__), "script", "OK ", ": Commande -> {$pnIdCommande} | IdPlanche => {$pnIdPlanche} | DateExp -> {$pdDateExpe} | Atelier : {$psCodeAtelier}"); $objSmartgang->getFicheRetirage($pnIdPlanche); //-- create Fiche de fab retirage PDF } } } } $end = $objSmartgang->getmicrotime(); $objSmartgang->logFile(basename(__FILE__), "script", "END", ": executed in " . round($end - $start, 5) . "sec\n"); echo "{$pnIdPlanche}|{$pnIdCommande}|{$pdDateExpe}"; }