diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index 3f1eb8d965123..46066a3f318cf 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -67,12 +67,12 @@
if ($action == 'activate_delivery')
{
dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1", 'chaine', 0, '', $conf->entity); // We must also enable this
- dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1", 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_SUBMODULE_DELIVERY", "1", 'chaine', 0, '', $conf->entity);
header("Location: confexped.php");
exit;
} elseif ($action == 'disable_delivery')
{
- dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON", $conf->entity);
+ dolibarr_del_const($db, "MAIN_SUBMODULE_DELIVERY", $conf->entity);
header("Location: confexped.php");
exit;
}
@@ -121,7 +121,7 @@
print "";
print '';
-// Bon de livraison activation/desactivation
+// Delivery note activate/deactivate Bon de livraison activation/desactivation
print '
';
print '';
print $langs->trans("DeliveriesOrderAbility");
@@ -131,7 +131,7 @@
print ' | ';
print '';
-if (empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+if (empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
print ''.img_picto($langs->trans("Disabled"), 'switch_off').'';
} else {
diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php
index 4ef0179d88e16..7987d4cda108e 100644
--- a/htdocs/admin/delivery.php
+++ b/htdocs/admin/delivery.php
@@ -95,7 +95,7 @@
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach ($dirmodels as $reldir)
{
- $file = dol_buildpath($reldir."core/modules/livraison/doc/pdf_".$modele.".modules.php", 0);
+ $file = dol_buildpath($reldir."core/modules/delivery/doc/pdf_".$modele.".modules.php", 0);
if (file_exists($file))
{
$filefound = 1;
@@ -112,7 +112,7 @@
if ($module->write_file($sending, $langs) > 0)
{
- header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf");
+ header("Location: ".DOL_URL_ROOT."/document.php?modulepart=delivery&file=SPECIMEN.pdf");
return;
} else {
setEventMessages($module->error, $module->errors, 'errors');
@@ -134,17 +134,17 @@
$ret = delDocumentModel($value, $type);
if ($ret > 0)
{
- if ($conf->global->LIVRAISON_ADDON_PDF == "$value") dolibarr_del_const($db, 'LIVRAISON_ADDON_PDF', $conf->entity);
+ if ($conf->global->DELIVERY_ADDON_PDF == "$value") dolibarr_del_const($db, 'DELIVERY_ADDON_PDF', $conf->entity);
}
}
if ($action == 'setdoc')
{
- if (dolibarr_set_const($db, "LIVRAISON_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
+ if (dolibarr_set_const($db, "DELIVERY_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
- $conf->global->LIVRAISON_ADDON_PDF = $value;
+ $conf->global->DELIVERY_ADDON_PDF = $value;
}
// On active le modele
@@ -160,7 +160,7 @@
// TODO Verifier si module numerotation choisi peut etre active
// par appel methode canBeActivated
- dolibarr_set_const($db, "LIVRAISON_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "DELIVERY_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
}
@@ -199,7 +199,7 @@
foreach ($dirmodels as $reldir)
{
- $dir = dol_buildpath($reldir."core/modules/livraison/");
+ $dir = dol_buildpath($reldir."core/modules/delivery/");
if (is_dir($dir))
{
@@ -208,7 +208,7 @@
{
while (($file = readdir($handle)) !== false)
{
- if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file) - 3, 3) == 'php')
+ if (substr($file, 0, 14) == 'mod_delivery_' && substr($file, dol_strlen($file) - 3, 3) == 'php')
{
$file = substr($file, 0, dol_strlen($file) - 4);
@@ -237,7 +237,7 @@
print ' | '."\n";
print '';
- if ($conf->global->LIVRAISON_ADDON_NUMBER == "$file")
+ if ($conf->global->DELIVERY_ADDON_NUMBER == "$file")
{
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
@@ -323,7 +323,7 @@
foreach ($dirmodels as $reldir)
{
- $dir = dol_buildpath($reldir."core/modules/livraison/doc/");
+ $dir = dol_buildpath($reldir."core/modules/delivery/doc/");
if (is_dir($dir))
{
@@ -378,7 +378,7 @@
// Default
print " | ";
- if ($conf->global->LIVRAISON_ADDON_PDF == "$name")
+ if ($conf->global->DELIVERY_ADDON_PDF == "$name")
{
print img_picto($langs->trans("Default"), 'on');
} else {
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 0e66e56cc873e..eeec7bcd0c127 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2555,7 +2555,7 @@
$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->delivery_note->enabled && $user->rights->expedition->livraison->creer)) {
+ if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->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 05e1d4a2cd578..0d1942a517d59 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3314,7 +3314,7 @@ public function fetchObjectLinked($sourceid = null, $sourcetype = '', $targetid
} elseif ($objecttype == 'shipping') {
$classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon';
} elseif ($objecttype == 'delivery') {
- $classpath = 'delivery/class'; $subelement = 'delivery'; $module = 'delivery_note';
+ $classpath = 'delivery/class'; $subelement = 'delivery'; $module = 'livraison_bon';
} 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 7c2a4fd078831..e5a1aed0a64e7 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -371,7 +371,7 @@ public function setValues($db)
// Sous module bons d'expedition
$this->expedition_bon->enabled = (!empty($this->global->MAIN_SUBMODULE_EXPEDITION) ? $this->global->MAIN_SUBMODULE_EXPEDITION : 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);
+ $this->delivery_note->enabled = (!empty($this->global->MAIN_SUBMODULE_DELIVERY) ? $this->global->MAIN_SUBMODULE_DELIVERY : 0);
// Module fournisseur
if (!empty($this->fournisseur))
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 3f4938360e09d..1670d4bee4f20 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6749,7 +6749,7 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI
$tplpath = 'reception';
if (empty($conf->reception->enabled)) continue; // Do not show if module disabled
} elseif ($objecttype == 'delivery') {
- $tplpath = 'livraison';
+ $tplpath = 'delivery';
if (empty($conf->expedition->enabled)) continue; // Do not show if module disabled
} elseif ($objecttype == 'invoice_supplier') {
$tplpath = 'fourn/facture';
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 2b98bac30c6df..16526be2331fd 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -366,7 +366,7 @@ public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource,
}
$printer = 0;
- if (in_array($modulepart, array('facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'livraison', 'ticket'))) // The direct print feature is implemented only for such elements
+ if (in_array($modulepart, array('facture', 'supplier_proposal', 'propal', 'proposal', 'order', 'commande', 'expedition', 'commande_fournisseur', 'expensereport', 'delivery', 'ticket'))) // The direct print feature is implemented only for such elements
{
$printer = (!empty($user->rights->printing->read) && !empty($conf->printing->enabled)) ?true:false;
}
@@ -466,11 +466,11 @@ public function showdocuments($modulepart, $modulesubdir, $filedir, $urlsource,
include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php';
$modellist = ModelePdfReception::liste_modeles($this->db);
}
- } elseif ($modulepart == 'livraison')
+ } elseif ($modulepart == 'delivery')
{
if (is_array($genallowed)) $modellist = $genallowed;
else {
- include_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/modules_delivery.php';
$modellist = ModelePDFDeliveryOrder::liste_modeles($this->db);
}
} elseif ($modulepart == 'ficheinter')
diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php
index a7881bb9e2964..92c58d7b5dbbf 100644
--- a/htdocs/core/lib/expedition.lib.php
+++ b/htdocs/core/lib/expedition.lib.php
@@ -51,7 +51,7 @@ function expedition_prepare_head(Expedition $object)
$hselected = $h;
$h++;
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
$head[$h][0] = DOL_URL_ROOT."/admin/delivery.php";
$head[$h][1] = $langs->trans("Receivings");
@@ -109,7 +109,7 @@ function expedition_admin_prepare_head()
$h++;
}
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
$head[$h][0] = DOL_URL_ROOT."/admin/delivery.php";
$head[$h][1] = $langs->trans("Receivings");
@@ -117,7 +117,7 @@ function expedition_admin_prepare_head()
$h++;
}
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
$head[$h][0] = DOL_URL_ROOT.'/admin/delivery_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFields");
@@ -125,7 +125,7 @@ function expedition_admin_prepare_head()
$h++;
}
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
$head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsLines");
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 7f2fd4ce70d20..d73bf175861d3 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -2636,10 +2636,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
$accessallowed = 1;
}
$original_file = $conf->expedition->dir_output."/sending/".$original_file;
- } // Wrapping pour les bons de livraison
- elseif ($modulepart == 'livraison' && !empty($conf->expedition->dir_output))
+ } // Delivery Note Wrapping
+ elseif ($modulepart == 'delivery' && !empty($conf->expedition->dir_output))
{
- if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i', $original_file))
+ if ($fuser->rights->expedition->delivery->{$lire} || preg_match('/^specimen/i', $original_file))
{
$accessallowed = 1;
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index f60043e9d9712..a27cd362827ce 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -8652,7 +8652,7 @@ function getElementProperties($element_type)
if ($element_type == 'delivery') {
$classpath = 'delivery/class';
$subelement = 'delivery';
- $module = 'delivery_note';
+ $module = 'livraison_bon';
}
if ($element_type == 'contract') {
$classpath = 'contrat/class';
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 1f4cbfa9644bf..5188cd02e3022 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1793,7 +1793,7 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '')
} elseif ($objecttype == 'delivery') {
$classpath = 'delivery/class';
$myobject = 'delivery';
- $module = 'delivery_note';
+ $module = 'livraison_bon';
} 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 4e2f2fac24d8b..939b731f13564 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->delivery_note->enabled && $user->rights->expedition->livraison->lire))
+ || ($conf->livraison_bon->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->delivery_note->enabled) $text .= ' - ';
- if ($conf->delivery_note->enabled) $text .= $langs->trans("Receivings");
+ if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text .= ' - ';
+ if ($conf->livraison_bon->enabled) $text .= $langs->trans("Receivings");
if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''.($nbShipments ? $nbShipments : 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 ($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 ($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 126a62fdf5ef8..a1dab5cd6cbc6 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->delivery_note->enabled) && $user->rights->expedition->livraison->lire))))
+ || (!empty($conf->expedition->enabled) && !empty($conf->livraison_bon->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->delivery_note->enabled) $text .= '/'.$langs->trans("Receivings");
+ if ($conf->livraison_bon->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 23f009b623441..447310c8ad26f 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->delivery_note->enabled && $user->rights->expedition->livraison->lire)
+ if ($conf->livraison_bon->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->delivery_note->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,";
+ //if ($conf->livraison_bon->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->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";
+ //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";
$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 ' | ';
print ' | ';
}*/
- if (!empty($conf->delivery_note->enabled))
+ if (!empty($conf->livraison_bon->enabled))
{
print ''.$langs->trans("DeliveryOrder").' | ';
//print ''.$langs->trans("QtyReceived").' | ';
@@ -403,7 +403,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
}*/
// Informations on receipt
- if (!empty($conf->delivery_note->enabled))
+ if (!empty($conf->livraison_bon->enabled))
{
include_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php';
$expedition->id = $objp->sendingid;
diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
index 27b40d48257a3..56c538af8a616 100644
--- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
@@ -262,7 +262,7 @@ public function write_file($object, $outputlangs)
}
}
- $this->error = $langs->transnoentities("ErrorConstantNotDefined", "LIVRAISON_OUTPUTDIR");
+ $this->error = $langs->transnoentities("ErrorConstantNotDefined", "DELIVERY_OUTPUTDIR");
return 0;
}
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index b6e4cbc191a39..2b8987958f4fd 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -415,7 +415,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
}
}
- $this->error = $langs->transnoentities("ErrorConstantNotDefined", "LIVRAISON_OUTPUTDIR");
+ $this->error = $langs->transnoentities("ErrorConstantNotDefined", "DELIVERY_OUTPUTDIR");
return 0;
}
diff --git a/htdocs/core/modules/livraison/doc/index.html b/htdocs/core/modules/delivery/doc/index.html
similarity index 100%
rename from htdocs/core/modules/livraison/doc/index.html
rename to htdocs/core/modules/delivery/doc/index.html
diff --git a/htdocs/core/modules/livraison/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
similarity index 99%
rename from htdocs/core/modules/livraison/doc/pdf_storm.modules.php
rename to htdocs/core/modules/delivery/doc/pdf_storm.modules.php
index 404e27b429f42..7de29cce294ad 100644
--- a/htdocs/core/modules/livraison/doc/pdf_storm.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
@@ -23,12 +23,12 @@
*/
/**
- * \file htdocs/core/modules/livraison/doc/pdf_storm.modules.php
+ * \file htdocs/core/modules/delivery/doc/pdf_storm.modules.php
* \ingroup livraison
* \brief File of class to manage receving receipts with template Storm
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/modules_delivery.php';
require_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
@@ -157,7 +157,7 @@ public function __construct($db)
/**
* Function to build pdf onto disk
*
- * @param Livraison $object Object to generate
+ * @param Delivery $object Object to generate
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param int $hidedetails Do not show line details
diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
similarity index 99%
rename from htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
rename to htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
index 8ea980fbd5c8e..114283c677366 100644
--- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
@@ -22,12 +22,12 @@
*/
/**
- * \file htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+ * \file htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
* \ingroup livraison
* \brief File of class to manage receving receipts with template Typhon
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/modules_delivery.php';
require_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
@@ -618,7 +618,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
}
}
- $this->error = $langs->transnoentities("ErrorConstantNotDefined", "LIVRAISON_OUTPUTDIR");
+ $this->error = $langs->transnoentities("ErrorConstantNotDefined", "DELIVERY_OUTPUTDIR");
return 0;
}
@@ -844,7 +844,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
// If SHIPPING contact defined on order, we use it
$usecontact = false;
$arrayidcontact = $object->commande->getIdContact('external', 'SHIPPING');
- if (count($arrayidcontact) > 0)
+ if ($arrayidcontact && count($arrayidcontact) > 0)
{
$usecontact = true;
$result = $object->fetch_contact($arrayidcontact[0]);
diff --git a/htdocs/core/modules/livraison/index.html b/htdocs/core/modules/delivery/index.html
similarity index 100%
rename from htdocs/core/modules/livraison/index.html
rename to htdocs/core/modules/delivery/index.html
diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/delivery/mod_delivery_jade.php
similarity index 90%
rename from htdocs/core/modules/livraison/mod_livraison_jade.php
rename to htdocs/core/modules/delivery/mod_delivery_jade.php
index 1cf337814b96b..822986cffa544 100644
--- a/htdocs/core/modules/livraison/mod_livraison_jade.php
+++ b/htdocs/core/modules/delivery/mod_delivery_jade.php
@@ -19,20 +19,20 @@
*/
/**
- * \file htdocs/core/modules/livraison/mod_livraison_jade.php
+ * \file htdocs/core/modules/delivery/mod_delivery_jade.php
* \ingroup delivery
* \brief Fichier contenant la classe du modele de numerotation de reference de bon de livraison Jade
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/modules_delivery.php';
/**
- * \class mod_livraison_jade
+ * \class mod_delivery_jade
* \brief Classe du modele de numerotation de reference de bon de livraison Jade
*/
-class mod_livraison_jade extends ModeleNumRefDeliveryOrder
+class mod_delivery_jade extends ModeleNumRefDeliveryOrder
{
/**
* Dolibarr version of the loaded document
@@ -137,7 +137,7 @@ public function getNextValue($objsoc, $object)
$sql .= " AND entity = ".$conf->entity;
$resql = $db->query($sql);
- dol_syslog("mod_livraison_jade::getNextValue", LOG_DEBUG);
+ dol_syslog("mod_delivery_jade::getNextValue", LOG_DEBUG);
if ($resql) {
$obj = $db->fetch_object($resql);
if ($obj) $max = intval($obj->max);
@@ -153,7 +153,7 @@ public function getNextValue($objsoc, $object)
if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
else $num = sprintf("%04s", $max + 1);
- dol_syslog("mod_livraison_jade::getNextValue return ".$this->prefix.$yymm."-".$num);
+ dol_syslog("mod_delivery_jade::getNextValue return ".$this->prefix.$yymm."-".$num);
return $this->prefix.$yymm."-".$num;
}
@@ -166,7 +166,7 @@ public function getNextValue($objsoc, $object)
* @param Object $object Object livraison
* @return string Texte descriptif
*/
- public function livraison_get_num($objsoc = 0, $object = '')
+ public function delivery_get_num($objsoc = 0, $object = '')
{
// phpcs:enable
return $this->getNextValue($objsoc, $object);
diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php
similarity index 89%
rename from htdocs/core/modules/livraison/mod_livraison_saphir.php
rename to htdocs/core/modules/delivery/mod_delivery_saphir.php
index ad03984a6f22b..10a979d4ee2bc 100644
--- a/htdocs/core/modules/livraison/mod_livraison_saphir.php
+++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php
@@ -19,17 +19,17 @@
*/
/**
- * \file htdocs/core/modules/livraison/mod_livraison_saphir.php
+ * \file htdocs/core/modules/delivery/mod_livraison_saphir.php
* \ingroup expedition
* \brief Fichier contenant la classe du modele de numerotation de reference de livraison Saphir
*/
-require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
+require_once DOL_DOCUMENT_ROOT.'/core/modules/delivery/modules_delivery.php';
/**
- * \class mod_livraison_saphir
+ * \class mod_delivery_saphir
* \brief Classe du modele de numerotation de reference de livraison Saphir
*/
-class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
+class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
{
/**
* Dolibarr version of the loaded document
@@ -72,7 +72,7 @@ public function info()
$texte .= '