diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 0e66e56cc87..92c1777199e 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->delivery_note->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/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a2c7721f0f8..16526be2331 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -417,7 +417,7 @@ class FormFile $titletoshow = $langs->trans("Documents"); if (!empty($title)) $titletoshow = ($title == 'none' ? '' : $title); -print($modulepart); + // Show table if ($genallowed) { diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 4e2f2fac24d..bf7bc352e3f 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -59,7 +59,7 @@ function commande_prepare_head(Commande $object) } if (($conf->expedition_bon->enabled && $user->rights->expedition->lire) - || ($conf->delivery_note->enabled && $user->rights->expedition->livraison->lire)) + || ($conf->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; diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index 126a62fdf5e..ef41614116f 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -43,7 +43,7 @@ function propal_prepare_head($object) $h++; if ((empty($conf->commande->enabled) && ((!empty($conf->expedition->enabled) && !empty($conf->expedition_bon->enabled) && $user->rights->expedition->lire) - || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->livraison->lire)))) + || (!empty($conf->expedition->enabled) && !empty($conf->delivery_note->enabled) && $user->rights->expedition->delivery->lire)))) { $langs->load("sendings"); $text = ''; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 23f009b6234..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->delivery_note->enabled && $user->rights->expedition->livraison->lire) + if ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire) { // delivery link $object->fetchObjectLinked($object->id, $object->element); diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index eed6ec4ec5e..165633849a1 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -191,7 +191,7 @@ class modExpedition extends DolibarrModules $this->rights[$r][1] = 'Read delivery receipts'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; + $this->rights[$r][4] = 'delivery'; $this->rights[$r][5] = 'lire'; $r++; @@ -199,7 +199,7 @@ class modExpedition extends DolibarrModules $this->rights[$r][1] = 'Create/modify delivery receipts'; $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; + $this->rights[$r][4] = 'delivery'; $this->rights[$r][5] = 'creer'; $r++; @@ -207,7 +207,7 @@ class modExpedition extends DolibarrModules $this->rights[$r][1] = 'Validate delivery receipts'; $this->rights[$r][2] = 'd'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison_advance'; + $this->rights[$r][4] = 'delivery_advance'; $this->rights[$r][5] = 'validate'; $r++; @@ -215,7 +215,7 @@ class modExpedition extends DolibarrModules $this->rights[$r][1] = 'Delete delivery receipts'; $this->rights[$r][2] = 'd'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; + $this->rights[$r][4] = 'delivery'; $this->rights[$r][5] = 'supprimer'; diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 8f02f40fe3c..2453daab761 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -141,7 +141,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] if ($object->element == 'order_supplier') $permok = $user->rights->fournisseur->commande->creer; if ($object->element == 'invoice_supplier') $permok = $user->rights->fournisseur->facture->creer; if ($object->element == 'shipping') $permok = $user->rights->expedition->creer; - if ($object->element == 'delivery') $permok = $user->rights->expedition->livraison->creer; + if ($object->element == 'delivery') $permok = $user->rights->expedition->delivery->creer; if ($object->element == 'productlot') $permok = $user->rights->stock->creer; if ($object->element == 'facturerec') $permok = $user->rights->facture->creer; if ($object->element == 'mo') $permok = $user->rights->mrp->write; diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index 68e037d430f..37f6c3ddc80 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -126,8 +126,8 @@ if ($action == 'add') $action = 'create'; } } elseif ($action == 'confirm_valid' && $confirm == 'yes' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->livraison->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->livraison_advance->validate))) + ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery->creer)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->delivery_advance->validate))) ) { $result = $object->valid($user); @@ -151,7 +151,7 @@ if ($action == 'add') } } -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->livraison->supprimer) +if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->delivery->supprimer) { $db->begin(); $result = $object->delete(); @@ -167,7 +167,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio } } -if ($action == 'setdate_livraison' && $user->rights->expedition->livraison->creer) +if ($action == 'setdate_livraison' && $user->rights->expedition->delivery->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_delivery_date($user, $datedelivery); @@ -458,7 +458,7 @@ if ($action == 'create') // Create. Seems to no be used print '
| '; print $langs->trans('IncotermLabel'); print ' | '; - if ($user->rights->expedition->livraison->creer) print ''.img_edit().''; + if ($user->rights->expedition->delivery->creer) print ''.img_edit().''; else print ' '; print ' |