From af7c23b2accafe5bcbf2b2aa0b5842e28f288a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien?= Date: Tue, 6 Oct 2020 12:05:24 +0200 Subject: [PATCH] rename folder admin/livraison.php and dependencies #14697 --- htdocs/admin/{livraison.php => delivery.php} | 6 +++--- ...raison_extrafields.php => delivery_extrafields.php} | 6 +++--- ...det_extrafields.php => deliverydet_extrafields.php} | 6 +++--- htdocs/commande/card.php | 2 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/conf.class.php | 6 +++--- htdocs/core/lib/expedition.lib.php | 8 ++++---- htdocs/core/lib/functions.lib.php | 6 +++--- htdocs/core/lib/functions2.lib.php | 6 +++--- htdocs/core/lib/order.lib.php | 10 +++++----- htdocs/core/lib/propal.lib.php | 4 ++-- htdocs/core/lib/sendings.lib.php | 10 +++++----- htdocs/expedition/card.php | 8 ++++---- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/expedition/list.php | 4 ++-- htdocs/install/mysql/tables/llx_menu.sql | 2 +- htdocs/install/upgrade2.php | 4 ++-- htdocs/reception/card.php | 4 ++-- 18 files changed, 48 insertions(+), 48 deletions(-) rename htdocs/admin/{livraison.php => delivery.php} (99%) rename htdocs/admin/{livraison_extrafields.php => delivery_extrafields.php} (96%) rename htdocs/admin/{livraisondet_extrafields.php => deliverydet_extrafields.php} (96%) diff --git a/htdocs/admin/livraison.php b/htdocs/admin/delivery.php similarity index 99% rename from htdocs/admin/livraison.php rename to htdocs/admin/delivery.php index 38c9114f50b..4ef0179d88e 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/delivery.php @@ -24,9 +24,9 @@ */ /** - * \file htdocs/admin/livraison.php - * \ingroup livraison - * \brief Page d'administration/configuration du module Delivery + * \file htdocs/admin/delivery.php + * \ingroup delivery + * \brief age to setup extra fields of delivery */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/delivery_extrafields.php similarity index 96% rename from htdocs/admin/livraison_extrafields.php rename to htdocs/admin/delivery_extrafields.php index 7c1d5cb3a5c..182985b47da 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -22,9 +22,9 @@ */ /** - * \file htdocs/admin/livraison_extrafields.php - * \ingroup livraison - * \brief Page to setup extra fields of livraison + * \file htdocs/admin/delivery_extrafields.php + * \ingroup delivery + * \brief Page to setup extra fields of delivery */ require '../main.inc.php'; diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php similarity index 96% rename from htdocs/admin/livraisondet_extrafields.php rename to htdocs/admin/deliverydet_extrafields.php index ee174ab5024..11be79f1cc4 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -24,9 +24,9 @@ */ /** - * \file htdocs/admin/livraisondet_extrafields.php - * \ingroup livraison - * \brief Page to setup extra fields of livraison + * \file htdocs/admin/deliverydet_extrafields.php + * \ingroup delivery + * \brief Page to setup extra fields of delivery */ require '../main.inc.php'; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index eeec7bcd0c1..0e66e56cc87 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2555,7 +2555,7 @@ if ($action == 'create' && $usercancreate) $numshipping = $object->nb_expedition(); if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) { - if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) { + if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->delivery_note->enabled && $user->rights->expedition->livraison->creer)) { if ($user->rights->expedition->creer) { print ''.$langs->trans('CreateShipment').''; } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3ea4bba4a7f..05e1d4a2cd5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3314,7 +3314,7 @@ abstract class CommonObject } elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; } elseif ($objecttype == 'delivery') { - $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; + $classpath = 'delivery/class'; $subelement = 'delivery'; $module = 'delivery_note'; } elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; } elseif ($objecttype == 'fichinter') { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 32d7b145a41..7c2a4fd0788 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -122,7 +122,7 @@ class Conf // First level object // TODO Remove this part. $this->expedition_bon = new stdClass(); - $this->livraison_bon = new stdClass(); + $this->delivery_note = new stdClass(); $this->fournisseur = new stdClass(); $this->product = new stdClass(); $this->service = new stdClass(); @@ -370,8 +370,8 @@ class Conf // Sous module bons d'expedition $this->expedition_bon->enabled = (!empty($this->global->MAIN_SUBMODULE_EXPEDITION) ? $this->global->MAIN_SUBMODULE_EXPEDITION : 0); - // Sous module bons de livraison - $this->livraison_bon->enabled = (!empty($this->global->MAIN_SUBMODULE_LIVRAISON) ? $this->global->MAIN_SUBMODULE_LIVRAISON : 0); + // Sub module delivery note Sous module bons de livraison + $this->delivery_note->enabled = (!empty($this->global->MAIN_SUBMODULE_LIVRAISON) ? $this->global->MAIN_SUBMODULE_LIVRAISON : 0); // Module fournisseur if (!empty($this->fournisseur)) diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index b575247e84b..a7881bb9e29 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -53,7 +53,7 @@ function expedition_prepare_head(Expedition $object) if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php"; $head[$h][1] = $langs->trans("Receivings"); $h++; } @@ -111,7 +111,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][0] = DOL_URL_ROOT."/admin/delivery.php"; $head[$h][1] = $langs->trans("Receivings"); $head[$h][2] = 'receivings'; $h++; @@ -119,7 +119,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/livraison_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/admin/delivery_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields"); $head[$h][2] = 'attributes_receivings'; $h++; @@ -127,7 +127,7 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/livraisondet_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/admin/deliverydet_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsLines"); $head[$h][2] = 'attributeslines_receivings'; $h++; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3af3f7c2562..f60043e9d97 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8650,9 +8650,9 @@ function getElementProperties($element_type) $module = 'expedition_bon'; } if ($element_type == 'delivery') { - $classpath = 'livraison/class'; - $subelement = 'livraison'; - $module = 'livraison_bon'; + $classpath = 'delivery/class'; + $subelement = 'delivery'; + $module = 'delivery_note'; } if ($element_type == 'contract') { $classpath = 'contrat/class'; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7cc14060aac..1f4cbfa9644 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1791,9 +1791,9 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '') $myobject = 'expedition'; $module = 'expedition_bon'; } elseif ($objecttype == 'delivery') { - $classpath = 'livraison/class'; - $myobject = 'livraison'; - $module = 'livraison_bon'; + $classpath = 'delivery/class'; + $myobject = 'delivery'; + $module = 'delivery_note'; } elseif ($objecttype == 'contract') { $classpath = 'contrat/class'; $module = 'contrat'; diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 939b731f135..4e2f2fac24d 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -59,17 +59,17 @@ function commande_prepare_head(Commande $object) } if (($conf->expedition_bon->enabled && $user->rights->expedition->lire) - || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->lire)) + || ($conf->delivery_note->enabled && $user->rights->expedition->livraison->lire)) { $nbShipments = $object->getNbOfShipments(); $nbReceiption = 0; $head[$h][0] = DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id; $text = ''; if ($conf->expedition_bon->enabled) $text .= $langs->trans("Shipments"); - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text .= ' - '; - if ($conf->livraison_bon->enabled) $text .= $langs->trans("Receivings"); + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled) $text .= ' - '; + if ($conf->delivery_note->enabled) $text .= $langs->trans("Receivings"); if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''.($nbShipments ? $nbShipments : 0); - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - '; - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0); + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ' - '; + if ($conf->expedition_bon->enabled && $conf->delivery_note->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text .= ($nbReceiption ? $nbReceiption : 0); if ($nbShipments > 0 || $nbReceiption > 0) $text .= ''; $head[$h][1] = $text; $head[$h][2] = 'shipping'; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index a1dab5cd6cb..126a62fdf5e 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -43,13 +43,13 @@ function propal_prepare_head($object) $h++; if ((empty($conf->commande->enabled) && ((!empty($conf->expedition->enabled) && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (!empty($conf->expedition->enabled) && !empty($conf->livraison_bon->enabled) && $user->rights->expedition->livraison->lire)))) + || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->livraison->lire)))) { $langs->load("sendings"); $text = ''; $head[$h][0] = DOL_URL_ROOT.'/expedition/propal.php?id='.$object->id; if ($conf->expedition_bon->enabled) $text = $langs->trans("Shipment"); - if ($conf->livraison_bon->enabled) $text .= '/'.$langs->trans("Receivings"); + if ($conf->delivery_note->enabled) $text .= '/'.$langs->trans("Receivings"); $head[$h][1] = $text; $head[$h][2] = 'shipping'; $h++; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 447310c8ad2..23f009b6234 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -47,7 +47,7 @@ function shipping_prepare_head($object) $head[$h][2] = 'shipping'; $h++; - if ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->lire) + if ($conf->delivery_note->enabled && $user->rights->expedition->livraison->lire) { // delivery link $object->fetchObjectLinked($object->id, $object->element); @@ -213,13 +213,13 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') $sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end,"; $sql .= " ed.rowid as edrowid, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot as warehouse_id,"; $sql .= " e.rowid as sendingid, e.ref as exp_ref, e.date_creation, e.date_delivery, e.date_expedition,"; - //if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,"; + //if ($conf->delivery_note->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,"; $sql .= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch,'; $sql .= ' p.description as product_desc'; $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; - //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; + //if ($conf->delivery_note->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; //TODO Add link to expeditiondet_batch $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; @@ -260,7 +260,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; print ''; }*/ - if (!empty($conf->livraison_bon->enabled)) + if (!empty($conf->delivery_note->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->livraison_bon->enabled)) + if (!empty($conf->delivery_note->enabled)) { include_once DOL_DOCUMENT_ROOT.'/delivery/class/delivery.class.php'; $expedition->id = $objp->sendingid; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f4f087aa5a3..37c7119d814 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -399,7 +399,7 @@ if (empty($reshook)) /* * Build a receiving receipt */ - elseif ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer) + elseif ($action == 'create_delivery' && $conf->delivery_note->enabled && $user->rights->expedition->livraison->creer) { $result = $object->create_delivery($user); if ($result > 0) @@ -2046,13 +2046,13 @@ if ($action == 'create') $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 shipmentline_id, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot"; $sql .= ", e.rowid as shipment_id, e.ref as shipment_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_expedition"; - //if ($conf->livraison_bon->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received"; + //if ($conf->delivery_note->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received"; $sql .= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch'; $sql .= ', p.description as product_desc'; $sql .= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; - //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; + //if ($conf->delivery_note->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON obj.fk_product = p.rowid"; $sql .= " WHERE e.entity IN (".getEntity('expedition').")"; $sql .= " AND obj.fk_".$origin." = ".$origin_id; @@ -2467,7 +2467,7 @@ if ($action == 'create') // This is just to generate a delivery receipt //var_dump($object->linkedObjectsIds['delivery']); - if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds['delivery'])) + if ($conf->delivery_note->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds['delivery'])) { print ''.$langs->trans("CreateDeliveryOrder").''; } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index dd6b9992064..e475053dcda 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -873,7 +873,7 @@ class Expedition extends CommonObject // phpcs:enable global $conf; - if ($conf->livraison_bon->enabled) + if ($conf->delivery_note->enabled) { if ($this->statut == self::STATUS_VALIDATED || $this->statut == self::STATUS_CLOSED) { diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 73db3ef8fe9..4270fe7421b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -127,8 +127,8 @@ $arrayfields = array( 'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - 'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'enabled'=>(empty($conf->livraison_bon->enabled) ? 0 : 1)), - 'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'checked'=>1, 'enabled'=>(empty($conf->livraison_bon->enabled) ? 0 : 1)), + 'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'enabled'=>(empty($conf->delivery_note->enabled) ? 0 : 1)), + 'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'checked'=>1, 'enabled'=>(empty($conf->delivery_note->enabled) ? 0 : 1)), 'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) ); diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 4408cb69627..b9641aff1f4 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -39,7 +39,7 @@ CREATE TABLE llx_menu langs varchar(100), -- Lang file to load for translation level smallint, -- Deprecated. Not used. perms text, -- Condition to show enabled or disabled - enabled text NULL default '1', -- Condition to show or hide + enabled text NULL, -- Condition to show or hide usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only tms timestamp diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 6c154ca062a..c6208f1dd1b 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -2090,11 +2090,11 @@ function migrate_commande_livraison($db, $langs, $conf) if ($resql2) { - $date_livraison = $db->jdate($obj->date_livraison); + $delivery_date = $db->jdate($obj->date_livraison); $sqlu = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; $sqlu .= " ref_client='".$db->escape($obj->ref_client)."'"; - $sqlu .= ", date_livraison='".$db->idate($date_livraison)."'"; + $sqlu .= ", date_livraison='".$db->idate($delivery_date)."'"; $sqlu .= " WHERE rowid = ".$obj->rowid; $resql3 = $db->query($sqlu); if (!$resql3) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index ed4f52c501b..e0e5f6f5d03 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1665,13 +1665,13 @@ if ($action == 'create') $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 receptionline_id, ed.qty, ed.fk_reception as reception_id, ed.fk_entrepot"; $sql .= ", e.rowid as reception_id, e.ref as reception_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_reception"; - //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."commande_fournisseur_dispatch as ed"; $sql .= ", ".MAIN_DB_PREFIX."reception as e"; $sql .= ", ".MAIN_DB_PREFIX.$origin."det as obj"; - //if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_reception = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."deliverydet as ld ON ld.fk_delivery = l.rowid AND obj.rowid = ld.fk_origin_line"; + //if ($conf->delivery_note->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.fk_reception = 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"; $sql .= " WHERE e.entity IN (".getEntity('reception').")"; $sql .= " AND obj.fk_commande = ".$origin_id;