PageRenderTime 47ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/product/stock/product.php

https://bitbucket.org/speedealing/speedealing
PHP | 581 lines | 408 code | 81 blank | 92 comment | 76 complexity | d9d4b5c3aaf099ad926149111d36e4e1 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
  5. * Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
  6. * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. /**
  22. * \file htdocs/product/stock/product.php
  23. * \ingroup product stock
  24. * \brief Page to list detailed stock of a product
  25. */
  26. require '../../main.inc.php';
  27. require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
  28. require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
  29. require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
  30. require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
  31. $langs->load("products");
  32. $langs->load("orders");
  33. $langs->load("bills");
  34. $langs->load("stocks");
  35. $action=GETPOST("action");
  36. $cancel=GETPOST('cancel');
  37. // Security check
  38. $id = GETPOST('id')?GETPOST('id'):GETPOST('ref');
  39. $ref = GETPOST('ref');
  40. $stocklimit = GETPOST('stocklimit');
  41. $cancel = GETPOST('cancel');
  42. $fieldid = isset($_GET["ref"])?'ref':'rowid';
  43. if ($user->societe_id) $socid=$user->societe_id;
  44. $result=restrictedArea($user,'produit&stock',$id,'product&product','','',$fieldid);
  45. /*
  46. * Actions
  47. */
  48. if ($cancel) $action='';
  49. // Set stock limit
  50. if ($action == 'setstocklimit')
  51. {
  52. $product = new Product($db);
  53. $result=$product->fetch($id);
  54. $product->seuil_stock_alerte=$stocklimit;
  55. $result=$product->update($product->id,$user,1,0,1);
  56. if ($result < 0)
  57. setEventMessage($product->error, 'errors');
  58. $action='';
  59. }
  60. // Correct stock
  61. if ($action == "correct_stock" && ! $cancel)
  62. {
  63. if (! (GETPOST("id_entrepot") > 0))
  64. {
  65. setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors');
  66. $error++;
  67. $action='correction';
  68. }
  69. if (! GETPOST("nbpiece"))
  70. {
  71. setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors');
  72. $error++;
  73. $action='correction';
  74. }
  75. if (! $error)
  76. {
  77. $priceunit=price2num(GETPOST("price"));
  78. if (is_numeric(GETPOST("nbpiece")) && $id)
  79. {
  80. $product = new Product($db);
  81. $result=$product->fetch($id);
  82. $result=$product->correct_stock(
  83. $user,
  84. GETPOST("id_entrepot"),
  85. GETPOST("nbpiece"),
  86. GETPOST("mouvement"),
  87. GETPOST("label"),
  88. $priceunit
  89. ); // We do not change value of stock for a correction
  90. if ($result > 0)
  91. {
  92. header("Location: ".$_SERVER["PHP_SELF"]."?id=".$product->id);
  93. exit;
  94. }
  95. }
  96. }
  97. }
  98. // Transfer stock from a warehouse to another warehouse
  99. if ($action == "transfert_stock" && ! $cancel)
  100. {
  101. if (! (GETPOST("id_entrepot_source") > 0) || ! (GETPOST("id_entrepot_destination") > 0))
  102. {
  103. setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Warehouse")), 'errors');
  104. $error++;
  105. $action='transfert';
  106. }
  107. if (! GETPOST("nbpiece"))
  108. {
  109. setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("NumberOfUnit")), 'errors');
  110. $error++;
  111. $action='transfert';
  112. }
  113. if (! $error)
  114. {
  115. if (GETPOST("id_entrepot_source") <> GETPOST("id_entrepot_destination"))
  116. {
  117. if (is_numeric(GETPOST("nbpiece")) && $id)
  118. {
  119. $product = new Product($db);
  120. $result=$product->fetch($id);
  121. $db->begin();
  122. $product->load_stock(); // Load array product->stock_warehouse
  123. // Define value of products moved
  124. $pricesrc=0;
  125. if (isset($product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp)) $pricesrc=$product->stock_warehouse[GETPOST("id_entrepot_source")]->pmp;
  126. $pricedest=$pricesrc;
  127. //print 'price src='.$pricesrc.', price dest='.$pricedest;exit;
  128. // Remove stock
  129. $result1=$product->correct_stock(
  130. $user,
  131. GETPOST("id_entrepot_source"),
  132. GETPOST("nbpiece"),
  133. 1,
  134. GETPOST("label"),
  135. $pricesrc
  136. );
  137. // Add stock
  138. $result2=$product->correct_stock(
  139. $user,
  140. GETPOST("id_entrepot_destination"),
  141. GETPOST("nbpiece"),
  142. 0,
  143. GETPOST("label"),
  144. $pricedest
  145. );
  146. if ($result1 >= 0 && $result2 >= 0)
  147. {
  148. $db->commit();
  149. header("Location: product.php?id=".$product->id);
  150. exit;
  151. }
  152. else
  153. {
  154. setEventMessage($product->error, 'errors');
  155. $db->rollback();
  156. }
  157. }
  158. }
  159. }
  160. }
  161. /*
  162. * View
  163. */
  164. $formproduct=new FormProduct($db);
  165. if ($id > 0 || $ref)
  166. {
  167. $product = new Product($db);
  168. if ($ref) $result = $product->fetch('',$ref);
  169. if ($id > 0) $result = $product->fetch($id);
  170. llxHeader("",$langs->trans("CardProduct".$product->type));
  171. if ($result > 0)
  172. {
  173. $head=product_prepare_head($product, $user);
  174. $titre=$langs->trans("CardProduct".$product->type);
  175. $picto=($product->type==1?'service':'product');
  176. dol_fiche_head($head, 'stock', $titre, 0, $picto);
  177. $form = new Form($db);
  178. print '<table class="border" width="100%">';
  179. // Ref
  180. print '<tr>';
  181. print '<td width="30%">'.$langs->trans("Ref").'</td><td>';
  182. print $form->showrefnav($product,'ref','',1,'ref');
  183. print '</td>';
  184. print '</tr>';
  185. // Label
  186. print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
  187. print '</tr>';
  188. // Status (to sell)
  189. print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>';
  190. print $product->getLibStatut(2,0);
  191. print '</td></tr>';
  192. // Status (to buy)
  193. print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>';
  194. print $product->getLibStatut(2,1);
  195. print '</td></tr>';
  196. // PMP
  197. print '<tr><td>'.$langs->trans("AverageUnitPricePMP").'</td>';
  198. print '<td>'.price($product->pmp).' '.$langs->trans("HT").'</td>';
  199. print '</tr>';
  200. // Sell price
  201. print '<tr><td>'.$langs->trans("SellPriceMin").'</td>';
  202. print '<td>';
  203. if (empty($conf->global->PRODUIT_MULTIPRICES)) print price($product->price).' '.$langs->trans("HT");
  204. else print $langs->trans("Variable");
  205. print '</td>';
  206. print '</tr>';
  207. // Stock
  208. print '<tr><td>'.$form->editfieldkey("StockLimit",'stocklimit',$product->seuil_stock_alerte,$product,$user->rights->produit->creer).'</td><td colspan="2">';
  209. print $form->editfieldval("StockLimit",'stocklimit',$product->seuil_stock_alerte,$product,$user->rights->produit->creer);
  210. print '</td></tr>';
  211. // Real stock
  212. $product->load_stock();
  213. print '<tr><td>'.$langs->trans("PhysicalStock").'</td>';
  214. print '<td>'.$product->stock_reel;
  215. if ($product->seuil_stock_alerte && ($product->stock_reel < $product->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
  216. print '</td>';
  217. print '</tr>';
  218. // Calculating a theorical value of stock if stock increment is done on real sending
  219. if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
  220. {
  221. $stock_commande_client=$stock_commande_fournisseur=0;
  222. if (! empty($conf->commande->enabled))
  223. {
  224. $result=$product->load_stats_commande(0,'1,2');
  225. if ($result < 0) dol_print_error($db,$product->error);
  226. $stock_commande_client=$product->stats_commande['qty'];
  227. }
  228. if (! empty($conf->fournisseur->enabled))
  229. {
  230. $result=$product->load_stats_commande_fournisseur(0,'3');
  231. if ($result < 0) dol_print_error($db,$product->error);
  232. $stock_commande_fournisseur=$product->stats_commande_fournisseur['qty'];
  233. }
  234. $product->stock_theorique=$product->stock_reel-($stock_commande_client+$stock_sending_client)+$stock_commande_fournisseur;
  235. // Stock theorique
  236. print '<tr><td>'.$langs->trans("VirtualStock").'</td>';
  237. print "<td>".$product->stock_theorique;
  238. if ($product->stock_theorique < $product->seuil_stock_alerte)
  239. {
  240. print ' '.img_warning($langs->trans("StockLowerThanLimit"));
  241. }
  242. print '</td>';
  243. print '</tr>';
  244. print '<tr><td>';
  245. if ($product->stock_theorique != $product->stock_reel) print $langs->trans("StockDiffPhysicTeoric");
  246. else print $langs->trans("RunningOrders");
  247. print '</td>';
  248. print '<td>';
  249. $found=0;
  250. // Nbre de commande clients en cours
  251. if (! empty($conf->commande->enabled))
  252. {
  253. if ($found) print '<br>'; else $found=1;
  254. print $langs->trans("CustomersOrdersRunning").': '.($stock_commande_client+$stock_sending_client);
  255. $result=$product->load_stats_commande(0,'0');
  256. if ($result < 0) dol_print_error($db,$product->error);
  257. print ' ('.$langs->trans("Draft").': '.$product->stats_commande['qty'].')';
  258. //print '<br>';
  259. //print $langs->trans("CustomersSendingRunning").': '.$stock_sending_client;
  260. }
  261. // Nbre de commande fournisseurs en cours
  262. if (! empty($conf->fournisseur->enabled))
  263. {
  264. if ($found) print '<br>'; else $found=1;
  265. print $langs->trans("SuppliersOrdersRunning").': '.$stock_commande_fournisseur;
  266. $result=$product->load_stats_commande_fournisseur(0,'0,1,2');
  267. if ($result < 0) dol_print_error($db,$product->error);
  268. print ' ('.$langs->trans("DraftOrWaitingApproved").': '.$product->stats_commande_fournisseur['qty'].')';
  269. }
  270. print '</td></tr>';
  271. }
  272. // Last movement
  273. $sql = "SELECT max(m.datem) as datem";
  274. $sql.= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
  275. $sql.= " WHERE m.fk_product = '".$product->id."'";
  276. $resqlbis = $db->query($sql);
  277. if ($resqlbis)
  278. {
  279. $obj = $db->fetch_object($resqlbis);
  280. $lastmovementdate=$db->jdate($obj->datem);
  281. }
  282. else
  283. {
  284. dol_print_error($db);
  285. }
  286. print '<tr><td valign="top">'.$langs->trans("LastMovement").'</td><td colspan="3">';
  287. if ($lastmovementdate)
  288. {
  289. print dol_print_date($lastmovementdate,'dayhour').' ';
  290. print '(<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?idproduct='.$product->id.'">'.$langs->trans("FullList").'</a>)';
  291. }
  292. else
  293. {
  294. print '<a href="'.DOL_URL_ROOT.'/product/stock/mouvement.php?idproduct='.$product->id.'">'.$langs->trans("None").'</a>';
  295. }
  296. print "</td></tr>";
  297. print "</table>";
  298. }
  299. print '</div>';
  300. /*
  301. * Correct stock
  302. */
  303. if ($action == "correction")
  304. {
  305. print '<script type="text/javascript" language="javascript">
  306. jQuery(document).ready(function() {
  307. function init_price()
  308. {
  309. if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr(\'disabled\');
  310. else jQuery("#unitprice").attr(\'disabled\',\'disabled\');
  311. }
  312. init_price();
  313. jQuery("#mouvement").change(function() {
  314. init_price();
  315. });
  316. });
  317. </script>';
  318. print_titre($langs->trans("StockCorrection"));
  319. print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'" method="post">'."\n";
  320. print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
  321. print '<input type="hidden" name="action" value="correct_stock">';
  322. print '<table class="border" width="100%">';
  323. // Warehouse
  324. print '<tr>';
  325. print '<td width="20%" class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
  326. print '<td width="20%">';
  327. print $formproduct->selectWarehouses(($_GET["dwid"]?$_GET["dwid"]:GETPOST('id_entrepot')),'id_entrepot','',1);
  328. print '</td>';
  329. print '<td width="20%">';
  330. print '<select name="mouvement" id="mouvement" class="flat">';
  331. print '<option value="0">'.$langs->trans("Add").'</option>';
  332. print '<option value="1">'.$langs->trans("Delete").'</option>';
  333. print '</select></td>';
  334. print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input class="flat" name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
  335. print '</tr>';
  336. // Label
  337. print '<tr>';
  338. print '<td width="20%">'.$langs->trans("Label").'</td>';
  339. print '<td colspan="2">';
  340. print '<input type="text" name="label" size="40" value="'.GETPOST("label").'">';
  341. print '</td>';
  342. print '<td width="20%">'.$langs->trans("UnitPurchaseValue").'</td><td width="20%"><input class="flat" name="price" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
  343. print '</tr>';
  344. print '</table>';
  345. print '<center><input type="submit" class="button" value="'.$langs->trans('Save').'">&nbsp;';
  346. print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
  347. print '</form>';
  348. }
  349. /*
  350. * Transfer of units
  351. */
  352. if ($action == "transfert")
  353. {
  354. print_titre($langs->trans("Transfer"));
  355. print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'" method="post">'."\n";
  356. print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
  357. print '<input type="hidden" name="action" value="transfert_stock">';
  358. print '<table class="border" width="100%">';
  359. print '<tr>';
  360. print '<td width="20%" class="fieldrequired">'.$langs->trans("WarehouseSource").'</td><td width="20%">';
  361. print $formproduct->selectWarehouses(($_GET["dwid"]?$_GET["dwid"]:GETPOST('id_entrepot_source')),'id_entrepot_source','',1);
  362. print '</td>';
  363. print '<td width="20%" class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td width="20%">';
  364. print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'),'id_entrepot_destination','',1);
  365. print '</td>';
  366. print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input name="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
  367. print '</tr>';
  368. // Label
  369. print '<tr>';
  370. print '<td width="20%">'.$langs->trans("Label").'</td>';
  371. print '<td colspan="5">';
  372. print '<input type="text" name="label" size="40" value="'.GETPOST("label").'">';
  373. print '</td>';
  374. print '</tr>';
  375. print '</table>';
  376. print '<center><input type="submit" class="button" value="'.$langs->trans('Save').'">&nbsp;';
  377. print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
  378. print '</form>';
  379. }
  380. /*
  381. * Set initial stock
  382. */
  383. /*
  384. if ($_GET["action"] == "definir")
  385. {
  386. print_titre($langs->trans("SetStock"));
  387. print "<form action=\"product.php?id=$product->id\" method=\"post\">\n";
  388. print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
  389. print '<input type="hidden" name="action" value="create_stock">';
  390. print '<table class="border" width="100%"><tr>';
  391. print '<td width="20%">'.$langs->trans("Warehouse").'</td><td width="40%">';
  392. print $formproduct->selectWarehouses('','id_entrepot','',1);
  393. print '</td><td width="20%">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input name="nbpiece" size="10" value=""></td></tr>';
  394. print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans('Save').'">&nbsp;';
  395. print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'"></td></tr>';
  396. print '</table>';
  397. print '</form>';
  398. }
  399. */
  400. }
  401. else
  402. {
  403. dol_print_error();
  404. }
  405. /* ************************************************************************** */
  406. /* */
  407. /* Barre d'action */
  408. /* */
  409. /* ************************************************************************** */
  410. if (empty($action) && $product->id)
  411. {
  412. print "<div class=\"tabsAction\">\n";
  413. if ($user->rights->stock->creer)
  414. {
  415. print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'&amp;action=correction">'.$langs->trans("StockCorrection").'</a>';
  416. }
  417. if ($user->rights->stock->mouvement->creer)
  418. {
  419. print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$product->id.'&amp;action=transfert">'.$langs->trans("StockMovement").'</a>';
  420. }
  421. print '</div>';
  422. }
  423. /*
  424. * Contenu des stocks
  425. */
  426. print '<br><table class="noborder" width="100%">';
  427. print '<tr class="liste_titre"><td width="40%">'.$langs->trans("Warehouse").'</td>';
  428. print '<td align="right">'.$langs->trans("NumberOfUnit").'</td>';
  429. print '<td align="right">'.$langs->trans("AverageUnitPricePMPShort").'</td>';
  430. print '<td align="right">'.$langs->trans("EstimatedStockValueShort").'</td>';
  431. print '<td align="right">'.$langs->trans("SellPriceMin").'</td>';
  432. print '<td align="right">'.$langs->trans("EstimatedStockValueSellShort").'</td>';
  433. print '</tr>';
  434. $sql = "SELECT e.rowid, e.label, ps.reel, ps.pmp";
  435. $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
  436. $sql.= " ".MAIN_DB_PREFIX."product_stock as ps";
  437. $sql.= " WHERE ps.reel != 0";
  438. $sql.= " AND ps.fk_entrepot = e.rowid";
  439. $sql.= " AND e.entity = ".$conf->entity;
  440. $sql.= " AND ps.fk_product = ".$product->id;
  441. $sql.= " ORDER BY e.label";
  442. $entrepotstatic=new Entrepot($db);
  443. $total=0;
  444. $totalvalue=$totalvaluesell=0;
  445. $resql=$db->query($sql);
  446. if ($resql)
  447. {
  448. $num = $db->num_rows($resql);
  449. $total=$totalwithpmp;
  450. $i=0; $var=false;
  451. while ($i < $num)
  452. {
  453. $obj = $db->fetch_object($resql);
  454. $entrepotstatic->id=$obj->rowid;
  455. $entrepotstatic->libelle=$obj->label;
  456. print '<tr '.$bc[$var].'>';
  457. print '<td>'.$entrepotstatic->getNomUrl(1).'</td>';
  458. print '<td align="right">'.$obj->reel.($obj->reel<0?' '.img_warning():'').'</td>';
  459. // PMP
  460. print '<td align="right">'.(price2num($obj->pmp)?price2num($obj->pmp,'MU'):'').'</td>'; // Ditto : Show PMP from movement or from product
  461. print '<td align="right">'.(price2num($obj->pmp)?price(price2num($obj->pmp*$obj->reel,'MT')):'').'</td>'; // Ditto : Show PMP from movement or from product
  462. // Sell price
  463. print '<td align="right">';
  464. if (empty($conf->global->PRODUIT_MUTLI_PRICES)) print price(price2num($product->price,'MU'));
  465. else print $langs->trans("Variable");
  466. print '</td>'; // Ditto : Show PMP from movement or from product
  467. print '<td align="right">';
  468. if (empty($conf->global->PRODUIT_MUTLI_PRICES)) print price(price2num($product->price*$obj->reel,'MT')).'</td>'; // Ditto : Show PMP from movement or from product
  469. else print $langs->trans("Variable");
  470. print '</tr>'; ;
  471. $total += $obj->reel;
  472. if (price2num($obj->pmp)) $totalwithpmp += $obj->reel;
  473. $totalvalue = $totalvalue + price2num($obj->pmp*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product
  474. $totalvaluesell = $totalvaluesell + price2num($product->price*$obj->reel,'MU'); // Ditto : Show PMP from movement or from product
  475. $i++;
  476. $var=!$var;
  477. }
  478. }
  479. else dol_print_error($db);
  480. print '<tr class="liste_total"><td align="right" class="liste_total">'.$langs->trans("Total").':</td>';
  481. print '<td class="liste_total" align="right">'.$total.'</td>';
  482. print '<td class="liste_total" align="right">';
  483. print ($totalwithpmp?price($totalvalue/$totalwithpmp):'&nbsp;');
  484. print '</td>';
  485. print '<td class="liste_total" align="right">';
  486. print price(price2num($totalvalue,'MT'));
  487. print '</td>';
  488. print '<td class="liste_total" align="right">';
  489. if (empty($conf->global->PRODUIT_MUTLI_PRICES)) print ($total?price($totalvaluesell/$total):'&nbsp;');
  490. else print $langs->trans("Variable");
  491. print '</td>';
  492. print '<td class="liste_total" align="right">';
  493. if (empty($conf->global->PRODUIT_MUTLI_PRICES)) print price(price2num($totalvaluesell,'MT'));
  494. else print $langs->trans("Variable");
  495. print '</td>';
  496. print "</tr>";
  497. print "</table>";
  498. llxFooter();
  499. $db->close();
  500. ?>