PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/htdocs/cashdesk/tpl/menu.tpl.php

https://bitbucket.org/speedealing/speedealing
PHP | 81 lines | 51 code | 5 blank | 25 comment | 8 complexity | ac2551e2149f03dc468f94d425b2a198 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, GPL-3.0, MIT
  1. <?php
  2. /* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
  3. * Copyright (C) 2008-2010 Laurent Destailleur <eldy@uers.sourceforge.net>
  4. * Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
  5. * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
  6. * Copyright (C) 2012 Marcos GarcĂ­a <marcosgdf@gmail.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. include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
  22. include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
  23. include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
  24. if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
  25. {
  26. $company=new Societe($db);
  27. $company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
  28. $companyLink = $company->getNomUrl(1);
  29. }
  30. if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
  31. {
  32. $bankcash=new Account($db);
  33. $bankcash->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]);
  34. $bankcash->label=$bankcash->ref;
  35. $bankcashLink = $bankcash->getNomUrl(1);
  36. }
  37. if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))
  38. {
  39. $bankcb=new Account($db);
  40. $bankcb->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]);
  41. $bankcbLink = $bankcb->getNomUrl(1);
  42. }
  43. if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]))
  44. {
  45. $bankcheque=new Account($db);
  46. $bankcheque->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]);
  47. $bankchequeLink = $bankcheque->getNomUrl(1);
  48. }
  49. if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
  50. {
  51. $warehouse=new Entrepot($db);
  52. $warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]);
  53. $warehouseLink = $warehouse->getNomUrl(1);
  54. }
  55. $langs->load("cashdesk");
  56. $langs->load("main");
  57. print '<div class="menu_bloc">';
  58. print '<ul class="menu">';
  59. // Link to new sell
  60. print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
  61. // Open new tab on backoffice (this is not a disconnect from POS)
  62. print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
  63. // Disconnect
  64. print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['prenom'].' '.$_SESSION['nom'];
  65. print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
  66. print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
  67. /*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
  68. print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
  69. print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
  70. if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
  71. {
  72. print $langs->trans("CashDeskWarehouse").': '.$warehouseLink;
  73. }
  74. print '</li></ul>';
  75. print '</div>';
  76. ?>