diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
index e4754a1c301..f3a256d9532 100644
--- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
+++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
@@ -453,8 +453,8 @@ class StockTransfer extends CommonObject
public function update(User $user, $notrigger = false)
{
$res = $this->updateCommon($user, $notrigger);
- if($this->socid > 0 || $this->fk_soc > 0 && empty($this->thirdparty)) $this->fetch_thirdparty();
- if(empty($this->socid) && empty($this->fk_soc)) unset($this->thirdparty);
+ if ($this->socid > 0 || $this->fk_soc > 0 && empty($this->thirdparty)) $this->fetch_thirdparty();
+ if (empty($this->socid) && empty($this->fk_soc)) unset($this->thirdparty);
return $res;
}
diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php
index cf7f291ce18..e40d196dca0 100644
--- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php
+++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php
@@ -561,38 +561,38 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$linkback = ''.$langs->trans("BackToList").'';
$morehtmlref = '
';
- if($conf->societe->enabled) {
+ if ($conf->societe->enabled) {
// Thirdparty
$morehtmlref .= $langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '').'
';
}
// Project
- if (! empty($conf->projet->enabled)) {
- $langs->load("projects");
- $morehtmlref.=$langs->trans('Project') . ' ';
- if ($permissiontoadd) {
- //if ($action != 'classify') $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
- $morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $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 .= ': '.$proj->getNomUrl();
- } else {
- $morehtmlref .= '';
- }
- }
- }
+ if (! empty($conf->projet->enabled)) {
+ $langs->load("projects");
+ $morehtmlref.=$langs->trans('Project') . ' ';
+ if ($permissiontoadd) {
+ //if ($action != 'classify') $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' ';
+ $morehtmlref.=' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $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 .= ': '.$proj->getNomUrl();
+ } else {
+ $morehtmlref .= '';
+ }
+ }
+ }
$morehtmlref .= '
';