Fix info and banner on societe

This commit is contained in:
Maxime Kohlhaas 2015-11-19 14:43:00 +01:00
parent e4125c9802
commit 826592c480
3 changed files with 6 additions and 8 deletions

View File

@ -1305,7 +1305,7 @@ else
$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
dol_fiche_head($head, 'card', $titre, 0, $picto);
dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref');
dol_banner_tab($object, 'id', '', ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">';

View File

@ -4123,7 +4123,7 @@ class Product extends CommonObject
*/
function info($id)
{
$sql = "SELECT p.rowid, p.datec as date_creation, p.tms as date_modification,";
$sql = "SELECT p.rowid, p.ref, p.datec as date_creation, p.tms as date_modification,";
$sql.= " p.fk_user_author, p.fk_user_modif";
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as p";
$sql.= " WHERE p.rowid = ".$id;
@ -4149,7 +4149,7 @@ class Product extends CommonObject
$this->user_modification = $muser;
}
$this->ref = $obj->name;
$this->ref = $obj->ref;
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_modification = $this->db->jdate($obj->date_modification);
}

View File

@ -78,15 +78,13 @@ if ($socid > 0)
exit;
}
$object->info($socid);
$head = societe_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
$object->info($socid);
print '<div class="fichecenter">';