|
|
|
|
@@ -127,19 +127,14 @@ if ($_POST["action"] == 'add' && ($user->rights->produit->creer || $user->rights
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty($_POST["canvas"]))
|
|
|
|
|
$product=new Product($db);
|
|
|
|
|
|
|
|
|
|
$usecanvas=$_POST["canvas"];
|
|
|
|
|
if (! empty($usecanvas)) // Overwrite product here
|
|
|
|
|
{
|
|
|
|
|
$canvas = new Canvas($db,$user);
|
|
|
|
|
$product = $canvas->load_canvas('product',$_POST["canvas"]);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$mesg='<div class="error">'.$langs->trans('ErrorCanvasNotDefined').'</div>';
|
|
|
|
|
$_GET["action"] = "create";
|
|
|
|
|
$_GET["canvas"] = $_POST["canvas"];
|
|
|
|
|
$_GET["type"] = $_POST["type"];
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (! $error)
|
|
|
|
|
{
|
|
|
|
|
@@ -192,8 +187,6 @@ if ($_POST["action"] == 'add' && ($user->rights->produit->creer || $user->rights
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( $value != $current_lang ) $e_product = $product;
|
|
|
|
|
|
|
|
|
|
$id = $product->create($user);
|
|
|
|
|
|
|
|
|
|
if ($id > 0)
|
|
|
|
|
@@ -220,7 +213,10 @@ if ($_POST["action"] == 'update' && ($user->rights->produit->creer || $user->rig
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (!empty($_POST["canvas"]))
|
|
|
|
|
$product=new Product($db);
|
|
|
|
|
|
|
|
|
|
$usecanvas=$_POST["canvas"];
|
|
|
|
|
if (! empty($usecanvas)) // Overwrite product here
|
|
|
|
|
{
|
|
|
|
|
$canvas = new Canvas($db,$user);
|
|
|
|
|
$product = $canvas->load_canvas('product',$_POST["canvas"]);
|
|
|
|
|
@@ -362,7 +358,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' &&
|
|
|
|
|
*/
|
|
|
|
|
if ($_POST["action"] == 'addinpropal')
|
|
|
|
|
{
|
|
|
|
|
$propal = New Propal($db);
|
|
|
|
|
$propal = new Propal($db);
|
|
|
|
|
$result=$propal->fetch($_POST["propalid"]);
|
|
|
|
|
if ($result <= 0)
|
|
|
|
|
{
|
|
|
|
|
@@ -622,29 +618,28 @@ $formproduct = new FormProduct($db);
|
|
|
|
|
*/
|
|
|
|
|
if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->rights->service->creer))
|
|
|
|
|
{
|
|
|
|
|
if (!empty($_GET["canvas"]))
|
|
|
|
|
{
|
|
|
|
|
$helpurl='';
|
|
|
|
|
if (isset($_GET["type"]) && $_GET["type"] == 0) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
|
|
|
|
|
if (isset($_GET["type"]) && $_GET["type"] == 1) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
|
|
|
|
|
|
|
|
|
|
llxHeader('',$langs->trans("CardProduct".$_GET["type"]),$helpurl);
|
|
|
|
|
|
|
|
|
|
if (! isset($product))
|
|
|
|
|
$usecanvas=$_GET["canvas"];
|
|
|
|
|
if (empty($usecanvas))
|
|
|
|
|
{
|
|
|
|
|
// TODO Restore simple code here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$canvas = new Canvas($db,$user);
|
|
|
|
|
|
|
|
|
|
$product = $canvas->load_canvas('product',$_GET["canvas"]);
|
|
|
|
|
|
|
|
|
|
$canvas->assign_values('create');
|
|
|
|
|
$canvas->display_canvas();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_error == 1)
|
|
|
|
|
{
|
|
|
|
|
$product = $e_product;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -654,31 +649,196 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
|
|
|
|
|
*/
|
|
|
|
|
if ($_GET["id"] || $_GET["ref"])
|
|
|
|
|
{
|
|
|
|
|
$product=new Product($db);
|
|
|
|
|
|
|
|
|
|
// TODO en attendant d'inclure le nom du canvas dans les liens
|
|
|
|
|
$productstatic = new Product($db);
|
|
|
|
|
$result = $productstatic->getCanvas($_GET["id"],$_GET["ref"]);
|
|
|
|
|
$usecanvas=$productstatic->canvas;
|
|
|
|
|
|
|
|
|
|
// Gestion des produits specifiques
|
|
|
|
|
if (!empty($productstatic->canvas))
|
|
|
|
|
if (empty($usecanvas))
|
|
|
|
|
{
|
|
|
|
|
$product->fetch($_GET["id"],$_GET["ref"]);
|
|
|
|
|
}
|
|
|
|
|
else // Gestion des produits specifiques
|
|
|
|
|
{
|
|
|
|
|
$canvas = new Canvas($db,$user);
|
|
|
|
|
|
|
|
|
|
$product = $canvas->load_canvas('product',$productstatic->canvas);
|
|
|
|
|
if (! $product) dol_print_error('','Faled to load canvas product-'.$productstatic->canvas);
|
|
|
|
|
|
|
|
|
|
$canvas->fetch($productstatic->id,'',$_GET["action"]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
llxHeader('',$langs->trans("CardProduct".$product->type));
|
|
|
|
|
|
|
|
|
|
if ( $result )
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* Fiche en mode edition
|
|
|
|
|
*/
|
|
|
|
|
if ($_GET["action"] == 'edit' && ($user->rights->produit->creer || $user->rights->service->creer))
|
|
|
|
|
{
|
|
|
|
|
if (empty($usecanvas))
|
|
|
|
|
{
|
|
|
|
|
if ($product->isservice()) {
|
|
|
|
|
print_fiche_titre($langs->trans('Modify').' '.$langs->trans('Service').' : '.$product->ref, "");
|
|
|
|
|
} else {
|
|
|
|
|
print_fiche_titre($langs->trans('Modify').' '.$langs->trans('Product').' : '.$product->ref, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($mesg) {
|
|
|
|
|
print '<br><div class="error">'.$mesg.'</div><br>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Main official, simple, and not duplicated code
|
|
|
|
|
print "<form action=\"fiche.php\" method=\"post\">\n";
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="update">';
|
|
|
|
|
print '<input type="hidden" name="id" value="'.$product->id.'">';
|
|
|
|
|
print '<input type="hidden" name="canvas" value="'.$product->canvas.'">';
|
|
|
|
|
print '<table class="border" width="100%">';
|
|
|
|
|
print '<tr><td width="15%">'.$langs->trans("Ref").'</td><td colspan="2"><input name="ref" size="40" maxlength="32" value="'.$product->ref.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="libelle" size="40" value="'.$product->libelle.'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Status
|
|
|
|
|
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="2">';
|
|
|
|
|
print '<select class="flat" name="statut">';
|
|
|
|
|
if ($product->status)
|
|
|
|
|
{
|
|
|
|
|
print '<option value="1" selected="true">'.$langs->trans("OnSell").'</option>';
|
|
|
|
|
print '<option value="0">'.$langs->trans("NotOnSell").'</option>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<option value="1">'.$langs->trans("OnSell").'</option>';
|
|
|
|
|
print '<option value="0" selected="true">'.$langs->trans("NotOnSell").'</option>';
|
|
|
|
|
}
|
|
|
|
|
print '</select>';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Description (used in invoice, propal...)
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
|
|
|
|
print "\n";
|
|
|
|
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
|
|
|
|
{
|
|
|
|
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
|
|
|
|
$doleditor=new DolEditor('desc',$product->description,160,'dolibarr_notes','',false);
|
|
|
|
|
$doleditor->Create();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<textarea name="desc" rows="4" cols="90">';
|
|
|
|
|
print dol_htmlentitiesbr_decode($product->description);
|
|
|
|
|
print "</textarea>";
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>";
|
|
|
|
|
print "\n";
|
|
|
|
|
|
|
|
|
|
// Nature
|
|
|
|
|
if($product->type!=1)
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Nature").'</td><td>';
|
|
|
|
|
$statutarray=array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
|
|
|
|
$html->select_array('finished',$statutarray,$product->finished);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($product->isproduct() && $conf->stock->enabled)
|
|
|
|
|
{
|
|
|
|
|
print "<tr>".'<td>'.$langs->trans("StockLimit").'</td><td colspan="2">';
|
|
|
|
|
print '<input name="seuil_stock_alerte" size="4" value="'.$product->seuil_stock_alerte.'">';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<input name="seuil_stock_alerte" type="hidden" value="'.$product->seuil_stock_alerte.'">';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($product->isservice())
|
|
|
|
|
{
|
|
|
|
|
// Duration
|
|
|
|
|
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="2"><input name="duration_value" size="3" maxlength="5" value="'.$product->duration_value.'">';
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="duration_unit" type="radio" value="h"'.($product->duration_unit=='h'?' checked':'').'>'.$langs->trans("Hour");
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="duration_unit" type="radio" value="d"'.($product->duration_unit=='d'?' checked':'').'>'.$langs->trans("Day");
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="duration_unit" type="radio" value="w"'.($product->duration_unit=='w'?' checked':'').'>'.$langs->trans("Week");
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="duration_unit" type="radio" value="m"'.($product->duration_unit=='m'?' checked':'').'>'.$langs->trans("Month");
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input name="duration_unit" type="radio" value="y"'.($product->duration_unit=='y'?' checked':'').'>'.$langs->trans("Year");
|
|
|
|
|
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Weight
|
|
|
|
|
print '<tr><td>'.$langs->trans("Weight").'</td><td>';
|
|
|
|
|
print '<input name="weight" size="5" value="'.$product->weight.'"> ';
|
|
|
|
|
print $formproduct->select_measuring_units("weight_units", "weight", $product->weight_units);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
// Length
|
|
|
|
|
print '<tr><td>'.$langs->trans("Length").'</td><td>';
|
|
|
|
|
print '<input name="size" size="5" value="'.$product->length.'"> ';
|
|
|
|
|
print $formproduct->select_measuring_units("size_units", "size", $product->length_units);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
// Surface
|
|
|
|
|
print '<tr><td>'.$langs->trans("Surface").'</td><td>';
|
|
|
|
|
print '<input name="surface" size="5" value="'.$product->surface.'"> ';
|
|
|
|
|
print $formproduct->select_measuring_units("surface_units", "surface", $product->surface_units);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
// Volume
|
|
|
|
|
print '<tr><td>'.$langs->trans("Volume").'</td><td>';
|
|
|
|
|
print '<input name="volume" size="5" value="'.$product->volume.'"> ';
|
|
|
|
|
print $formproduct->select_measuring_units("volume_units", "volume", $product->volume_units);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Hidden
|
|
|
|
|
if ((! $product->isservice() && $user->rights->produit->hidden)
|
|
|
|
|
|| ($product->isservice() && $user->rights->service->hidden))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Hidden").'</td><td>';
|
|
|
|
|
print $html->selectyesno('hidden',$product->hidden);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Hidden").'</td><td>';
|
|
|
|
|
print yn("No");
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Note
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
|
|
|
|
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
|
|
|
|
{
|
|
|
|
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
|
|
|
|
$doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','',false);
|
|
|
|
|
$doleditor->Create();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<textarea name="note" rows="8" cols="70">';
|
|
|
|
|
print dol_htmlentitiesbr_decode($product->note);
|
|
|
|
|
print "</textarea>";
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>";
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
|
|
|
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
|
|
|
|
|
|
|
|
|
print '</form>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$canvas->assign_values('edit');
|
|
|
|
|
$canvas->display_canvas();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
* Fiche en mode visu
|
|
|
|
|
*/
|
|
|
|
|
@@ -696,10 +856,151 @@ if ($_GET["id"] || $_GET["ref"])
|
|
|
|
|
if ($ret == 'html') print '<br>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (empty($usecanvas))
|
|
|
|
|
{
|
|
|
|
|
// En mode visu
|
|
|
|
|
print '<table class="border" width="100%"><tr>';
|
|
|
|
|
|
|
|
|
|
// Ref
|
|
|
|
|
print '<td width="15%">'.$langs->trans("Ref").'</td><td colspan="2">';
|
|
|
|
|
print $html->showrefnav($product,'ref','',1,'ref');
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Label
|
|
|
|
|
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
|
|
|
|
|
|
|
|
|
|
$nblignes=4;
|
|
|
|
|
if ($product->is_photo_available($conf->produit->dir_output))
|
|
|
|
|
{
|
|
|
|
|
// Photo
|
|
|
|
|
print '<td valign="middle" align="center" width="30%" rowspan="'.$nblignes.'">';
|
|
|
|
|
print $product->show_photos($conf->produit->dir_output,1,1,0,0,0,80);
|
|
|
|
|
print '</td>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Accountancy buy code
|
|
|
|
|
print '<tr><td>'.$html->editfieldkey("ProductAccountancyBuyCode",'productaccountancycodesell',$product->accountancy_code_sell,'id',$product->id,$user->rights->produit->creer).'</td><td>';
|
|
|
|
|
print $html->editfieldval("ProductAccountancyBuyCode",'productaccountancycodesell',$product->accountancy_code_sell,'id',$product->id,$user->rights->produit->creer);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Accountancy sell code
|
|
|
|
|
print '<tr><td>'.$html->editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$product->accountancy_code_buy,'id',$product->id,$user->rights->produit->creer).'</td><td>';
|
|
|
|
|
print $html->editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$product->accountancy_code_buy,'id',$product->id,$user->rights->produit->creer);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Statut
|
|
|
|
|
print '<tr><td>'.$langs->trans("Status").'</td><td>';
|
|
|
|
|
print $product->getLibStatut(2);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Description
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">'.nl2br($product->description).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Nature
|
|
|
|
|
if($product->type!=1)
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="2">';
|
|
|
|
|
print $product->getLibFinished();
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($product->isservice())
|
|
|
|
|
{
|
|
|
|
|
// Duration
|
|
|
|
|
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="2">'.$product->duration_value.' ';
|
|
|
|
|
if ($product->duration_value > 1)
|
|
|
|
|
{
|
|
|
|
|
$dur=array("h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years"));
|
|
|
|
|
}
|
|
|
|
|
else if ($product->duration_value > 0)
|
|
|
|
|
{
|
|
|
|
|
$dur=array("h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year"));
|
|
|
|
|
}
|
|
|
|
|
print $langs->trans($dur[$product->duration_unit])." ";
|
|
|
|
|
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Weight
|
|
|
|
|
print '<tr><td>'.$langs->trans("Weight").'</td><td colspan="2">';
|
|
|
|
|
if ($product->weight != '')
|
|
|
|
|
{
|
|
|
|
|
print $product->weight." ".measuring_units_string($product->weight_units,"weight");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print ' ';
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
// Length
|
|
|
|
|
print '<tr><td>'.$langs->trans("Length").'</td><td colspan="2">';
|
|
|
|
|
if ($product->length != '')
|
|
|
|
|
{
|
|
|
|
|
print $product->length." ".measuring_units_string($product->length_units,"size");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print ' ';
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
// Surface
|
|
|
|
|
print '<tr><td>'.$langs->trans("Surface").'</td><td colspan="2">';
|
|
|
|
|
if ($product->surface != '')
|
|
|
|
|
{
|
|
|
|
|
print $product->surface." ".measuring_units_string($product->surface_units,"surface");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print ' ';
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
// Volume
|
|
|
|
|
print '<tr><td>'.$langs->trans("Volume").'</td><td colspan="2">';
|
|
|
|
|
if ($product->volume != '')
|
|
|
|
|
{
|
|
|
|
|
print $product->volume." ".measuring_units_string($product->volume_units,"volume");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print ' ';
|
|
|
|
|
}
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Hidden
|
|
|
|
|
if ((! $product->isservice() && $user->rights->produit->hidden)
|
|
|
|
|
|| ($product->isservice() && $user->rights->service->hidden))
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Hidden").'</td><td colspan="2">';
|
|
|
|
|
print yn($product->hidden);
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print '<tr><td>'.$langs->trans("Hidden").'</td><td>';
|
|
|
|
|
print yn("No");
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Note
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="2">'.nl2br($product->note).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
print "</table>\n";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$canvas->assign_values('view');
|
|
|
|
|
$canvas->display_canvas();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dol_fiche_end();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (!$_GET["action"] == 'create')
|
|
|
|
|
{
|
|
|
|
|
|