dolibarr 20.0.2
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 = GETPOSTINT("rowid");
38$accountid = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('account'));
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 (!$user->hasRight('banque', 'lire') && !$user->hasRight('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 = array();
70$head[$h][0] = DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$id;
71$head[$h][1] = $langs->trans("BankTransaction");
72$h++;
73
74$head[$h][0] = DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$id;
75$head[$h][1] = $langs->trans("Info");
76$hselected = $h;
77$h++;
78
79
80print dol_get_fiche_head($head, $hselected, $langs->trans("LineRecord"), -1, 'accountline');
81
82$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
83
84
85dol_banner_tab($object, 'rowid', $linkback);
86
87print '<div class="underbanner clearboth"></div>';
88print '<br>';
89
90print '<table width="100%"><tr><td>';
92print '</td></tr></table>';
93
94print '</div>';
95
96// End of page
97llxFooter();
98$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage bank transaction lines.
dol_print_object_info($object, $usetable=0)
Show information on an object TODO Move this into html.formother.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.