From 9f35767b4b9e8e43a85fb70d074213fe1b5edf24 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 16 Sep 2018 11:53:49 +0200 Subject: [PATCH] Standardize and update code --- htdocs/fourn/commande/orderstoinvoice.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index 1409fb5ea78..9b9743f201f 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin @@ -8,7 +8,7 @@ * Copyright (C) 2012-2017 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,9 +41,8 @@ if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; } -$langs->load('orders'); -$langs->load('deliveries'); -$langs->load('companies'); +// Load translation files required by the page +$langs->loadLangs(array("orders", "companies", "deliveries")); if (! $user->rights->fournisseur->facture->creer) accessforbidden(); @@ -105,9 +104,9 @@ if (($action == 'create' || $action == 'add') && ! $error) { if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; - $langs->load('bills'); - $langs->load('products'); - $langs->load('main'); + // Load translation files required by the page + $langs->loadLangs(array("bills", "main", "products")); + if (isset($_GET['orders_to_invoice'])) { $orders_id = GETPOST('orders_to_invoice','',1); $n = count($orders_id);