diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 0a315897081..38c9114f50b 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -245,13 +245,13 @@ foreach ($dirmodels as $reldir)
}
print '';
- $livraison = new Delivery($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) {
diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php
index d30635333be..7c1d5cb3a5c 100644
--- a/htdocs/admin/livraison_extrafields.php
+++ b/htdocs/admin/livraison_extrafields.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/livraisondet_extrafields.php
index cc9dfa1c49f..ee174ab5024 100644
--- a/htdocs/admin/livraisondet_extrafields.php
+++ b/htdocs/admin/livraisondet_extrafields.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 9caf2c8483c..7a289867849 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 7e34ac6fc3c..0c44e4256da 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;
@@ -2060,11 +2060,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))
@@ -2074,7 +2074,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);
@@ -2088,7 +2088,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 5de377930d7..eeec7bcd0c1 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');
}
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 5c314226214..133a3cb4c81 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
@@ -2548,11 +2548,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)
@@ -2562,7 +2562,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);
@@ -2576,7 +2576,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 952e0b78d92..dc5b3684cd5 100644
--- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
+++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
@@ -113,10 +113,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;
@@ -153,7 +153,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/delivery/card.php b/htdocs/delivery/card.php
index 794717aa044..dc40d118f6e 100644
--- a/htdocs/delivery/card.php
+++ b/htdocs/delivery/card.php
@@ -170,7 +170,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio
if ($action == 'setdate_livraison' && $user->rights->expedition->livraison->creer)
{
$datedelivery = dol_mktime(GETPOST('liv_hour', 'int'), GETPOST('liv_min', 'int'), 0, GETPOST('liv_month', 'int'), GETPOST('liv_day', 'int'), GETPOST('liv_year', 'int'));
- $result = $object->set_date_livraison($user, $datedelivery);
+ $result = $object->set_delivery_date($user, $datedelivery);
if ($result < 0)
{
$mesg = '
'.$object->error.'
';
diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php
index 4ef1a257277..c87c2f87df6 100644
--- a/htdocs/delivery/class/delivery.class.php
+++ b/htdocs/delivery/class/delivery.class.php
@@ -1001,23 +1001,23 @@ class Delivery extends CommonObject
* Set the planned delivery date
*
* @param User $user Objet utilisateur qui modifie
- * @param integer $date_livraison Date de livraison
+ * @param integer $delivery_date Delivery date
* @return int <0 if KO, >0 if OK
*/
- public function set_date_livraison($user, $date_livraison)
+ public function set_delivery_date($user, $delivery_date)
{
// phpcs:enable
if ($user->rights->expedition->creer)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."delivery";
- $sql .= " SET date_delivery = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null');
+ $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
$sql .= " WHERE rowid = ".$this->id;
- dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG);
+ dol_syslog(get_class($this)."::set_delivery_date", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
- $this->date_delivery = $date_livraison;
+ $this->date_delivery = $delivery_date;
return 1;
} else {
$this->error = $this->db->error();
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index e808fa809c3..f4f087aa5a3 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -479,7 +479,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');
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index e5ae22d5f91..dd6b9992064 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1955,23 +1955,23 @@ class Expedition extends CommonObject
* Set the planned delivery date
*
* @param User $user Objet user that modify
- * @param integer $date_livraison Date of delivery
+ * @param integer $delivery_date Date of delivery
* @return int <0 if KO, >0 if OK
*/
- public function set_date_livraison($user, $date_livraison)
+ public function set_delivery_date($user, $delivery_date)
{
// phpcs:enable
if ($user->rights->expedition->creer)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition";
- $sql .= " SET date_delivery = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null');
+ $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
$sql .= " WHERE rowid = ".$this->id;
- dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG);
+ dol_syslog(get_class($this)."::set_delivery_date", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
- $this->date_delivery = $date_livraison;
+ $this->date_delivery = $delivery_date;
return 1;
} else {
$this->error = $this->db->error();
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 152dee7cd36..f6318c7b9b6 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -108,7 +108,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');
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 3d6d2c2f837..786cca8ac5c 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -117,7 +117,7 @@ class CommandeFournisseur extends CommonOrder
/**
* Delivery date
*/
- public $date_livraison;
+ public $delivery_date;
public $total_ht;
public $total_tva;
@@ -2263,11 +2263,11 @@ class CommandeFournisseur extends CommonOrder
* Set the planned delivery date
*
* @param User $user Objet user making change
- * @param integer $date_livraison Planned delivery date
+ * @param integer $delivery_date Planned 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 ($user->rights->fournisseur->commande->creer)
@@ -2277,7 +2277,7 @@ class CommandeFournisseur extends CommonOrder
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
- $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);
@@ -2291,7 +2291,7 @@ class CommandeFournisseur extends CommonOrder
if (!$error)
{
$this->oldcopy = clone $this;
- $this->date_livraison = $date_livraison;
+ $this->date_livraison = $delivery_date;
}
if (!$notrigger && empty($error))
@@ -2325,7 +2325,7 @@ class CommandeFournisseur extends CommonOrder
* Set the id projet
*
* @param User $user Objet utilisateur qui modifie
- * @param int $id_projet Date de livraison
+ * @param int $id_projet Delivery date
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok
*/
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 419d5c7a559..948404e2169 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -203,7 +203,7 @@ if (empty($reshook))
// date of delivery
if ($action == 'setdate_livraison' && $usercancreate)
{
- $result = $object->set_date_livraison($user, $datelivraison);
+ $result = $object->set_delivery_date($user, $datelivraison);
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
@@ -1199,7 +1199,7 @@ if (empty($reshook))
$result = $srcobject->fetch($object->origin_id);
if ($result > 0)
{
- $object->set_date_livraison($user, $srcobject->date_livraison);
+ $object->set_delivery_date($user, $srcobject->date_livraison);
$object->set_id_projet($user, $srcobject->fk_project);
$lines = $srcobject->lines;
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 4dfd36e4a98..ed4f52c501b 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -425,7 +425,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');
diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php
index 8ea45ccd1c8..0a2458f57a6 100644
--- a/htdocs/reception/class/reception.class.php
+++ b/htdocs/reception/class/reception.class.php
@@ -1224,23 +1224,23 @@ class Reception extends CommonObject
* Set the planned delivery date
*
* @param User $user Objet utilisateur qui modifie
- * @param integer $date_livraison Date de livraison
+ * @param integer $delivery_date Delivery date
* @return int <0 if KO, >0 if OK
*/
- public function set_date_livraison($user, $date_livraison)
+ public function set_delivery_date($user, $delivery_date)
{
// phpcs:enable
if ($user->rights->reception->creer)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."reception";
- $sql .= " SET date_delivery = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null');
+ $sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
$sql .= " WHERE rowid = ".$this->id;
- dol_syslog(get_class($this)."::set_date_livraison", LOG_DEBUG);
+ dol_syslog(get_class($this)."::set_delivery_date", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
- $this->date_delivery = $date_livraison;
+ $this->date_delivery = $delivery_date;
return 1;
} else {
$this->error = $this->db->error();
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index 1190b29aa3c..ed501a6f8a6 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -229,7 +229,7 @@ if (empty($reshook))
else setEventMessages($langs->trans($object->error), null, 'errors');
}
} elseif ($action == 'setdate_livraison' && $usercancreate) {
- $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']));
+ $result = $object->set_delivery_date($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']));
if ($result < 0)
dol_print_error($db, $object->error);
}
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index 92759515ba4..1a308469b6e 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -112,7 +112,7 @@ class SupplierProposal extends CommonObject
/**
* @var integer|string date_livraison
*/
- public $date_livraison;
+ public $delivery_date;
/**
* @deprecated
@@ -1511,25 +1511,25 @@ class SupplierProposal extends CommonObject
* Set delivery date
*
* @param User $user Object user that modify
- * @param int $date_livraison Delivery date
+ * @param int $delivery_date Delivery date
* @return int <0 if ko, >0 if ok
*/
- public function set_date_livraison($user, $date_livraison)
+ public function set_delivery_date($user, $delivery_date)
{
// phpcs:enable
if (!empty($user->rights->supplier_proposal->creer))
{
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal ";
- $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;
if ($this->db->query($sql))
{
- $this->date_livraison = $date_livraison;
+ $this->date_livraison = $delivery_date;
return 1;
} else {
$this->error = $this->db->error();
- dol_syslog(get_class($this)."::set_date_livraison Erreur SQL");
+ dol_syslog(get_class($this)."::set_delivery_date Erreur SQL");
return -1;
}
}