From c2dc140024dbec6bc38aca487b3822065dd0554b Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 15 Dec 2016 11:09:03 +0100 Subject: [PATCH 1/3] Cleaning code --- htdocs/contact/note.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 17c718cfb42..6862ea0e4bf 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -74,11 +74,6 @@ if ($id > 0) $head = contact_prepare_head($object); dol_fiche_head($head, 'note', $title,0,'contact'); - - - print '
'; - print ''; - $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); @@ -88,11 +83,12 @@ if ($id > 0) //if ($action == 'editnote_private') $cssclass='titlefieldcreate'; print '
'; - print '
'; - print ''; - $linkback = ''.$langs->trans("BackToList").''; + print ''; + print ''; + + print '
'; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) @@ -154,7 +150,6 @@ if ($id > 0) include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - dol_fiche_end(); } From 6766c331105a752a3acbe4b467847c88b81eb74f Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 15 Dec 2016 15:02:45 +0100 Subject: [PATCH 2/3] Update info.php --- htdocs/commande/info.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index ddf30b290be..58b445c8ce7 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -58,9 +58,6 @@ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES $object->fetch_thirdparty(); $object->info($object->id); -$soc = new Societe($db); -$soc->fetch($object->thirdparty->id); - $head = commande_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order'); @@ -68,13 +65,12 @@ dol_fiche_head($head, 'info', $langs->trans("CustomerOrder"), 0, 'order'); $linkback = '' . $langs->trans("BackToList") . ''; - $morehtmlref='
'; // Ref customer $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty -$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); +$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project if (! empty($conf->projet->enabled)) { From 8b4aa701d79fea0a8b3bf298a5b55d9ebca3781b Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 15 Dec 2016 15:04:59 +0100 Subject: [PATCH 3/3] Update note.php --- htdocs/commande/note.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 9a4b58a26c6..4d53d8e8d50 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -71,11 +71,10 @@ $form = new Form($db); if ($id > 0 || ! empty($ref)) { - $soc = new Societe($db); - $soc->fetch($object->socid); - + $object->fetch_thirdparty(); + $head = commande_prepare_head($object); - + dol_fiche_head($head, 'note', $langs->trans("CustomerOrder"), 0, 'order'); // Order card @@ -88,7 +87,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); // Thirdparty - $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1); + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); // Project if (! empty($conf->projet->enabled)) {