dolibarr  7.0.0-beta
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.dolibarr@gmail.com>
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 <http://www.gnu.org/licenses/>.
18  */
19 
30 class FormBank
31 {
32  var $db;
33  var $error;
34 
35 
41  public function __construct($db)
42  {
43  $this->db = $db;
44  }
45 
53  public function selectTypeOfBankAccount($selected = Account::TYPE_CURRENT, $htmlname = 'type')
54  {
55  $account = new Account($this->db);
56 
57  print Form::selectarray($htmlname, $account->type_lib, $selected);
58  }
59 
66  public static function getIBANLabel(Account $account)
67  {
68  if ($account->getCountryCode() == 'IN') {
69  return 'IFSC';
70  }
71 
72  return 'IBANNumber';
73  }
74 }
75 
const TYPE_CURRENT
Current account.
Class to manage bank accounts.
static getIBANLabel(Account $account)
Returns the name of the Iban label.
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='', $addjscombo=0, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.
__construct($db)
Constructor.
getCountryCode()
Return account country code.
selectTypeOfBankAccount($selected=Account::TYPE_CURRENT, $htmlname= 'type')
Retourne la liste des types de comptes financiers.
print
Draft customers invoices.
Definition: index.php:91
Class to manage generation of HTML components for bank module.