From b41016da7044637571957b2f1abfc57db301bd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Wed, 2 Mar 2016 11:12:19 +0100 Subject: [PATCH] Little refactor of FormBank::select_type_comptes_financiers --- htdocs/core/class/html.formbank.class.php | 27 +++-------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index ad74b465f27..48ec0764c09 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -49,32 +49,11 @@ class FormBank * @param string $htmlname Nom champ formulaire * @return void */ - function select_type_comptes_financiers($selected=1,$htmlname='type') + public function select_type_comptes_financiers($selected = Account::TYPE_CURRENT, $htmlname = 'type') { - global $langs; - $langs->load("banks"); + $account = new Account($this->db); - $type_available=array(0,1,2); - - print ''; + print Form::selectarray($htmlname, $account->type_lib, $selected); } }