dolibarr 18.0.6
info.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
25// Load Dolibarr environment
26require '../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
28require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
29require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
30
31
32// Load translation files required by the page
33$langs->loadLangs(array('banks', 'categories', 'companies'));
34
35
36// Get Parameters
37$id = GETPOST("rowid", 'int');
38$accountid = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int'));
39$ref = GETPOST('ref', 'alpha');
40
41
42// Security check
43$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
44
45$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
46if ($user->socid) {
47 $socid = $user->socid;
48}
49
50$result = restrictedArea($user, 'banque', $accountid, 'bank_account');
51if (empty($user->rights->banque->lire) && empty($user->rights->banque->consolidate)) {
53}
54
55
56/*
57 * View
58 */
59
60llxHeader();
61
62$object = new AccountLine($db);
63$object->fetch($id);
64$object->info($id);
65
66
67$h = 0;
68
69$head[$h][0] = DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$id;
70$head[$h][1] = $langs->trans("BankTransaction");
71$h++;
72
73$head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$id;
74$head[$h][1] = $langs->trans("Info");
75$hselected = $h;
76$h++;
77
78
79print dol_get_fiche_head($head, $hselected, $langs->trans("LineRecord"), -1, 'accountline');
80
81$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
82
83
84dol_banner_tab($object, 'rowid', $linkback);
85
86print '<div class="underbanner clearboth"></div>';
87print '<br>';
88
89print '<table width="100%"><tr><td>';
91print '</td></tr></table>';
92
93print '</div>';
94
95// End of page
96llxFooter();
97$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:56
llxFooter()
Empty footer.
Definition wrapper.php:70
Class to manage bank transaction lines.
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.