dolibarr 20.0.0
html.formbank.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
4 * Copyright (C) 2016 Marcos GarcĂ­a <marcosgdf@gmail.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 <https://www.gnu.org/licenses/>.
18 */
19
26include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
27
28
33{
37 public $db;
38
42 public $error = '';
43
44
50 public function __construct($db)
51 {
52 $this->db = $db;
53 }
54
62 public function selectTypeOfBankAccount($selected = Account::TYPE_CURRENT, $htmlname = 'type')
63 {
64 $account = new Account($this->db);
65
66 print Form::selectarray($htmlname, $account->type_lib, $selected);
67 }
68
75 public static function getIBANLabel(Account $account)
76 {
77 if ($account->getCountryCode() == 'IN') {
78 return 'IFSC';
79 }
80
81 return 'IBANNumber';
82 }
83}
Class to manage bank accounts.
const TYPE_CURRENT
Current account.
Class to manage generation of HTML components for bank module.
selectTypeOfBankAccount($selected=Account::TYPE_CURRENT, $htmlname='type')
Retourne la liste des types de comptes financiers.
static getIBANLabel(Account $account)
Returns the name of the Iban label.
__construct($db)
Constructor.
static selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='minwidth75', $addjscombo=1, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.