dolibarr  7.0.0-beta
prelevement.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
3  * Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * or see http://www.gnu.org/
19  */
20 
35 {
36  global $langs, $conf, $user;
37  $langs->load("withdrawals");
38 
39  $h = 0;
40  $head = array();
41 
42  $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$object->id;
43  $head[$h][1] = $langs->trans("Card");
44  $head[$h][2] = 'prelevement';
45  $h++;
46 
47  $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$object->id;
48  $head[$h][1] = $langs->trans("Bills");
49  $head[$h][2] = 'invoices';
50  $h++;
51 
52  $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$object->id;
53  $head[$h][1] = $langs->trans("Rejects");
54  $head[$h][2] = 'rejects';
55  $h++;
56 
57  $head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$object->id;
58  $head[$h][1] = $langs->trans("Statistics");
59  $head[$h][2] = 'statistics';
60  $h++;
61 
62  // Show more tabs from modules
63  // Entries must be declared in modules descriptor with line
64  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
65  // $this->tabs = array('entity:-tabname); to remove a tab
66  complete_head_from_modules($conf,$langs,$object,$head,$h,'prelevement');
67 
68  complete_head_from_modules($conf,$langs,$object,$head,$h,'prelevement','remove');
69 
70  return $head;
71 }
72 
79 {
80  global $conf;
81  if(empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
82  if(empty($conf->global->PRELEVEMENT_ICS)) return -1;
83  if(empty($conf->global->PRELEVEMENT_USER)) return -1;
84  return 0;
85 }
86 
prelevement_check_config()
Check need data to create standigns orders receipt file.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add')
Complete or removed entries into a head array (used to build tabs).
Class to manage withdrawal receipts.
prelevement_prepare_head(BonPrelevement $object)
Prepare array with list of tabs.