PageRenderTime 354ms CodeModel.GetById 269ms app.highlight 4ms RepoModel.GetById 78ms 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
 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
22include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
23include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
24include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
25
26if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
27{
28	$company=new Societe($db);
29	$company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
30	$companyLink = $company->getNomUrl(1);
31}
32if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
33{
34	$bankcash=new Account($db);
35	$bankcash->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]);
36	$bankcash->label=$bankcash->ref;
37	$bankcashLink = $bankcash->getNomUrl(1);
38}
39if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))
40{
41	$bankcb=new Account($db);
42	$bankcb->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]);
43	$bankcbLink = $bankcb->getNomUrl(1);
44}
45if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]))
46{
47	$bankcheque=new Account($db);
48	$bankcheque->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]);
49	$bankchequeLink = $bankcheque->getNomUrl(1);
50}
51if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
52{
53	$warehouse=new Entrepot($db);
54	$warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]);
55	$warehouseLink = $warehouse->getNomUrl(1);
56}
57
58
59$langs->load("cashdesk");
60$langs->load("main");
61
62print '<div class="menu_bloc">';
63print '<ul class="menu">';
64// Link to new sell
65print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
66// Open new tab on backoffice (this is not a disconnect from POS)
67print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
68// Disconnect
69print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['prenom'].' '.$_SESSION['nom'];
70print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
71print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
72/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
73print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
74print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
75if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
76{
77	print $langs->trans("CashDeskWarehouse").': '.$warehouseLink;
78}
79print '</li></ul>';
80print '</div>';
81?>