diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 64204e327b7..983e0089fe5 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -460,8 +460,10 @@ if ($action == 'create') { print ''; } + print ''; + // Description - print ''.$langs->trans("Description").''.nl2br($object->description).''; + print ''.$langs->trans("Description").''.dol_htmlentitiesbr($object->description).''; $calcproductsunique = $object->nb_different_products(); $calcproducts = $object->nb_products(); diff --git a/htdocs/product/stock/info.php b/htdocs/product/stock/info.php index 84c0111f290..9fc4e81075a 100644 --- a/htdocs/product/stock/info.php +++ b/htdocs/product/stock/info.php @@ -57,6 +57,38 @@ $linkback = ''; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; + +// Project +if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; + if ($usercancreate) { + if ($action != 'classify') { + $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + } + if ($action == 'classify') { + $projectid = $object->fk_project; + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } +} $morehtmlref .= ''; $shownav = 1; diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 4a9a0bb9613..0f2cec28ec9 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -623,6 +623,38 @@ if ($resql) { $morehtmlref = '
'; $morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu; + + // Project + if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; + if ($usercancreate && 1 == 2) { + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + } + if ($action == 'classify') { + $projectid = $object->fk_project; + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + } $morehtmlref .= '
'; $shownav = 1;