dolibarr/htdocs/product/stock/info.php

80 lines
2.3 KiB
PHP
Raw Normal View History

<?php
2009-02-19 20:06:12 +01:00
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/product/stock/info.php
* \ingroup stock
* \brief Page des informations d'un entrepot
2008-11-26 13:01:51 +01:00
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
2018-05-26 23:52:52 +02:00
// Load translation files required by the page
$langs->load("stocks");
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
2017-12-24 15:02:15 +01:00
2013-01-10 08:27:12 +01:00
// Security check
2019-02-14 15:23:07 +01:00
//$result=restrictedArea($user,'stock', $id, 'entrepot&stock');
$result = restrictedArea($user, 'stock');
/*
2009-02-19 20:06:12 +01:00
* View
*/
$help_url = 'EN:Module_Stocks_En|FR:Module_Stock|ES:M&oacute;dulo_Stocks';
llxHeader("", $langs->trans("Stocks"), $help_url);
2009-02-19 20:06:12 +01:00
2016-10-24 20:52:21 +02:00
$object = new Entrepot($db);
2017-12-24 15:02:15 +01:00
$object->fetch($id, $ref);
$object->info($object->id);
2016-10-24 20:52:21 +02:00
$head = stock_prepare_head($object);
2017-12-24 15:02:15 +01:00
dol_fiche_head($head, 'info', $langs->trans("Warehouse"), -1, 'stock');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/stock/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
2016-10-24 20:52:21 +02:00
$morehtmlref = '<div class="refidno">';
$morehtmlref .= $langs->trans("LocationSummary").' : '.$object->lieu;
$morehtmlref .= '</div>';
2016-10-24 20:52:21 +02:00
$shownav = 1;
if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0;
2017-12-24 15:02:15 +01:00
dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref', 'ref', $morehtmlref);
2016-10-24 20:52:21 +02:00
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';
dol_print_object_info($object);
2005-08-13 01:53:32 +02:00
print '</div>';
2018-08-15 12:48:13 +02:00
// End of page
llxFooter();
$db->close();