Fix: Product note & double header
This commit is contained in:
parent
91ede48390
commit
50d46fa126
@ -74,8 +74,6 @@ llxHeader('', $title, $helpurl);
|
|||||||
|
|
||||||
$form=new Form($b);
|
$form=new Form($b);
|
||||||
|
|
||||||
llxHeader('', $title, $help_url);
|
|
||||||
|
|
||||||
if ($id > 0 || $ref)
|
if ($id > 0 || $ref)
|
||||||
{
|
{
|
||||||
$result = $object->fetch($id,$ref);
|
$result = $object->fetch($id,$ref);
|
||||||
|
|||||||
@ -30,17 +30,20 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
$action = GETPOST('action');
|
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
$id = GETPOST('id', 'int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
|
$action = GETPOST('action');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id = GETPOST('id')?GETPOST('id','int'):GETPOST('socid','int');
|
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : ''));
|
||||||
if ($user->societe_id) $id=$user->societe_id;
|
$fieldtype = (! empty($ref) ? 'ref' : 'rowid');
|
||||||
$result = restrictedArea($user, 'societe', $id, '&societe');
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
$result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','','',$fieldtype);
|
||||||
|
|
||||||
$object = new Product($db);
|
$object = new Product($db);
|
||||||
if ($id > 0) $object->fetch($id);
|
if ($id > 0 || ! empty($ref)) $object->fetch($id, $ref);
|
||||||
|
|
||||||
$permissionnote=$user->rights->produit->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote=$user->rights->produit->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
@ -64,7 +67,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("ThirdParty").' - '.$langs->trans("Notes"), $help_url);
|
llxHeader('', $langs->trans("ThirdParty").' - '.$langs->trans("Notes"), $help_url);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Affichage onglets
|
||||||
@ -81,13 +84,14 @@ if ($id > 0)
|
|||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|
||||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
//$colwidth='25';
|
$cssclass='titlefield';
|
||||||
$cssclass='titlefield';
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user