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'));
41 $form =
new Form($db);
43 $help_url =
'EN:Module_Stocks_En|FR:Module_Stock|ES:Módulo_Stocks';
44 llxHeader(
"", $langs->trans(
"WarehouseCard"), $help_url);
48 if ($mesg)
print $mesg;
51 $result = $entrepot->fetch($_GET[
"id"]);
63 print '<table class="border centpercent">';
66 print
'<tr><td width="25%">'.$langs->trans(
"Ref").
'</td><td colspan="3">';
67 print $form->showrefnav($entrepot,
'id',
'', 1,
'rowid',
'libelle');
70 print
'<tr><td>'.$langs->trans(
"LocationSummary").
'</td><td colspan="3">'.$entrepot->lieu.
'</td></tr>';
73 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">'.nl2br($entrepot->description).
'</td></tr>';
75 print
'<tr><td>'.$langs->trans(
'Address').
'</td><td colspan="3">';
76 print $entrepot->address;
79 print
'<tr><td width="25%">'.$langs->trans(
'Zip').
'</td><td width="25%">'.$entrepot->zip.
'</td>';
80 print
'<td width="25%">'.$langs->trans(
'Town').
'</td><td width="25%">'.$entrepot->town.
'</td></tr>';
82 print
'<tr><td>'.$langs->trans(
'Country').
'</td><td colspan="3">';
83 print $entrepot->country;
87 print
'<tr><td>'.$langs->trans(
"Status").
'</td><td colspan="3">'.$entrepot->getLibStatut(4).
'</td></tr>';
89 $calcproducts = $entrepot->nb_products();
92 print
'<tr><td class="tdtop">'.$langs->trans(
"NumberOfProducts").
'</td><td colspan="3">';
93 print empty($calcproducts[
'nb']) ?
'0' : $calcproducts[
'nb'];
97 print
'<tr><td class="tdtop">'.$langs->trans(
"EstimatedStockValueShort").
'</td><td colspan="3">';
98 print empty($calcproducts[
'value']) ?
'0' : $calcproducts[
'value'];
111 print
"<div class=\"graph\">\n";
112 $year = strftime(
"%Y", time());
114 $file = $conf->stock->dir_temp.
'/entrepot-'.$entrepot->id.
'-'.($year).
'.png';
123 if (file_exists($file))
125 $url = DOL_URL_ROOT.
'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.
'-'.$year.
'.png';
126 print
'<img src="'.$url.
'" alt="Valorisation du stock annee '.($year).
'">';
128 if (file_exists(DOL_DATA_ROOT.
'/entrepot/temp/entrepot-'.$entrepot->id.
'-'.($year - 1).
'.png'))
130 $url = DOL_URL_ROOT.
'/viewimage.php?modulepart=graph_stock&file=entrepot-'.$entrepot->id.
'-'.($year - 1).
'.png';
131 print
'<br><img src="'.$url.
'" alt="Valorisation du stock annee '.($year - 1).
'">';
134 $langs->load(
"errors");
135 print $langs->trans(
"FeatureNotYetAvailable");
stock_prepare_head($object)
Prepare array with list of tabs.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Class to manage warehouses.