Go to the documentation of this file.
25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/product/stock/class/entrepot.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/stock.lib.php';
30 $langs->loadLangs(array(
'products',
'stocks',
'companies'));
44 $help_url =
'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
49 $result = $entrepot->fetch($id);
59 print
'<table class="border centpercent">';
62 print
'<tr><td width="25%">'.$langs->trans(
"Ref").
'</td><td colspan="3">';
63 print
$form->showrefnav($entrepot,
'id',
'', 1,
'rowid',
'libelle');
66 print
'<tr><td>'.$langs->trans(
"LocationSummary").
'</td><td colspan="3">'.$entrepot->lieu.
'</td></tr>';
69 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">'.nl2br($entrepot->description).
'</td></tr>';
71 print
'<tr><td>'.$langs->trans(
'Address').
'</td><td colspan="3">';
72 print $entrepot->address;
75 print
'<tr><td width="25%">'.$langs->trans(
'Zip').
'</td><td width="25%">'.$entrepot->zip.
'</td>';
76 print
'<td width="25%">'.$langs->trans(
'Town').
'</td><td width="25%">'.$entrepot->town.
'</td></tr>';
78 print
'<tr><td>'.$langs->trans(
'Country').
'</td><td colspan="3">';
79 print $entrepot->country;
83 print
'<tr><td>'.$langs->trans(
"Status").
'</td><td colspan="3">'.$entrepot->getLibStatut(4).
'</td></tr>';
85 $calcproducts = $entrepot->nb_products();
88 print
'<tr><td class="tdtop">'.$langs->trans(
"NumberOfProducts").
'</td><td colspan="3">';
89 print empty($calcproducts[
'nb']) ?
'0' : $calcproducts[
'nb'];
93 print
'<tr><td class="tdtop">'.$langs->trans(
"EstimatedStockValueShort").
'</td><td colspan="3">';
94 print empty($calcproducts[
'value']) ?
'0' : $calcproducts[
'value'];
107 print
"<div class=\"graph\">\n";
108 $year = strftime(
"%Y", time());
110 $file = $conf->stock->dir_temp.
'/entrepot-'.$entrepot->id.
'-'.($year).
'.png';
119 if (file_exists($file)) {
120 $url = DOL_URL_ROOT.
'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.
'-'.$year.
'.png';
121 print
'<img src="'.$url.
'" alt="Valorisation du stock annee '.($year).
'">';
123 if (file_exists(DOL_DATA_ROOT.
'/entrepot/temp/entrepot-'.$entrepot->id.
'-'.($year - 1).
'.png')) {
124 $url = DOL_URL_ROOT.
'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.
'-'.($year - 1).
'.png';
125 print
'<br><img src="'.$url.
'" alt="Valorisation du stock annee '.($year - 1).
'">';
128 $langs->load(
"errors");
129 print $langs->trans(
"FeatureNotYetAvailable");
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Class to manage warehouses.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
stock_prepare_head($object)
Prepare array with list of tabs.