diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index e0c3c00adad..f5ea791a02d 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -1863,9 +1863,9 @@ class Commande extends CommonOrder
/**
* Load array this->expeditions of lines of shipments with nb of products sent for each order line
- * Note: For a dedicated shipment, the fetch_lines load the qty_asked and qty_shipped. This function return qty_shipped cuulated for order
+ * Note: For a dedicated shipment, the fetch_lines can be used to load the qty_asked and qty_shipped. This function is use to return qty_shipped cumulated for the order
*
- * @param int $filtre_statut Filter on status
+ * @param int $filtre_statut Filter on shipment status
* @return int <0 if KO, Nb of lines found if OK
*/
function loadExpeditions($filtre_statut=-1)
@@ -1934,21 +1934,6 @@ class Commande extends CommonOrder
else dol_print_error($this->db);
}
- /**
- * Return a array with sendings by line
- *
- * @param int $filtre_statut Filtre sur statut
- * @return int 0 si OK, <0 si KO
- *
- * TODO deprecate, move to Shipping class
- */
- function livraison_array($filtre_statut=self::STATUS_CANCELED)
- {
- $delivery = new Livraison($this->db);
- $deliveryArray = $delivery->livraison_array($filtre_statut);
- return $deliveryArray;
- }
-
/**
* Return a array with the pending stock by product
*
diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang
index 1ec229af6c5..c35aa71c8a1 100644
--- a/htdocs/langs/en_US/sendings.lang
+++ b/htdocs/langs/en_US/sendings.lang
@@ -72,6 +72,7 @@ ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from opened suppli
NoProductToShipFoundIntoStock=No product to ship found into warehouse %s. Correct stock or go back to choose another warehouse.
WeightVolShort=Weight/Vol.
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
+CloseShippeOrdersAutomatically=Classify the order "Delivered" if entirely shipped.
# Sending methods
SendingMethodCATCH=Catch by customer
diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php
index 9ae66ee685e..7b47c17f5c7 100644
--- a/htdocs/livraison/card.php
+++ b/htdocs/livraison/card.php
@@ -300,213 +300,7 @@ $formfile = new FormFile($db);
if ($action == 'create') // Seems to no be used
{
- print load_fiche_titre($langs->trans("CreateADeliveryOrder"));
-
- if ($mesg)
- {
- print $mesg.'
';
- }
-
- $commande = new Commande($db);
- $commande->livraison_array();
-
- if ($commande->fetch(GETPOST("commande_id")))
- {
- $soc = new Societe($db);
- $soc->fetch($commande->socid);
- $author = new User($db);
- $author->fetch($commande->user_author_id);
-
- if (!$conf->expedition_bon->enabled && ! empty($conf->stock->enabled))
- {
- $entrepot = new Entrepot($db);
- }
-
- /*
- * Commande
- */
- print '