dolibarr  7.0.0-beta
menu.tpl.php
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) 2017 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 
22 // Protection to avoid direct call of template
23 if (empty($langs) || ! is_object($langs))
24 {
25  print "Error, template page can't be called as URL";
26  exit;
27 }
28 
29 
30 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
31 include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
32 include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
33 
34 /*if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
35 {
36  $company=new Societe($db);
37  $company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
38  $companyLink = $company->getNomUrl(1);
39 }*/
40 if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
41 {
42  $bankcash=new Account($db);
43  $bankcash->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]);
44  $bankcash->label=$bankcash->ref;
45  $bankcashLink = $bankcash->getNomUrl(1);
46 }
47 if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))
48 {
49  $bankcb=new Account($db);
50  $bankcb->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]);
51  $bankcbLink = $bankcb->getNomUrl(1);
52 }
53 if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]))
54 {
55  $bankcheque=new Account($db);
56  $bankcheque->fetch($_SESSION["CASHDESK_ID_BANKACCOUNT_CHEQUE"]);
57  $bankchequeLink = $bankcheque->getNomUrl(1);
58 }
59 if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
60 {
61  $warehouse=new Entrepot($db);
62  $warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]);
63  $warehouseLink = $warehouse->getNomUrl(1);
64 }
65 
66 
67 $langs->load("cashdesk");
68 $langs->load("main");
69 
70 print "\n".'<!-- menu.tpl.php -->'."\n";
71 print '<div class="menu_bloc">';
72 print '<ul class="menu">';
73 // Link to new sell
74 print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span class="hideonsmartphone">'.$langs->trans("NewSell").'</span></a></li>';
75 // Open new tab on backoffice (this is not a disconnect from POS)
76 print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hideonsmartphone">'.$langs->trans("BackOffice").'</span></a></li>';
77 // Disconnect
78 print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
79 print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
80 print '<form id="frmThirdparty" class="formulaire1 inline-block" method="post" action="facturation_verif.php?action=change_thirdparty">';
81 print $langs->trans("CashDeskThirdParty").': ';
82 print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3) AND s.status = 1', '', 0, 0, null, 0, 'valignmiddle inline-block');
83 print '<input class="button bouton_change_thirdparty inline-block valignmiddle" type="submit" id="bouton_change_thirdparty" value="'.$langs->trans("Modify").'">';
84 //print $companyLink;
85 print '<br>';
86 print '</form>';
87 /*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
88 print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
89 print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
90 print '<div class="clearboth">';
91 if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK))
92 {
93  print $langs->trans("CashDeskWarehouse").': '.$warehouseLink;
94 }
95 print '</div></li></ul>';
96 print '</div>';
97 print "\n".'<!-- menu.tpl.php end -->'."\n";
if(empty($reshook)) $form
View.
Definition: perms.php:103
Class to manage bank accounts.
print
Draft customers invoices.
Definition: index.php:91
Class to manage warehouses.