diff --git a/htdocs/admin/livraison.php b/htdocs/admin/delivery.php similarity index 99% rename from htdocs/admin/livraison.php rename to htdocs/admin/delivery.php index 38c9114f50b..4ef0179d88e 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/delivery.php @@ -24,9 +24,9 @@ */ /** - * \file htdocs/admin/livraison.php - * \ingroup livraison - * \brief Page d'administration/configuration du module Delivery + * \file htdocs/admin/delivery.php + * \ingroup delivery + * \brief age to setup extra fields of delivery */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/delivery_extrafields.php similarity index 96% rename from htdocs/admin/livraison_extrafields.php rename to htdocs/admin/delivery_extrafields.php index 7c1d5cb3a5c..182985b47da 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -22,9 +22,9 @@ */ /** - * \file htdocs/admin/livraison_extrafields.php - * \ingroup livraison - * \brief Page to setup extra fields of livraison + * \file htdocs/admin/delivery_extrafields.php + * \ingroup delivery + * \brief Page to setup extra fields of delivery */ require '../main.inc.php'; diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php similarity index 96% rename from htdocs/admin/livraisondet_extrafields.php rename to htdocs/admin/deliverydet_extrafields.php index ee174ab5024..11be79f1cc4 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -24,9 +24,9 @@ */ /** - * \file htdocs/admin/livraisondet_extrafields.php - * \ingroup livraison - * \brief Page to setup extra fields of livraison + * \file htdocs/admin/deliverydet_extrafields.php + * \ingroup delivery + * \brief Page to setup extra fields of delivery */ require '../main.inc.php'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index eeec7bcd0c1..0e66e56cc87 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2555,7 +2555,7 @@ if ($action == 'create' && $usercancreate) $numshipping = $object->nb_expedition(); if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { - if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) { + if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->delivery_note->enabled && $user->rights->expedition->livraison->creer)) { if ($user->rights->expedition->creer) { print ''.$langs->trans('CreateShipment').''; } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3ea4bba4a7f..05e1d4a2cd5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3314,7 +3314,7 @@ abstract class CommonObject } elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; } elseif ($objecttype == 'delivery') { - $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; + $classpath = 'delivery/class'; $subelement = 'delivery'; $module = 'delivery_note'; } elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; } elseif ($objecttype == 'fichinter') { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 32d7b145a41..7c2a4fd0788 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -122,7 +122,7 @@ class Conf // First level object // TODO Remove this part. $this->expedition_bon = new stdClass(); - $this->livraison_bon = new stdClass(); + $this->delivery_note = new stdClass(); $this->fournisseur = new stdClass(); $this->product = new stdClass(); $this->service = new stdClass(); @@ -370,8 +370,8 @@ class Conf // Sous module bons d'expedition $this->expedition_bon->enabled = (!empty($this->global->MAIN_SUBMODULE_EXPEDITION) ? $this->global->MAIN_SUBMODULE_EXPEDITION : 0); - // Sous module bons de livraison - $this->livraison_bon->enabled = (!empty($this->global->MAIN_SUBMODULE_LIVRAISON) ? $this->global->MAIN_SUBMODULE_LIVRAISON : 0); + // Sub module delivery note Sous module bons de livraison + $this->delivery_note->enabled = (!empty($this->global->MAIN_SUBMODULE_LIVRAISON) ? $this->global->MAIN_SUBMODULE_LIVRAISON : 0); // Module fournisseur if (!empty($this->fournisseur)) diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index b575247e84b..a7881bb9e29 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -53,7 +53,7 @@ function expedition_prepare_head(Expedition $object) if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php"; $head[$h][1] = $langs->trans("Receivings"); $h++; } @@ -111,7 +111,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php"; $head[$h][1] = $langs->trans("Receivings"); $head[$h][2] = 'receivings'; $h++; @@ -119,7 +119,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/livraison_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/admin/delivery_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); $head[$h][2] = 'attributes_receivings'; $h++; @@ -127,7 +127,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/livraisondet_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsLines"); $head[$h][2] = 'attributeslines_receivings'; $h++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3af3f7c2562..f60043e9d97 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8650,9 +8650,9 @@ function getElementProperties($element_type) $module = 'expedition_bon'; } if ($element_type == 'delivery') { - $classpath = 'livraison/class'; - $subelement = 'livraison'; - $module = 'livraison_bon'; + $classpath = 'delivery/class'; + $subelement = 'delivery'; + $module = 'delivery_note'; } if ($element_type == 'contract') { $classpath = 'contrat/class'; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7cc14060aac..1f4cbfa9644 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1791,9 +1791,9 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $myobject = 'expedition'; $module = 'expedition_bon'; } elseif ($objecttype == 'delivery') { - $classpath = 'livraison/class'; - $myobject = 'livraison'; - $module = 'livraison_bon'; + $classpath = 'delivery/class'; + $myobject = 'delivery'; + $module = 'delivery_note'; } elseif ($objecttype == 'contract') { $classpath = 'contrat/class'; $module = 'contrat'; diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 939b731f135..4e2f2fac24d 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -59,17 +59,17 @@ function commande_prepare_head(Commande $object) } if (($conf->expedition_bon->enabled && $user->rights->expedition->lire) - || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->lire)) + || ($conf->delivery_note->enabled && $user->rights->expedition->livraison->lire)) { $nbShipments = $object->getNbOfShipments(); $nbReceiption = 0; $head[$h][0] = DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id; $text = ''; if ($conf->expedition_bon->enabled) $text .= $langs->trans("Shipments"); - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text .= ' - '; - if ($conf->livraison_bon->enabled) $text .= $langs->trans("Receivings"); + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled) $text .= ' - '; + if ($conf->delivery_note->enabled) $text .= $langs->trans("Receivings"); if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''.($nbShipments ? $nbShipments : 0); - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - '; - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0); + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - '; + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0); if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''; $head[$h][1] = $text; $head[$h][2] = 'shipping'; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index a1dab5cd6cb..126a62fdf5e 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -43,13 +43,13 @@ function propal_prepare_head($object) $h++; if ((empty($conf->commande->enabled) && ((!empty($conf->expedition->enabled) && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (!empty($conf->expedition->enabled) && !empty($conf->livraison_bon->enabled) && $user->rights->expedition->livraison->lire)))) + || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->livraison->lire)))) { $langs->load("sendings"); $text = ''; $head[$h][0] = DOL_URL_ROOT.'/expedition/propal.php?id='.$object->id; if ($conf->expedition_bon->enabled) $text = $langs->trans("Shipment"); - if ($conf->livraison_bon->enabled) $text .= '/'.$langs->trans("Receivings"); + if ($conf->delivery_note->enabled) $text .= '/'.$langs->trans("Receivings"); $head[$h][1] = $text; $head[$h][2] = 'shipping'; $h++; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 447310c8ad2..23f009b6234 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -47,7 +47,7 @@ function shipping_prepare_head($object) $head[$h][2] = 'shipping'; $h++; - if ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->lire) + if ($conf->delivery_note->enabled && $user->rights->expedition->livraison->lire) { // delivery link $object->fetchObjectLinked($object->id, $object->element); @@ -213,13 +213,13 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end,"; $sql .= " ed.rowid as edrowid, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot as warehouse_id,"; $sql .= " e.rowid as sendingid, e.ref as exp_ref, e.date_creation, e.date_delivery, e.date_expedition,"; - //if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,"; + //if ($conf->delivery_note->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,"; $sql .= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch,'; $sql .= ' p.description as product_desc'; $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; - //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; + //if ($conf->delivery_note->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; //TODO Add link to expeditiondet_batch $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; @@ -260,7 +260,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print '