diff --git a/ChangeLog b/ChangeLog
index 9682b0bd3bc..b1e050e14e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,21 +12,20 @@ NEW: Module Reception (for a more accurate management of your receptions) moved
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
-* Properties ->contactid have been renamed into ->contact_id
-* Properties ->titre have been renamed into ->title
-* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id (english)
-* The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you used the old syntax in
- your email templates.
-* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom
- days of holiday.
+* The object "livraison" has been renamed into "delivery" (directory, class, keys, methods with livraison in name ...).
+* All properties ->contactid have been renamed into ->contact_id
+* All properties ->titre have been renamed into ->title
+* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id
* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency.
+* The deprecated subsitution key __SIGNATURE__ has been removed. Use __USER_SIGNATURE__ if you used the old syntax in your email templates.
+* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday.
* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm),
you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait.
* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alphanohtml') so no html will be allowed. Use GETPOST(..., 'restricthtml') to accept HTML.
-* If you have links in your code with '&action=delete' as a parameter, you must also add '&token='.newToken() as another parameter to avoid CSRF protection errors.
-* The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of amount.
+* If you have links in your code with '&action=add', '&action=update', '&action=delete' as a parameter, you must also add '&token='.newToken() as another parameter to avoid CSRF protection errors.
+* The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of simple amount.
* The method select_thirdparty(), deprecated since 3.8, into html.form.class.php has been removed.
-* Depreciate all methods with name valide(). Use instead methods validate().
+* Depreciate all methods with name ->valide(). Use instead methods ->validate().
***** ChangeLog for 12.0.3 compared to 12.0.2 *****
diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec
index 039dafd198f..628ef917c05 100755
--- a/build/rpm/dolibarr_fedora.spec
+++ b/build/rpm/dolibarr_fedora.spec
@@ -181,6 +181,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
+%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@@ -198,7 +199,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
-%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec
index 098a041680a..aefc375d961 100755
--- a/build/rpm/dolibarr_generic.spec
+++ b/build/rpm/dolibarr_generic.spec
@@ -261,6 +261,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
+%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@@ -278,7 +279,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
-%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec
index a3f2d1d8d96..bcccb7c02a4 100755
--- a/build/rpm/dolibarr_mandriva.spec
+++ b/build/rpm/dolibarr_mandriva.spec
@@ -177,6 +177,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
+%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
@@ -195,7 +196,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
-%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec
index 5b1b86b28f4..8a55dd84faa 100755
--- a/build/rpm/dolibarr_opensuse.spec
+++ b/build/rpm/dolibarr_opensuse.spec
@@ -189,6 +189,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
+%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@@ -206,7 +207,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
-%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin
diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php
index e6a67aa73c8..18256c33766 100755
--- a/dev/initdata/purge-data.php
+++ b/dev/initdata/purge-data.php
@@ -120,8 +120,8 @@ $sqls=array(
"DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'",
),
'delivery'=>array(
- "DELETE FROM ".MAIN_DB_PREFIX."livraisondet WHERE fk_livraison IN (select rowid FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__')",
- "DELETE FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__'",
+ "DELETE FROM ".MAIN_DB_PREFIX."deliverydet WHERE fk_delivery IN (select rowid FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__')",
+ "DELETE FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__'",
),
'contract'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))",
diff --git a/dev/initdemo/mysqldump_dolibarr_12.0.0.sql b/dev/initdemo/mysqldump_dolibarr_12.0.0.sql
index eba3113014c..a05c05c066e 100644
--- a/dev/initdemo/mysqldump_dolibarr_12.0.0.sql
+++ b/dev/initdemo/mysqldump_dolibarr_12.0.0.sql
@@ -7522,13 +7522,13 @@ INSERT INTO `llx_links` VALUES (1,1,'2018-01-16 16:45:35','http://www.dolicloud.
UNLOCK TABLES;
--
--- Table structure for table `llx_livraison`
+-- Table structure for table `llx_delivery`
--
-DROP TABLE IF EXISTS `llx_livraison`;
+DROP TABLE IF EXISTS `llx_delivery`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `llx_livraison` (
+CREATE TABLE `llx_delivery` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`ref` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -7554,61 +7554,61 @@ CREATE TABLE `llx_livraison` (
`import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL,
`extraparams` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rowid`),
- UNIQUE KEY `idx_livraison_uk_ref` (`ref`,`entity`),
- KEY `idx_livraison_fk_soc` (`fk_soc`),
- KEY `idx_livraison_fk_user_author` (`fk_user_author`),
- KEY `idx_livraison_fk_user_valid` (`fk_user_valid`),
- CONSTRAINT `fk_livraison_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`),
- CONSTRAINT `fk_livraison_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`),
- CONSTRAINT `fk_livraison_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`)
+ UNIQUE KEY `idx_delivery_uk_ref` (`ref`,`entity`),
+ KEY `idx_delivery_fk_soc` (`fk_soc`),
+ KEY `idx_delivery_fk_user_author` (`fk_user_author`),
+ KEY `idx_delivery_fk_user_valid` (`fk_user_valid`),
+ CONSTRAINT `fk_delivery_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`),
+ CONSTRAINT `fk_delivery_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`),
+ CONSTRAINT `fk_delivery_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `llx_livraison`
+-- Dumping data for table `llx_delivery`
--
-LOCK TABLES `llx_livraison` WRITE;
-/*!40000 ALTER TABLE `llx_livraison` DISABLE KEYS */;
-/*!40000 ALTER TABLE `llx_livraison` ENABLE KEYS */;
+LOCK TABLES `llx_delivery` WRITE;
+/*!40000 ALTER TABLE `llx_delivery` DISABLE KEYS */;
+/*!40000 ALTER TABLE `llx_delivery` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `llx_livraison_extrafields`
+-- Table structure for table `llx_delivery_extrafields`
--
-DROP TABLE IF EXISTS `llx_livraison_extrafields`;
+DROP TABLE IF EXISTS `llx_delivery_extrafields`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `llx_livraison_extrafields` (
+CREATE TABLE `llx_delivery_extrafields` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`fk_object` int(11) NOT NULL,
`import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rowid`),
- KEY `idx_livraison_extrafields` (`fk_object`)
+ KEY `idx_delivery_extrafields` (`fk_object`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `llx_livraison_extrafields`
+-- Dumping data for table `llx_delivery_extrafields`
--
-LOCK TABLES `llx_livraison_extrafields` WRITE;
-/*!40000 ALTER TABLE `llx_livraison_extrafields` DISABLE KEYS */;
-/*!40000 ALTER TABLE `llx_livraison_extrafields` ENABLE KEYS */;
+LOCK TABLES `llx_delivery_extrafields` WRITE;
+/*!40000 ALTER TABLE `llx_delivery_extrafields` DISABLE KEYS */;
+/*!40000 ALTER TABLE `llx_delivery_extrafields` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `llx_livraisondet`
+-- Table structure for table `llx_deliverydet`
--
-DROP TABLE IF EXISTS `llx_livraisondet`;
+DROP TABLE IF EXISTS `llx_deliverydet`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `llx_livraisondet` (
+CREATE TABLE `llx_deliverydet` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
- `fk_livraison` int(11) DEFAULT NULL,
+ `fk_delivery` int(11) DEFAULT NULL,
`fk_origin_line` int(11) DEFAULT NULL,
`fk_product` int(11) DEFAULT NULL,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -7617,44 +7617,44 @@ CREATE TABLE `llx_livraisondet` (
`total_ht` double(24,8) DEFAULT 0.00000000,
`rang` int(11) DEFAULT 0,
PRIMARY KEY (`rowid`),
- KEY `idx_livraisondet_fk_expedition` (`fk_livraison`),
- CONSTRAINT `fk_livraisondet_fk_livraison` FOREIGN KEY (`fk_livraison`) REFERENCES `llx_livraison` (`rowid`)
+ KEY `idx_deliverydet_fk_expedition` (`fk_delivery`),
+ CONSTRAINT `fk_deliverydet_fk_delivery` FOREIGN KEY (`fk_delivery`) REFERENCES `llx_delivery` (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `llx_livraisondet`
+-- Dumping data for table `llx_deliverydet`
--
-LOCK TABLES `llx_livraisondet` WRITE;
-/*!40000 ALTER TABLE `llx_livraisondet` DISABLE KEYS */;
-/*!40000 ALTER TABLE `llx_livraisondet` ENABLE KEYS */;
+LOCK TABLES `llx_deliverydet` WRITE;
+/*!40000 ALTER TABLE `llx_deliverydet` DISABLE KEYS */;
+/*!40000 ALTER TABLE `llx_deliverydet` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `llx_livraisondet_extrafields`
+-- Table structure for table `llx_deliverydet_extrafields`
--
-DROP TABLE IF EXISTS `llx_livraisondet_extrafields`;
+DROP TABLE IF EXISTS `llx_deliverydet_extrafields`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `llx_livraisondet_extrafields` (
+CREATE TABLE `llx_deliverydet_extrafields` (
`rowid` int(11) NOT NULL AUTO_INCREMENT,
`tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`fk_object` int(11) NOT NULL,
`import_key` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rowid`),
- KEY `idx_livraisondet_extrafields` (`fk_object`)
+ KEY `idx_deliverydet_extrafields` (`fk_object`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `llx_livraisondet_extrafields`
+-- Dumping data for table `llx_deliverydet_extrafields`
--
-LOCK TABLES `llx_livraisondet_extrafields` WRITE;
-/*!40000 ALTER TABLE `llx_livraisondet_extrafields` DISABLE KEYS */;
-/*!40000 ALTER TABLE `llx_livraisondet_extrafields` ENABLE KEYS */;
+LOCK TABLES `llx_deliverydet_extrafields` WRITE;
+/*!40000 ALTER TABLE `llx_deliverydet_extrafields` DISABLE KEYS */;
+/*!40000 ALTER TABLE `llx_deliverydet_extrafields` ENABLE KEYS */;
UNLOCK TABLES;
--
diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php
index f87edd87483..0eadfa2c629 100644
--- a/htdocs/admin/confexped.php
+++ b/htdocs/admin/confexped.php
@@ -67,12 +67,12 @@ if ($action == 'disable_sending')
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 @@ else
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 ' | ';
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/livraison.php b/htdocs/admin/delivery.php
similarity index 92%
rename from htdocs/admin/livraison.php
rename to htdocs/admin/delivery.php
index 9e4f132e374..dc63b7a5f2f 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/delivery.php
@@ -24,15 +24,15 @@
*/
/**
- * \file htdocs/admin/livraison.php
- * \ingroup livraison
- * \brief Page d'administration/configuration du module Livraison
+ * \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';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
+require_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php';
// Load translation files required by the page
$langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
@@ -87,7 +87,7 @@ if ($action == 'specimen')
{
$modele = GETPOST('module', 'alpha');
- $sending = new Livraison($db);
+ $sending = new Delivery($db);
$sending->initAsSpecimen();
// Search template files
@@ -95,7 +95,7 @@ if ($action == 'specimen')
$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 ($action == 'specimen')
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 @@ if ($action == 'del')
$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 @@ if ($action == 'setmod')
// 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 @@ clearstatcache();
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 @@ foreach ($dirmodels as $reldir)
{
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 @@ foreach ($dirmodels as $reldir)
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 {
@@ -245,13 +245,13 @@ foreach ($dirmodels as $reldir)
}
print ' | ';
- $livraison = new Livraison($db);
- $livraison->initAsSpecimen();
+ $delivery = new Delivery($db);
+ $delivery->initAsSpecimen();
// Info
$htmltooltip = '';
$htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
';
- $nextval = $module->getNextValue($mysoc, $livraison);
+ $nextval = $module->getNextValue($mysoc, $delivery);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip .= ''.$langs->trans("NextValue").': ';
if ($nextval) {
@@ -323,7 +323,7 @@ clearstatcache();
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 @@ foreach ($dirmodels as $reldir)
// 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/admin/livraison_extrafields.php b/htdocs/admin/delivery_extrafields.php
similarity index 94%
rename from htdocs/admin/livraison_extrafields.php
rename to htdocs/admin/delivery_extrafields.php
index 4ec88fa20a9..38628fa171b 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';
@@ -49,7 +49,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoenti
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');
-$elementtype = 'livraison'; //Must be the $table_element of the class that manage extrafield
+$elementtype = 'delivery'; //Must be the $table_element of the class that manage extrafield
if (!$user->admin) accessforbidden();
diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php
similarity index 94%
rename from htdocs/admin/livraisondet_extrafields.php
rename to htdocs/admin/deliverydet_extrafields.php
index bcfce0e9f84..50dea86c2a5 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';
@@ -50,7 +50,7 @@ foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoenti
$action = GETPOST('action', 'aZ09');
$attrname = GETPOST('attrname', 'alpha');
-$elementtype = 'livraisondet'; //Must be the $table_element of the class that manage extrafield
+$elementtype = 'deliverydet'; //Must be the $table_element of the class that manage extrafield
if (!$user->admin) accessforbidden();
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index aa20ee83712..4a4cf3c37dd 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -287,7 +287,7 @@ if (empty($reshook))
dol_print_error($db, $object->error);
} elseif ($action == 'setdate_livraison' && $usercancreate)
{
- $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear']));
+ $result = $object->set_delivery_date($user, dol_mktime(12, 0, 0, $_POST['date_livraisonmonth'], $_POST['date_livraisonday'], $_POST['date_livraisonyear']));
if ($result < 0)
dol_print_error($db, $object->error);
} // Positionne ref client
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 18fce5fbaa7..c772044af81 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -152,9 +152,9 @@ class Propal extends CommonObject
public $datep;
/**
- * @var integer|string $date_livraison;
+ * @var integer|string $delivery_date;
*/
- public $date_livraison;
+ public $delivery_date;
public $fin_validite;
@@ -2065,11 +2065,11 @@ class Propal extends CommonObject
* Set delivery date
*
* @param User $user Object user that modify
- * @param int $date_livraison Delivery date
+ * @param int $delivery_date Delivery date
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
- public function set_date_livraison($user, $date_livraison, $notrigger = 0)
+ public function set_delivery_date($user, $delivery_date, $notrigger = 0)
{
// phpcs:enable
if (!empty($user->rights->propal->creer))
@@ -2079,7 +2079,7 @@ class Propal extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."propal ";
- $sql .= " SET date_livraison = ".($date_livraison != '' ? "'".$this->db->idate($date_livraison)."'" : 'null');
+ $sql .= " SET date_livraison = ".($delivery_date != '' ? "'".$this->db->idate($delivery_date)."'" : 'null');
$sql .= " WHERE rowid = ".$this->id;
dol_syslog(__METHOD__, LOG_DEBUG);
@@ -2093,7 +2093,7 @@ class Propal extends CommonObject
if (!$error)
{
$this->oldcopy = clone $this;
- $this->date_livraison = $date_livraison;
+ $this->date_livraison = $delivery_date;
}
if (!$notrigger && empty($error))
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index f4bdc1cb0aa..596fe4e94bc 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -541,7 +541,7 @@ if (empty($reshook))
$datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
$object->fetch($id);
- $result = $object->set_date_livraison($user, $datedelivery);
+ $result = $object->set_delivery_date($user, $datedelivery);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
@@ -2556,7 +2556,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->delivery->creer)) {
if ($user->rights->expedition->creer) {
print ''.$langs->trans('CreateShipment').'';
} else {
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index fbf6c2548b9..b7095bef93a 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -180,7 +180,7 @@ class Commande extends CommonOrder
*/
public $date_commande;
- public $date_livraison; // Date expected of shipment (date starting shipment, not the reception that occurs some days after)
+ public $delivery_date; // Date expected of shipment (date starting shipment, not the reception that occurs some days after)
/**
* @var int ID
@@ -2552,11 +2552,11 @@ class Commande extends CommonOrder
* Set the planned delivery date
*
* @param User $user Objet utilisateur qui modifie
- * @param int $date_livraison Date de livraison
+ * @param int $delivery_date Delivery date
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok
*/
- public function set_date_livraison($user, $date_livraison, $notrigger = 0)
+ public function set_delivery_date($user, $delivery_date, $notrigger = 0)
{
// phpcs:enable
if ($user->rights->commande->creer)
@@ -2566,7 +2566,7 @@ class Commande extends CommonOrder
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
- $sql .= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null');
+ $sql .= " SET date_livraison = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
$sql .= " WHERE rowid = ".$this->id;
dol_syslog(__METHOD__, LOG_DEBUG);
@@ -2580,7 +2580,7 @@ class Commande extends CommonOrder
if (!$error)
{
$this->oldcopy = clone $this;
- $this->date_livraison = $date_livraison;
+ $this->date_livraison = $delivery_date;
}
if (!$notrigger && empty($error))
diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
index 54b8955d519..bc86591fc22 100644
--- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
+++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
@@ -112,10 +112,10 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
while ($line < $num) {
$objp = $this->db->fetch_object($result);
$date = $this->db->jdate($objp->date_commande);
- $date_livraison = $this->db->jdate($objp->date_livraison);
+ $delivery_date = $this->db->jdate($objp->date_livraison);
$datem = $this->db->jdate($objp->tms);
- $supplierorderstatic->date_livraison = $date_livraison;
+ $supplierorderstatic->date_livraison = $delivery_date;
$supplierorderstatic->statut = $objp->fk_statut;
$supplierorderstatic->id = $objp->rowid;
@@ -152,7 +152,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
- 'text' => $delayIcon.' '.dol_print_date($date_livraison, 'day').'',
+ 'text' => $delayIcon.' '.dol_print_date($delivery_date, 'day').'',
'asis' => 1
);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index be1d4d45cdc..c9f038722ba 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -3356,7 +3356,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 ce726265006..d87174c5636 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_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 f28ad165453..bf52ff5871a 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6898,7 +6898,7 @@ class Form
$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 464dbafa375..c700cd9d6f1 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -366,7 +366,7 @@ class FormFile
}
$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 @@ class FormFile
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 b575247e84b..92c58d7b5db 100644
--- a/htdocs/core/lib/expedition.lib.php
+++ b/htdocs/core/lib/expedition.lib.php
@@ -51,9 +51,9 @@ 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/livraison.php";
+ $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php";
$head[$h][1] = $langs->trans("Receivings");
$h++;
}
@@ -109,25 +109,25 @@ 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/livraison.php";
+ $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php";
$head[$h][1] = $langs->trans("Receivings");
$head[$h][2] = 'receivings';
$h++;
}
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
- $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++;
}
- if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
+ if (!empty($conf->global->MAIN_SUBMODULE_DELIVERY))
{
- $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/files.lib.php b/htdocs/core/lib/files.lib.php
index d926e6105a1..1e0d298bb69 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -2644,10 +2644,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 fe7866f3a50..f7c81e148e4 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -8723,9 +8723,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 bb89d1777d8..d49085ecb8e 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..bf7bc352e3f 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->delivery->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..ef41614116f 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->delivery->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 b81757f261f..59f0e46d428 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->delivery->lire)
{
// delivery link
$object->fetchObjectLinked($object->id, $object->element);
@@ -56,7 +56,7 @@ function shipping_prepare_head($object)
// Take first one element of array
$tmp = reset($object->linkedObjectsIds['delivery']);
- $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$tmp;
+ $head[$h][0] = DOL_URL_ROOT."/delivery/card.php?id=".$tmp;
$head[$h][1] = $langs->trans("DeliveryCard");
$head[$h][2] = 'delivery';
$h++;
@@ -135,7 +135,7 @@ function delivery_prepare_head($object)
$h++;
}
- $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$object->id;
+ $head[$h][0] = DOL_URL_ROOT."/delivery/card.php?id=".$object->id;
$head[$h][1] = $langs->trans("DeliveryCard");
$head[$h][2] = 'delivery';
$h++;
@@ -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."livraison as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."livraisondet as ld ON ld.fk_livraison = 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 ' | ';
print ' | ';
}*/
- if (!empty($conf->livraison_bon->enabled))
+ if (!empty($conf->delivery_note->enabled))
{
print ''.$langs->trans("DeliveryOrder").' | ';
//print ''.$langs->trans("QtyReceived").' | ';
@@ -403,9 +403,9 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
}*/
// Informations on receipt
- if (!empty($conf->livraison_bon->enabled))
+ if (!empty($conf->delivery_note->enabled))
{
- include_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php';
$expedition->id = $objp->sendingid;
$expedition->fetchObjectLinked($expedition->id, $expedition->element);
//var_dump($expedition->linkedObjects);
@@ -423,7 +423,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
// Ref
print '';
print $receiving->getNomUrl($db);
- //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.'';
+ //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.'';
print ' | ';
// Qty received
//print '';
diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
index 27b40d48257..56c538af8a6 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 @@ class pdf_ban extends ModeleBankAccountDoc
}
}
- $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 b6e4cbc191a..2b8987958f4 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 @@ class pdf_sepamandate extends ModeleBankAccountDoc
}
}
- $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 2019de478eb..7de29cce294 100644
--- a/htdocs/core/modules/livraison/doc/pdf_storm.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php
@@ -23,13 +23,13 @@
*/
/**
- * \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.'/livraison/class/livraison.class.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 @@ class pdf_storm extends ModelePDFDeliveryOrder
/**
* 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 34b66066f54..114283c6773 100644
--- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php
@@ -22,13 +22,13 @@
*/
/**
- * \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.'/livraison/class/livraison.class.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 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
}
- $this->error = $langs->transnoentities("ErrorConstantNotDefined", "LIVRAISON_OUTPUTDIR");
+ $this->error = $langs->transnoentities("ErrorConstantNotDefined", "DELIVERY_OUTPUTDIR");
return 0;
}
@@ -844,7 +844,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// 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 88%
rename from htdocs/core/modules/livraison/mod_livraison_jade.php
rename to htdocs/core/modules/delivery/mod_delivery_jade.php
index 01788cd863b..822986cffa5 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
@@ -98,7 +98,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
$posindice = strlen($this->prefix) + 6;
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
- $sql .= " FROM ".MAIN_DB_PREFIX."livraison";
+ $sql .= " FROM ".MAIN_DB_PREFIX."delivery";
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
$sql .= " AND entity = ".$conf->entity;
@@ -132,12 +132,12 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
// First, we get the max value
$posindice = strlen($this->prefix) + 6;
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
- $sql .= " FROM ".MAIN_DB_PREFIX."livraison";
+ $sql .= " FROM ".MAIN_DB_PREFIX."delivery";
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
$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 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
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 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
* @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 ad03984a6f2..10a979d4ee2 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 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
$texte .= ' |