/** * * @return \ActionsAdminOrder */ public static function getInstance() { if (self::$instance === false) { self::$instance = new ActionsAdminOrder(); } return self::$instance; }
} catch (TheliaAdminException $e) { $errorCode = $e->getCode(); switch ($errorCode) { case TheliaAdminException::ORDER_ADD_ERROR: $createError = 1; break; case TheliaAdminException::EMAIL_FORMAT_ERROR: $createError = 1; $emailBadFormat = 1; break; case TheliaAdminException::EMAIL_ALREADY_EXISTS: $createError = 1; $emailAlreadyExists = 1; break; } $panier = ActionsAdminOrder::getInstance()->getPanier($request); } ?> <!DOCTYPE html> <html lang="fr"> <head> <?php require_once "title.php"; ?> </head> <body> <?php ActionsAdminModules::instance()->inclure_module_admin("commande_creer_top"); $menu = "commande"; $breadcrumbs = Breadcrumb::getInstance()->getOrderList(trad('Creation_commande', 'admin'), "client.php");
$date = new DateTime($commande->date); $moduletransport = new Modules(); $moduletransport->charger_id($commande->transport); $moduletransportdesc = new Modulesdesc(); $moduletransportdesc->charger($moduletransport->nom); $promoutil = new Promoutil(); $promoutil->charger_commande($commande->id); $adrFacturation = new Venteadr($commande->adrfact); $adrLivraison = new Venteadr($commande->adrlivr); $paysFacturation = new Paysdesc($adrFacturation->pays); $paysLivraison = new Paysdesc($adrLivraison->pays); $raisonFacturation = new Raisondesc($adrFacturation->raison); $raisonLivraison = new Raisondesc($adrLivraison->raison); $statusArray = $commande->query_liste('SELECT * FROM ' . Statutdesc::TABLE . ' WHERE lang=' . ActionsLang::instance()->get_id_langue_courante()); try { ActionsAdminOrder::getInstance()->action($request); } catch (TheliaAdminException $e) { $errorCode = $e->getCode(); switch ($errorCode) { case TheliaAdminException::ORDER_VENTEADR_EDIT_ERROR: if ($id == $adrFacturation->id) { $facturationError = 1; } elseif ($id == $adrLivraison->id) { $deliveryError = 1; } break; } } ?> <!DOCTYPE html> <html lang="fr">