diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 068cd410326..8b68fa921ac 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -69,7 +69,7 @@ class DoliDBMysqli extends DoliDB //print "Name DB: $host,$user,$pass,$name
"; - if (! function_exists("mysqli_connect")) + if (! class_exists('mysqli')) { $this->connected = false; $this->ok = false; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index b653cfbf5c0..5083ec3b495 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2015 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -93,6 +94,15 @@ function user_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'user'); + if (! empty($conf->hrm->enabled) && $user->rights->hrm->employee->read) + { + // Bank + $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id; + $head[$h][1] = $langs->trans("Bank"); + $head[$h][2] = 'bank'; + $h++; + } + //Info on users is visible only by internal user if (empty($user->societe_id)) { diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index e83eff0ce4d..767a7dd0e7a 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -207,7 +207,24 @@ CREATE TABLE IF NOT EXISTS llx_establishment ( status smallint DEFAULT 1 ) ENGINE=InnoDB; - +CREATE TABLE IF NOT EXISTS llx_user_rib ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_user integer NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id + datec datetime, + tms timestamp, + label varchar(30), + bank varchar(255), -- bank name + code_banque varchar(128), -- bank code + code_guichet varchar(6), -- desk code + number varchar(255), -- account number + cle_rib varchar(5), -- key of bank account + bic varchar(11), -- 11 according to ISO 9362 + iban_prefix varchar(34), -- full iban. 34 according to ISO 13616 + domiciliation varchar(255), + proprio varchar(60), + owner_address varchar(255) +)ENGINE=innodb; ALTER TABLE llx_projet_task_time ADD COLUMN invoice_id integer DEFAULT NULL; ALTER TABLE llx_projet_task_time ADD COLUMN invoice_line_id integer DEFAULT NULL; diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql new file mode 100644 index 00000000000..05738ce4582 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -0,0 +1,37 @@ +-- ============================================================================= +-- Copyright (C) 2015 Alexandre Spangaro +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================= + +create table llx_user_rib +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_user integer NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id + datec datetime, + tms timestamp, + label varchar(30), + bank varchar(255), -- bank name + code_banque varchar(128), -- bank code + code_guichet varchar(6), -- desk code + number varchar(255), -- account number + cle_rib varchar(5), -- key of bank account + bic varchar(11), -- 11 according to ISO 9362 + iban_prefix varchar(34), -- full iban. 34 according to ISO 13616 + domiciliation varchar(255), + proprio varchar(60), + owner_address varchar(255) +)ENGINE=innodb; diff --git a/htdocs/theme/md/graph-color.php b/htdocs/theme/md/graph-color.php index 4346d007158..3450180e153 100644 --- a/htdocs/theme/md/graph-color.php +++ b/htdocs/theme/md/graph-color.php @@ -17,8 +17,8 @@ */ /** - * \file htdocs/theme/eldy/graph-color.php - * \brief File to declare colors to use to build graphics with theme Eldy + * \file htdocs/theme/md/graph-color.php + * \brief File to declare colors to use to build graphics with theme Material Design * \ingroup core * * To include file, do this: diff --git a/htdocs/theme/md/img/calendar.png b/htdocs/theme/md/img/calendar.png index bbe6c27f041..98a013a4014 100644 Binary files a/htdocs/theme/md/img/calendar.png and b/htdocs/theme/md/img/calendar.png differ diff --git a/htdocs/theme/md/img/close.png b/htdocs/theme/md/img/close.png index ec4338e8bca..f2b546002f2 100644 Binary files a/htdocs/theme/md/img/close.png and b/htdocs/theme/md/img/close.png differ diff --git a/htdocs/theme/md/img/close_title.png b/htdocs/theme/md/img/close_title.png index bebb74d9861..f2b546002f2 100644 Binary files a/htdocs/theme/md/img/close_title.png and b/htdocs/theme/md/img/close_title.png differ diff --git a/htdocs/theme/md/img/delete.png b/htdocs/theme/md/img/delete.png index 8ad73597be7..2482989b0cc 100644 Binary files a/htdocs/theme/md/img/delete.png and b/htdocs/theme/md/img/delete.png differ diff --git a/htdocs/theme/md/img/disable.png b/htdocs/theme/md/img/disable.png index f8c84994d47..9bab123aca7 100644 Binary files a/htdocs/theme/md/img/disable.png and b/htdocs/theme/md/img/disable.png differ diff --git a/htdocs/theme/md/img/edit.png b/htdocs/theme/md/img/edit.png index 4e916fe1fb0..7012f52be5a 100644 Binary files a/htdocs/theme/md/img/edit.png and b/htdocs/theme/md/img/edit.png differ diff --git a/htdocs/theme/md/img/edit_add.png b/htdocs/theme/md/img/edit_add.png index ae205e9d770..84a1e05229a 100644 Binary files a/htdocs/theme/md/img/edit_add.png and b/htdocs/theme/md/img/edit_add.png differ diff --git a/htdocs/theme/md/img/edit_remove.png b/htdocs/theme/md/img/edit_remove.png index bc4bdb360fa..0725e5fc155 100644 Binary files a/htdocs/theme/md/img/edit_remove.png and b/htdocs/theme/md/img/edit_remove.png differ diff --git a/htdocs/theme/md/img/editdelete.png b/htdocs/theme/md/img/editdelete.png index f8c84994d47..1fd90502328 100644 Binary files a/htdocs/theme/md/img/editdelete.png and b/htdocs/theme/md/img/editdelete.png differ diff --git a/htdocs/theme/md/img/error.png b/htdocs/theme/md/img/error.png index f41dd8a3bc0..0d9cf16f4a2 100644 Binary files a/htdocs/theme/md/img/error.png and b/htdocs/theme/md/img/error.png differ diff --git a/htdocs/theme/md/img/file.png b/htdocs/theme/md/img/file.png index 73c66e9b2b3..7b72fee88a8 100644 Binary files a/htdocs/theme/md/img/file.png and b/htdocs/theme/md/img/file.png differ diff --git a/htdocs/theme/md/img/filenew.png b/htdocs/theme/md/img/filenew.png index 8680cce82bf..93165497458 100644 Binary files a/htdocs/theme/md/img/filenew.png and b/htdocs/theme/md/img/filenew.png differ diff --git a/htdocs/theme/md/img/filter.png b/htdocs/theme/md/img/filter.png index ee34a22c78e..43d05a50940 100644 Binary files a/htdocs/theme/md/img/filter.png and b/htdocs/theme/md/img/filter.png differ diff --git a/htdocs/theme/md/img/folder-open.png b/htdocs/theme/md/img/folder-open.png index 1db8369b3d5..b0292d92aae 100644 Binary files a/htdocs/theme/md/img/folder-open.png and b/htdocs/theme/md/img/folder-open.png differ diff --git a/htdocs/theme/md/img/folder.png b/htdocs/theme/md/img/folder.png index 04a24af2e22..fb51c4b100c 100644 Binary files a/htdocs/theme/md/img/folder.png and b/htdocs/theme/md/img/folder.png differ diff --git a/htdocs/theme/md/img/grip.png b/htdocs/theme/md/img/grip.png index 8053007e9dd..e054bf18276 100644 Binary files a/htdocs/theme/md/img/grip.png and b/htdocs/theme/md/img/grip.png differ diff --git a/htdocs/theme/md/img/grip_title.png b/htdocs/theme/md/img/grip_title.png index d6ecce335cb..e054bf18276 100644 Binary files a/htdocs/theme/md/img/grip_title.png and b/htdocs/theme/md/img/grip_title.png differ diff --git a/htdocs/theme/md/img/helpdoc.png b/htdocs/theme/md/img/helpdoc.png index 435fbc77985..1d194e23ec2 100644 Binary files a/htdocs/theme/md/img/helpdoc.png and b/htdocs/theme/md/img/helpdoc.png differ diff --git a/htdocs/theme/md/img/high.png b/htdocs/theme/md/img/high.png index c0eaee6542f..482dc3c31dd 100644 Binary files a/htdocs/theme/md/img/high.png and b/htdocs/theme/md/img/high.png differ diff --git a/htdocs/theme/md/img/history.png b/htdocs/theme/md/img/history.png index 0fa4283476b..148928d397d 100644 Binary files a/htdocs/theme/md/img/history.png and b/htdocs/theme/md/img/history.png differ diff --git a/htdocs/theme/md/img/info.png b/htdocs/theme/md/img/info.png index 12e6cd655d6..bb6095bd00a 100644 Binary files a/htdocs/theme/md/img/info.png and b/htdocs/theme/md/img/info.png differ diff --git a/htdocs/theme/md/img/info_black.png b/htdocs/theme/md/img/info_black.png index 741dabd5e19..12a57545412 100644 Binary files a/htdocs/theme/md/img/info_black.png and b/htdocs/theme/md/img/info_black.png differ diff --git a/htdocs/theme/md/img/lock.png b/htdocs/theme/md/img/lock.png index 3d99cf1eaef..317c034b9b4 100644 Binary files a/htdocs/theme/md/img/lock.png and b/htdocs/theme/md/img/lock.png differ diff --git a/htdocs/theme/md/img/menus/README.md b/htdocs/theme/md/img/menus/README.md deleted file mode 100644 index 12cd9da537a..00000000000 --- a/htdocs/theme/md/img/menus/README.md +++ /dev/null @@ -1,12 +0,0 @@ - -Tutorial to create a new image for menu: - -1) First find an image. -2) With Gimp, open image and check there is a alpha channel. If not add one. -3) Convert image into back and white (Menu Image - Mode - Grey levels). -4) Use the degrade tool with option: -* Erase color -* Opacity: 50 +/- -* Offset: 0 -* Shape: Linear -Il est possible aussi d'augmenter la transparence globale depuis le calque. diff --git a/htdocs/theme/md/img/menus/agenda.png b/htdocs/theme/md/img/menus/agenda.png index 0798d15f938..35d8b1b3169 100644 Binary files a/htdocs/theme/md/img/menus/agenda.png and b/htdocs/theme/md/img/menus/agenda.png differ diff --git a/htdocs/theme/md/img/menus/agenda_over.png b/htdocs/theme/md/img/menus/agenda_over.png deleted file mode 100644 index bdebed8fa26..00000000000 Binary files a/htdocs/theme/md/img/menus/agenda_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/bank.png b/htdocs/theme/md/img/menus/bank.png index fbaee7cc6bd..b83e7cd310a 100644 Binary files a/htdocs/theme/md/img/menus/bank.png and b/htdocs/theme/md/img/menus/bank.png differ diff --git a/htdocs/theme/md/img/menus/bank_over.png b/htdocs/theme/md/img/menus/bank_over.png deleted file mode 100644 index d395710a877..00000000000 Binary files a/htdocs/theme/md/img/menus/bank_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/chart.png b/htdocs/theme/md/img/menus/chart.png index 6efce90a788..18559b692d1 100644 Binary files a/htdocs/theme/md/img/menus/chart.png and b/htdocs/theme/md/img/menus/chart.png differ diff --git a/htdocs/theme/md/img/menus/commercial.png b/htdocs/theme/md/img/menus/commercial.png index df9b443ceec..ba06d79a766 100644 Binary files a/htdocs/theme/md/img/menus/commercial.png and b/htdocs/theme/md/img/menus/commercial.png differ diff --git a/htdocs/theme/md/img/menus/commercial_over.png b/htdocs/theme/md/img/menus/commercial_over.png deleted file mode 100644 index 5fc4f661821..00000000000 Binary files a/htdocs/theme/md/img/menus/commercial_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/company.png b/htdocs/theme/md/img/menus/company.png index 828bf8f2e70..7b9227c0674 100644 Binary files a/htdocs/theme/md/img/menus/company.png and b/htdocs/theme/md/img/menus/company.png differ diff --git a/htdocs/theme/md/img/menus/company_over.png b/htdocs/theme/md/img/menus/company_over.png deleted file mode 100644 index bed6b8dcbfb..00000000000 Binary files a/htdocs/theme/md/img/menus/company_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/ecm.png b/htdocs/theme/md/img/menus/ecm.png index 542ff5766e1..1bb8e0dafd6 100644 Binary files a/htdocs/theme/md/img/menus/ecm.png and b/htdocs/theme/md/img/menus/ecm.png differ diff --git a/htdocs/theme/md/img/menus/ecm_over.png b/htdocs/theme/md/img/menus/ecm_over.png deleted file mode 100644 index 269258a8cfb..00000000000 Binary files a/htdocs/theme/md/img/menus/ecm_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/externalsite.png b/htdocs/theme/md/img/menus/externalsite.png index 01e30553fc5..8abd6437ea6 100644 Binary files a/htdocs/theme/md/img/menus/externalsite.png and b/htdocs/theme/md/img/menus/externalsite.png differ diff --git a/htdocs/theme/md/img/menus/externalsite_over.png b/htdocs/theme/md/img/menus/externalsite_over.png deleted file mode 100644 index 8e227ddc83f..00000000000 Binary files a/htdocs/theme/md/img/menus/externalsite_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/ftp.png b/htdocs/theme/md/img/menus/ftp.png index d9d96f0255b..a70a9d29b77 100644 Binary files a/htdocs/theme/md/img/menus/ftp.png and b/htdocs/theme/md/img/menus/ftp.png differ diff --git a/htdocs/theme/md/img/menus/ftp_over.png b/htdocs/theme/md/img/menus/ftp_over.png deleted file mode 100644 index e3ea742e7c7..00000000000 Binary files a/htdocs/theme/md/img/menus/ftp_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic1.png b/htdocs/theme/md/img/menus/generic1.png index 39f808bed32..b51ce3ed95a 100644 Binary files a/htdocs/theme/md/img/menus/generic1.png and b/htdocs/theme/md/img/menus/generic1.png differ diff --git a/htdocs/theme/md/img/menus/generic1_over.png b/htdocs/theme/md/img/menus/generic1_over.png deleted file mode 100644 index adfa8c1599b..00000000000 Binary files a/htdocs/theme/md/img/menus/generic1_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic2.png b/htdocs/theme/md/img/menus/generic2.png index f4dfc5f360a..b51ce3ed95a 100644 Binary files a/htdocs/theme/md/img/menus/generic2.png and b/htdocs/theme/md/img/menus/generic2.png differ diff --git a/htdocs/theme/md/img/menus/generic2_over.png b/htdocs/theme/md/img/menus/generic2_over.png deleted file mode 100644 index c8e58fc2220..00000000000 Binary files a/htdocs/theme/md/img/menus/generic2_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic3.png b/htdocs/theme/md/img/menus/generic3.png index 00769352dae..b51ce3ed95a 100644 Binary files a/htdocs/theme/md/img/menus/generic3.png and b/htdocs/theme/md/img/menus/generic3.png differ diff --git a/htdocs/theme/md/img/menus/generic3_over.png b/htdocs/theme/md/img/menus/generic3_over.png deleted file mode 100644 index 0672d20bce4..00000000000 Binary files a/htdocs/theme/md/img/menus/generic3_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/generic4.png b/htdocs/theme/md/img/menus/generic4.png index 5f9240240da..b51ce3ed95a 100644 Binary files a/htdocs/theme/md/img/menus/generic4.png and b/htdocs/theme/md/img/menus/generic4.png differ diff --git a/htdocs/theme/md/img/menus/generic4_over.png b/htdocs/theme/md/img/menus/generic4_over.png deleted file mode 100644 index 6a4d7b1acce..00000000000 Binary files a/htdocs/theme/md/img/menus/generic4_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/globe.png b/htdocs/theme/md/img/menus/globe.png index 8c2380eda13..0bc7dfd4802 100644 Binary files a/htdocs/theme/md/img/menus/globe.png and b/htdocs/theme/md/img/menus/globe.png differ diff --git a/htdocs/theme/md/img/menus/globe_over.png b/htdocs/theme/md/img/menus/globe_over.png deleted file mode 100644 index fd1e54f4754..00000000000 Binary files a/htdocs/theme/md/img/menus/globe_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/holiday.png b/htdocs/theme/md/img/menus/holiday.png index 493974477f3..014c9918c2e 100644 Binary files a/htdocs/theme/md/img/menus/holiday.png and b/htdocs/theme/md/img/menus/holiday.png differ diff --git a/htdocs/theme/md/img/menus/home.png b/htdocs/theme/md/img/menus/home.png index 2c174340c76..1614347a829 100644 Binary files a/htdocs/theme/md/img/menus/home.png and b/htdocs/theme/md/img/menus/home.png differ diff --git a/htdocs/theme/md/img/menus/home_over.png b/htdocs/theme/md/img/menus/home_over.png deleted file mode 100644 index ff0d692307f..00000000000 Binary files a/htdocs/theme/md/img/menus/home_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/mail.png b/htdocs/theme/md/img/menus/mail.png index b7ff50e3d99..7b65a3d522e 100644 Binary files a/htdocs/theme/md/img/menus/mail.png and b/htdocs/theme/md/img/menus/mail.png differ diff --git a/htdocs/theme/md/img/menus/mail_over.png b/htdocs/theme/md/img/menus/mail_over.png deleted file mode 100644 index f9de32d3002..00000000000 Binary files a/htdocs/theme/md/img/menus/mail_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/members.png b/htdocs/theme/md/img/menus/members.png index fb72919971c..9bba632552c 100644 Binary files a/htdocs/theme/md/img/menus/members.png and b/htdocs/theme/md/img/menus/members.png differ diff --git a/htdocs/theme/md/img/menus/members_over.png b/htdocs/theme/md/img/menus/members_over.png deleted file mode 100644 index 8c77498c304..00000000000 Binary files a/htdocs/theme/md/img/menus/members_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/money.png b/htdocs/theme/md/img/menus/money.png index 503e5c67519..fb04031d47a 100644 Binary files a/htdocs/theme/md/img/menus/money.png and b/htdocs/theme/md/img/menus/money.png differ diff --git a/htdocs/theme/md/img/menus/money_over.png b/htdocs/theme/md/img/menus/money_over.png deleted file mode 100644 index 9a501e762d0..00000000000 Binary files a/htdocs/theme/md/img/menus/money_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/pointofsale.png b/htdocs/theme/md/img/menus/pointofsale.png index 6bb68041d19..8826337cd31 100644 Binary files a/htdocs/theme/md/img/menus/pointofsale.png and b/htdocs/theme/md/img/menus/pointofsale.png differ diff --git a/htdocs/theme/md/img/menus/pointofsale_over.png b/htdocs/theme/md/img/menus/pointofsale_over.png deleted file mode 100644 index 4abe7219694..00000000000 Binary files a/htdocs/theme/md/img/menus/pointofsale_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/products.png b/htdocs/theme/md/img/menus/products.png index a5ecf2ceb78..a8236331815 100644 Binary files a/htdocs/theme/md/img/menus/products.png and b/htdocs/theme/md/img/menus/products.png differ diff --git a/htdocs/theme/md/img/menus/products_over.png b/htdocs/theme/md/img/menus/products_over.png deleted file mode 100644 index 0a5d9a7951f..00000000000 Binary files a/htdocs/theme/md/img/menus/products_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/project.png b/htdocs/theme/md/img/menus/project.png index ae4d177c6cd..54f4aa382fe 100644 Binary files a/htdocs/theme/md/img/menus/project.png and b/htdocs/theme/md/img/menus/project.png differ diff --git a/htdocs/theme/md/img/menus/project_over.png b/htdocs/theme/md/img/menus/project_over.png deleted file mode 100644 index d6c28b6d7ee..00000000000 Binary files a/htdocs/theme/md/img/menus/project_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/shop.png b/htdocs/theme/md/img/menus/shop.png index fab7db59040..8d8da880f0e 100644 Binary files a/htdocs/theme/md/img/menus/shop.png and b/htdocs/theme/md/img/menus/shop.png differ diff --git a/htdocs/theme/md/img/menus/shop_over.png b/htdocs/theme/md/img/menus/shop_over.png deleted file mode 100644 index bda5823f8c3..00000000000 Binary files a/htdocs/theme/md/img/menus/shop_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/menus/tools.png b/htdocs/theme/md/img/menus/tools.png index de7f2b7b221..244478041a4 100644 Binary files a/htdocs/theme/md/img/menus/tools.png and b/htdocs/theme/md/img/menus/tools.png differ diff --git a/htdocs/theme/md/img/menus/tools_over.png b/htdocs/theme/md/img/menus/tools_over.png deleted file mode 100644 index 80f9a7f553a..00000000000 Binary files a/htdocs/theme/md/img/menus/tools_over.png and /dev/null differ diff --git a/htdocs/theme/md/img/next.png b/htdocs/theme/md/img/next.png index 953731ca934..3e386e112d8 100644 Binary files a/htdocs/theme/md/img/next.png and b/htdocs/theme/md/img/next.png differ diff --git a/htdocs/theme/md/img/object_account.png b/htdocs/theme/md/img/object_account.png index 46be8b6fe0f..31628692b72 100644 Binary files a/htdocs/theme/md/img/object_account.png and b/htdocs/theme/md/img/object_account.png differ diff --git a/htdocs/theme/md/img/object_accounting.png b/htdocs/theme/md/img/object_accounting.png index b5600221f02..2e6898246c2 100644 Binary files a/htdocs/theme/md/img/object_accounting.png and b/htdocs/theme/md/img/object_accounting.png differ diff --git a/htdocs/theme/md/img/object_action.png b/htdocs/theme/md/img/object_action.png index 0b02fada414..3a777f181d8 100644 Binary files a/htdocs/theme/md/img/object_action.png and b/htdocs/theme/md/img/object_action.png differ diff --git a/htdocs/theme/md/img/object_action_rdv.png b/htdocs/theme/md/img/object_action_rdv.png index 25edfa85b45..f29c713022c 100644 Binary files a/htdocs/theme/md/img/object_action_rdv.png and b/htdocs/theme/md/img/object_action_rdv.png differ diff --git a/htdocs/theme/md/img/object_address.png b/htdocs/theme/md/img/object_address.png index 201577281f0..b35923a7e4f 100644 Binary files a/htdocs/theme/md/img/object_address.png and b/htdocs/theme/md/img/object_address.png differ diff --git a/htdocs/theme/md/img/object_bill.png b/htdocs/theme/md/img/object_bill.png index b4022e77740..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_bill.png and b/htdocs/theme/md/img/object_bill.png differ diff --git a/htdocs/theme/md/img/object_billa.png b/htdocs/theme/md/img/object_billa.png index 93564621d7a..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_billa.png and b/htdocs/theme/md/img/object_billa.png differ diff --git a/htdocs/theme/md/img/object_billd.png b/htdocs/theme/md/img/object_billd.png index 2080958f0fb..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_billd.png and b/htdocs/theme/md/img/object_billd.png differ diff --git a/htdocs/theme/md/img/object_billr.png b/htdocs/theme/md/img/object_billr.png index 7a9692a0804..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_billr.png and b/htdocs/theme/md/img/object_billr.png differ diff --git a/htdocs/theme/md/img/object_bookmark.png b/htdocs/theme/md/img/object_bookmark.png index 39109ef5ee6..bde60c8877c 100644 Binary files a/htdocs/theme/md/img/object_bookmark.png and b/htdocs/theme/md/img/object_bookmark.png differ diff --git a/htdocs/theme/md/img/object_building.png b/htdocs/theme/md/img/object_building.png index c9d1539dddc..efe44594ae8 100644 Binary files a/htdocs/theme/md/img/object_building.png and b/htdocs/theme/md/img/object_building.png differ diff --git a/htdocs/theme/md/img/object_calendar.png b/htdocs/theme/md/img/object_calendar.png index 8cda1f3f220..98a013a4014 100644 Binary files a/htdocs/theme/md/img/object_calendar.png and b/htdocs/theme/md/img/object_calendar.png differ diff --git a/htdocs/theme/md/img/object_calendarday.png b/htdocs/theme/md/img/object_calendarday.png index 5678cdd2411..75b1de981da 100644 Binary files a/htdocs/theme/md/img/object_calendarday.png and b/htdocs/theme/md/img/object_calendarday.png differ diff --git a/htdocs/theme/md/img/object_calendarperuser.png b/htdocs/theme/md/img/object_calendarperuser.png index ba16a4ab6c0..98a013a4014 100644 Binary files a/htdocs/theme/md/img/object_calendarperuser.png and b/htdocs/theme/md/img/object_calendarperuser.png differ diff --git a/htdocs/theme/md/img/object_calendarweek.png b/htdocs/theme/md/img/object_calendarweek.png index 4ea2c09ccc9..50c65619ee3 100644 Binary files a/htdocs/theme/md/img/object_calendarweek.png and b/htdocs/theme/md/img/object_calendarweek.png differ diff --git a/htdocs/theme/md/img/object_category-expanded.png b/htdocs/theme/md/img/object_category-expanded.png index 8168f76fa26..b0292d92aae 100644 Binary files a/htdocs/theme/md/img/object_category-expanded.png and b/htdocs/theme/md/img/object_category-expanded.png differ diff --git a/htdocs/theme/md/img/object_category.png b/htdocs/theme/md/img/object_category.png index aaea38dbef2..fb51c4b100c 100644 Binary files a/htdocs/theme/md/img/object_category.png and b/htdocs/theme/md/img/object_category.png differ diff --git a/htdocs/theme/md/img/object_commercial.png b/htdocs/theme/md/img/object_commercial.png index 36cdcc8d4a2..5f6fbc4ded6 100644 Binary files a/htdocs/theme/md/img/object_commercial.png and b/htdocs/theme/md/img/object_commercial.png differ diff --git a/htdocs/theme/md/img/object_company.png b/htdocs/theme/md/img/object_company.png index 2a582b8bd4c..efe44594ae8 100644 Binary files a/htdocs/theme/md/img/object_company.png and b/htdocs/theme/md/img/object_company.png differ diff --git a/htdocs/theme/md/img/object_contact.png b/htdocs/theme/md/img/object_contact.png index d4272f367c6..16030c44333 100644 Binary files a/htdocs/theme/md/img/object_contact.png and b/htdocs/theme/md/img/object_contact.png differ diff --git a/htdocs/theme/md/img/object_contact_all.png b/htdocs/theme/md/img/object_contact_all.png index f571504b246..cc204fdcaf1 100644 Binary files a/htdocs/theme/md/img/object_contact_all.png and b/htdocs/theme/md/img/object_contact_all.png differ diff --git a/htdocs/theme/md/img/object_contract.png b/htdocs/theme/md/img/object_contract.png index a75f954555e..6e14b35ffbb 100644 Binary files a/htdocs/theme/md/img/object_contract.png and b/htdocs/theme/md/img/object_contract.png differ diff --git a/htdocs/theme/md/img/object_cron.png b/htdocs/theme/md/img/object_cron.png index 6186d18da70..8a3a5091614 100644 Binary files a/htdocs/theme/md/img/object_cron.png and b/htdocs/theme/md/img/object_cron.png differ diff --git a/htdocs/theme/md/img/object_dir.png b/htdocs/theme/md/img/object_dir.png index 6f364389133..fb51c4b100c 100644 Binary files a/htdocs/theme/md/img/object_dir.png and b/htdocs/theme/md/img/object_dir.png differ diff --git a/htdocs/theme/md/img/object_email.png b/htdocs/theme/md/img/object_email.png index d5cd141733d..977c4cbd8f9 100644 Binary files a/htdocs/theme/md/img/object_email.png and b/htdocs/theme/md/img/object_email.png differ diff --git a/htdocs/theme/md/img/object_energie.png b/htdocs/theme/md/img/object_energie.png index bc3966d2fa2..668d1bc68a1 100644 Binary files a/htdocs/theme/md/img/object_energie.png and b/htdocs/theme/md/img/object_energie.png differ diff --git a/htdocs/theme/md/img/object_generic.png b/htdocs/theme/md/img/object_generic.png index ccfd2d2f5b2..7b72fee88a8 100644 Binary files a/htdocs/theme/md/img/object_generic.png and b/htdocs/theme/md/img/object_generic.png differ diff --git a/htdocs/theme/md/img/object_globe.png b/htdocs/theme/md/img/object_globe.png index aae8bf6eba0..4c4a2e48c29 100644 Binary files a/htdocs/theme/md/img/object_globe.png and b/htdocs/theme/md/img/object_globe.png differ diff --git a/htdocs/theme/md/img/object_group.png b/htdocs/theme/md/img/object_group.png index be0255f7ec2..cc204fdcaf1 100644 Binary files a/htdocs/theme/md/img/object_group.png and b/htdocs/theme/md/img/object_group.png differ diff --git a/htdocs/theme/md/img/object_holiday.png b/htdocs/theme/md/img/object_holiday.png index fdc1dd8e22b..7f11fe166b8 100644 Binary files a/htdocs/theme/md/img/object_holiday.png and b/htdocs/theme/md/img/object_holiday.png differ diff --git a/htdocs/theme/md/img/object_intervention.png b/htdocs/theme/md/img/object_intervention.png index 7bb7ef583b4..148928d397d 100644 Binary files a/htdocs/theme/md/img/object_intervention.png and b/htdocs/theme/md/img/object_intervention.png differ diff --git a/htdocs/theme/md/img/object_invoice.png b/htdocs/theme/md/img/object_invoice.png index b4022e77740..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_invoice.png and b/htdocs/theme/md/img/object_invoice.png differ diff --git a/htdocs/theme/md/img/object_label.png b/htdocs/theme/md/img/object_label.png index b112af5cf0a..faa4774a5cb 100644 Binary files a/htdocs/theme/md/img/object_label.png and b/htdocs/theme/md/img/object_label.png differ diff --git a/htdocs/theme/md/img/object_list.png b/htdocs/theme/md/img/object_list.png index 1ceb098d9cc..f5df34a3bc9 100644 Binary files a/htdocs/theme/md/img/object_list.png and b/htdocs/theme/md/img/object_list.png differ diff --git a/htdocs/theme/md/img/object_margin.png b/htdocs/theme/md/img/object_margin.png index cd0eb4109f7..b8ad5b5cc24 100644 Binary files a/htdocs/theme/md/img/object_margin.png and b/htdocs/theme/md/img/object_margin.png differ diff --git a/htdocs/theme/md/img/object_opensurvey.png b/htdocs/theme/md/img/object_opensurvey.png index b5de3223bd4..d1f88f3c794 100644 Binary files a/htdocs/theme/md/img/object_opensurvey.png and b/htdocs/theme/md/img/object_opensurvey.png differ diff --git a/htdocs/theme/md/img/object_order.png b/htdocs/theme/md/img/object_order.png index 20a1ddb6131..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_order.png and b/htdocs/theme/md/img/object_order.png differ diff --git a/htdocs/theme/md/img/object_payment.png b/htdocs/theme/md/img/object_payment.png index 5691147d8ff..96eaf71df1e 100644 Binary files a/htdocs/theme/md/img/object_payment.png and b/htdocs/theme/md/img/object_payment.png differ diff --git a/htdocs/theme/md/img/object_phoning.png b/htdocs/theme/md/img/object_phoning.png index 23a4e0b1dbb..0bfd66d818e 100644 Binary files a/htdocs/theme/md/img/object_phoning.png and b/htdocs/theme/md/img/object_phoning.png differ diff --git a/htdocs/theme/md/img/object_printer.png b/htdocs/theme/md/img/object_printer.png index 8722632547c..6e8bcbf98a5 100644 Binary files a/htdocs/theme/md/img/object_printer.png and b/htdocs/theme/md/img/object_printer.png differ diff --git a/htdocs/theme/md/img/object_product.png b/htdocs/theme/md/img/object_product.png index 79910e5e214..695352538d9 100644 Binary files a/htdocs/theme/md/img/object_product.png and b/htdocs/theme/md/img/object_product.png differ diff --git a/htdocs/theme/md/img/object_project.png b/htdocs/theme/md/img/object_project.png index fd84ab427db..76139922af1 100644 Binary files a/htdocs/theme/md/img/object_project.png and b/htdocs/theme/md/img/object_project.png differ diff --git a/htdocs/theme/md/img/object_projectpub.png b/htdocs/theme/md/img/object_projectpub.png index 1444573cf05..76139922af1 100644 Binary files a/htdocs/theme/md/img/object_projectpub.png and b/htdocs/theme/md/img/object_projectpub.png differ diff --git a/htdocs/theme/md/img/object_projecttask.png b/htdocs/theme/md/img/object_projecttask.png index 4a01b50435a..c54e95f03ba 100644 Binary files a/htdocs/theme/md/img/object_projecttask.png and b/htdocs/theme/md/img/object_projecttask.png differ diff --git a/htdocs/theme/md/img/object_propal.png b/htdocs/theme/md/img/object_propal.png index 2dc60e66b3e..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_propal.png and b/htdocs/theme/md/img/object_propal.png differ diff --git a/htdocs/theme/md/img/object_reduc.png b/htdocs/theme/md/img/object_reduc.png index ccfd2d2f5b2..b59cbf36f3e 100644 Binary files a/htdocs/theme/md/img/object_reduc.png and b/htdocs/theme/md/img/object_reduc.png differ diff --git a/htdocs/theme/md/img/object_resource.png b/htdocs/theme/md/img/object_resource.png index 8cda1f3f220..b35923a7e4f 100644 Binary files a/htdocs/theme/md/img/object_resource.png and b/htdocs/theme/md/img/object_resource.png differ diff --git a/htdocs/theme/md/img/object_sending.png b/htdocs/theme/md/img/object_sending.png index c798ced0b5c..7a4a0a44f38 100644 Binary files a/htdocs/theme/md/img/object_sending.png and b/htdocs/theme/md/img/object_sending.png differ diff --git a/htdocs/theme/md/img/object_service.png b/htdocs/theme/md/img/object_service.png index 65e9041589f..4f8ad8e43e2 100644 Binary files a/htdocs/theme/md/img/object_service.png and b/htdocs/theme/md/img/object_service.png differ diff --git a/htdocs/theme/md/img/object_stock.png b/htdocs/theme/md/img/object_stock.png index 2f439db7b50..f6bcc6478ae 100644 Binary files a/htdocs/theme/md/img/object_stock.png and b/htdocs/theme/md/img/object_stock.png differ diff --git a/htdocs/theme/md/img/object_supplier_proposal.png b/htdocs/theme/md/img/object_supplier_proposal.png index 2dc60e66b3e..19d4be8371d 100644 Binary files a/htdocs/theme/md/img/object_supplier_proposal.png and b/htdocs/theme/md/img/object_supplier_proposal.png differ diff --git a/htdocs/theme/md/img/object_task.png b/htdocs/theme/md/img/object_task.png index 14dc14a9602..c54e95f03ba 100644 Binary files a/htdocs/theme/md/img/object_task.png and b/htdocs/theme/md/img/object_task.png differ diff --git a/htdocs/theme/md/img/object_task_time.png b/htdocs/theme/md/img/object_task_time.png index 8cda1f3f220..a9852339cc0 100644 Binary files a/htdocs/theme/md/img/object_task_time.png and b/htdocs/theme/md/img/object_task_time.png differ diff --git a/htdocs/theme/md/img/object_technic.png b/htdocs/theme/md/img/object_technic.png index 6186d18da70..4ae5d40a340 100644 Binary files a/htdocs/theme/md/img/object_technic.png and b/htdocs/theme/md/img/object_technic.png differ diff --git a/htdocs/theme/md/img/object_trip.png b/htdocs/theme/md/img/object_trip.png index 95cc4412111..3d75bc937e5 100644 Binary files a/htdocs/theme/md/img/object_trip.png and b/htdocs/theme/md/img/object_trip.png differ diff --git a/htdocs/theme/md/img/object_user.png b/htdocs/theme/md/img/object_user.png index efd446a1a4c..599e87b3ab8 100644 Binary files a/htdocs/theme/md/img/object_user.png and b/htdocs/theme/md/img/object_user.png differ diff --git a/htdocs/theme/md/img/off.png b/htdocs/theme/md/img/off.png index f4217646b26..9bab123aca7 100644 Binary files a/htdocs/theme/md/img/off.png and b/htdocs/theme/md/img/off.png differ diff --git a/htdocs/theme/md/img/on.png b/htdocs/theme/md/img/on.png index 728bb393536..7d0344d4dbb 100644 Binary files a/htdocs/theme/md/img/on.png and b/htdocs/theme/md/img/on.png differ diff --git a/htdocs/theme/md/img/play.png b/htdocs/theme/md/img/play.png index 4922ea1ec12..96021dc5081 100644 Binary files a/htdocs/theme/md/img/play.png and b/htdocs/theme/md/img/play.png differ diff --git a/htdocs/theme/md/img/previous.png b/htdocs/theme/md/img/previous.png index f807a78d281..e0f87b58603 100644 Binary files a/htdocs/theme/md/img/previous.png and b/htdocs/theme/md/img/previous.png differ diff --git a/htdocs/theme/md/img/printer.png b/htdocs/theme/md/img/printer.png index a81e2fa0df6..6e8bcbf98a5 100644 Binary files a/htdocs/theme/md/img/printer.png and b/htdocs/theme/md/img/printer.png differ diff --git a/htdocs/theme/md/img/puce.png b/htdocs/theme/md/img/puce.png index 8c116b0dc42..9bd70dccb73 100644 Binary files a/htdocs/theme/md/img/puce.png and b/htdocs/theme/md/img/puce.png differ diff --git a/htdocs/theme/md/img/recent.png b/htdocs/theme/md/img/recent.png index a49fc171c06..e6fb611f3bc 100644 Binary files a/htdocs/theme/md/img/recent.png and b/htdocs/theme/md/img/recent.png differ diff --git a/htdocs/theme/md/img/refresh.png b/htdocs/theme/md/img/refresh.png index 9994475cdfe..a4fac077e7a 100644 Binary files a/htdocs/theme/md/img/refresh.png and b/htdocs/theme/md/img/refresh.png differ diff --git a/htdocs/theme/md/img/reload.png b/htdocs/theme/md/img/reload.png index a4029f119de..a4fac077e7a 100644 Binary files a/htdocs/theme/md/img/reload.png and b/htdocs/theme/md/img/reload.png differ diff --git a/htdocs/theme/md/img/rightarrow.png b/htdocs/theme/md/img/rightarrow.png index 2c479d9453b..79f3cd64203 100644 Binary files a/htdocs/theme/md/img/rightarrow.png and b/htdocs/theme/md/img/rightarrow.png differ diff --git a/htdocs/theme/md/img/searchclear.png b/htdocs/theme/md/img/searchclear.png index 12437f84823..5715b64beed 100644 Binary files a/htdocs/theme/md/img/searchclear.png and b/htdocs/theme/md/img/searchclear.png differ diff --git a/htdocs/theme/md/img/setup.png b/htdocs/theme/md/img/setup.png index f997e53799b..4ae5d40a340 100644 Binary files a/htdocs/theme/md/img/setup.png and b/htdocs/theme/md/img/setup.png differ diff --git a/htdocs/theme/md/img/split.png b/htdocs/theme/md/img/split.png index bb66213f413..f3c34618c6b 100644 Binary files a/htdocs/theme/md/img/split.png and b/htdocs/theme/md/img/split.png differ diff --git a/htdocs/theme/md/img/star.png b/htdocs/theme/md/img/star.png index 4b6b4584675..d6496ab6f89 100644 Binary files a/htdocs/theme/md/img/star.png and b/htdocs/theme/md/img/star.png differ diff --git a/htdocs/theme/md/img/switch_off.png b/htdocs/theme/md/img/switch_off.png index 28a4376fb43..ad7e703ccac 100644 Binary files a/htdocs/theme/md/img/switch_off.png and b/htdocs/theme/md/img/switch_off.png differ diff --git a/htdocs/theme/md/img/switch_on.png b/htdocs/theme/md/img/switch_on.png index d4e32d98f57..0f72bfaccd5 100644 Binary files a/htdocs/theme/md/img/switch_on.png and b/htdocs/theme/md/img/switch_on.png differ diff --git a/htdocs/theme/md/img/tick.png b/htdocs/theme/md/img/tick.png index 9b035d99511..8e05ce551c7 100644 Binary files a/htdocs/theme/md/img/tick.png and b/htdocs/theme/md/img/tick.png differ diff --git a/htdocs/theme/md/img/title_accountancy.png b/htdocs/theme/md/img/title_accountancy.png index 6e7c2a412c6..f83b7635712 100644 Binary files a/htdocs/theme/md/img/title_accountancy.png and b/htdocs/theme/md/img/title_accountancy.png differ diff --git a/htdocs/theme/md/img/title_bank.png b/htdocs/theme/md/img/title_bank.png index 034a8d0c5e4..7ff265a4917 100644 Binary files a/htdocs/theme/md/img/title_bank.png and b/htdocs/theme/md/img/title_bank.png differ diff --git a/htdocs/theme/md/img/title_commercial.png b/htdocs/theme/md/img/title_commercial.png index 46394177698..2474d61bb76 100644 Binary files a/htdocs/theme/md/img/title_commercial.png and b/htdocs/theme/md/img/title_commercial.png differ diff --git a/htdocs/theme/md/img/title_companies.png b/htdocs/theme/md/img/title_companies.png index b2539dba849..4d0f7ba2a04 100644 Binary files a/htdocs/theme/md/img/title_companies.png and b/htdocs/theme/md/img/title_companies.png differ diff --git a/htdocs/theme/md/img/title_generic.png b/htdocs/theme/md/img/title_generic.png index ae224327549..ffb07138f96 100644 Binary files a/htdocs/theme/md/img/title_generic.png and b/htdocs/theme/md/img/title_generic.png differ diff --git a/htdocs/theme/md/img/title_home.png b/htdocs/theme/md/img/title_home.png index e9273e727f5..b832916f5e9 100644 Binary files a/htdocs/theme/md/img/title_home.png and b/htdocs/theme/md/img/title_home.png differ diff --git a/htdocs/theme/md/img/title_hrm.png b/htdocs/theme/md/img/title_hrm.png index de788526bc1..33114ffd1c9 100644 Binary files a/htdocs/theme/md/img/title_hrm.png and b/htdocs/theme/md/img/title_hrm.png differ diff --git a/htdocs/theme/md/img/title_products.png b/htdocs/theme/md/img/title_products.png index d3c5b125bbe..142d71505c8 100644 Binary files a/htdocs/theme/md/img/title_products.png and b/htdocs/theme/md/img/title_products.png differ diff --git a/htdocs/theme/md/img/title_project.png b/htdocs/theme/md/img/title_project.png index 05d8ea630b8..da63e58c068 100644 Binary files a/htdocs/theme/md/img/title_project.png and b/htdocs/theme/md/img/title_project.png differ diff --git a/htdocs/theme/md/img/title_setup.png b/htdocs/theme/md/img/title_setup.png index d7548d28709..acf1ddf85b3 100644 Binary files a/htdocs/theme/md/img/title_setup.png and b/htdocs/theme/md/img/title_setup.png differ diff --git a/htdocs/theme/md/img/unlock.png b/htdocs/theme/md/img/unlock.png index afefaa94d47..44d193e427e 100644 Binary files a/htdocs/theme/md/img/unlock.png and b/htdocs/theme/md/img/unlock.png differ diff --git a/htdocs/theme/md/img/vcard.png b/htdocs/theme/md/img/vcard.png index 315abdf179d..343b28cbbe9 100644 Binary files a/htdocs/theme/md/img/vcard.png and b/htdocs/theme/md/img/vcard.png differ diff --git a/htdocs/theme/md/img/view.png b/htdocs/theme/md/img/view.png index 76c1e9f1e6a..f22aab3688b 100644 Binary files a/htdocs/theme/md/img/view.png and b/htdocs/theme/md/img/view.png differ diff --git a/htdocs/theme/md/img/warning.png b/htdocs/theme/md/img/warning.png index f1b93b8cc82..dc168ba9439 100644 Binary files a/htdocs/theme/md/img/warning.png and b/htdocs/theme/md/img/warning.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 56df547b9b1..a7a191f45bb 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -61,7 +61,7 @@ $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $path=''; // This value may be used in future for external module to overwrite theme -$theme='eldy'; // Value of theme +$theme='md'; // Value of theme if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; } // Define image path files and other constants diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php new file mode 100644 index 00000000000..0325fcd0a50 --- /dev/null +++ b/htdocs/user/bank.php @@ -0,0 +1,390 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Peter Fontaine + * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2015 Alexandre Spangaro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/user/bank.php + * \ingroup HRM + * \brief BAN tab for users + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/userbankaccount.class.php'; + +$langs->load("companies"); +$langs->load("commercial"); +$langs->load("banks"); +$langs->load("bills"); + +$id = GETPOST('id','int'); +$action = GETPOST("action"); + +// Security check +$socid=0; +if ($user->societe_id > 0) $socid = $user->societe_id; +$feature2 = (($socid && $user->rights->user->self->creer)?'':'user'); +if ($user->id == $id) $feature2=''; // A user can always read its own card +$result = restrictedArea($user, 'user', $id, 'user&user', $feature2); + +$object = new User($db); +if ($id > 0 || ! empty($ref)) +{ + $result = $object->fetch($id, $ref); +} + +/* + * Actions + */ + +if ($action == 'update' && ! $_POST["cancel"]) +{ + // Modification + $account = new UserBankAccount($db); + + $account->fetch($id); + + $account->userid = $object->id; + + $account->bank = $_POST["bank"]; + $account->label = $_POST["label"]; + $account->courant = $_POST["courant"]; + $account->clos = $_POST["clos"]; + $account->code_banque = $_POST["code_banque"]; + $account->code_guichet = $_POST["code_guichet"]; + $account->number = $_POST["number"]; + $account->cle_rib = $_POST["cle_rib"]; + $account->bic = $_POST["bic"]; + $account->iban = $_POST["iban"]; + $account->domiciliation = $_POST["domiciliation"]; + $account->proprio = $_POST["proprio"]; + $account->owner_address = $_POST["owner_address"]; + + $result = $account->update($user); + if (! $result) + { + setEventMessage($account->error, 'errors'); + $_GET["action"]='edit'; // Force chargement page edition + } + else + { + $url=DOL_URL_ROOT.'/user/bank.php?id='.$object->id; + header('Location: '.$url); + exit; + } +} + +/* + * View + */ + +$form = new Form($db); + +llxHeader(); + +$head = user_prepare_head($object); + +$account = new UserBankAccount($db); +if (! $id) + $account->fetch(0,$object->id); +else + $account->fetch($id); +if (empty($account->userid)) $account->userid=$object->id; + + +if ($id && $action == 'edit' && $user->rights->user->user->creer) +{ + print '
'; + print ''; + print ''; + print ''; +} +if ($id && $action == 'create' && $user->rights->user->user->creer) +{ + print ''; + print ''; + print ''; +} + + +// View +if ($id && $action != 'edit') +{ + $title = $langs->trans("User"); + dol_fiche_head($head, 'bank', $title, 0, 'user'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); + + print '
'; + + print '
'; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + // Show fields of bank account + $fieldlists='BankCode DeskCode AccountNumber BankAccountNumberKey'; + if (! empty($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') $fieldlists='BankCode DeskCode BankAccountNumberKey AccountNumber'; + } + else $fieldlists=$conf->global->BANK_SHOW_ORDER_OPTION; + } + $fieldlistsarray=explode(' ',$fieldlists); + + foreach($fieldlistsarray as $val) + { + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + if ($val == 'DeskCode') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 2) + { + print ''; + print ''; + print ''; + } + } + + if ($val == 'AccountNumber') + { + print ''; + print ''; + print ''; + } + + if ($val == 'BankAccountNumberKey') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + } + + print ''; + print ''; + + print ''; + print ''; + + print '\n"; + + print '\n"; + + print '\n"; + + print '
'.$langs->trans("LabelRIB").''.$account->label.'
'.$langs->trans("BankName").''.$account->bank.'
'.$langs->trans("BankCode").''.$account->code_banque.'
'.$langs->trans("DeskCode").''.$account->code_guichet.'
'.$langs->trans("BankCode").''.$account->code_banque.'
'.$langs->trans("BankAccountNumber").''.$account->number.'
'.$langs->trans("BankAccountNumberKey").''.$account->cle_rib.'
'.$langs->trans("IBAN").''.$account->iban . ' '; + if (! empty($account->iban)) { + if (! checkIbanForAccount($account)) { + print img_picto($langs->trans("IbanNotValid"),'warning'); + } else { + print img_picto($langs->trans("IbanValid"),'info'); + } + } + print '
'.$langs->trans("BIC").''.$account->bic.' '; + if (! empty($account->bic)) { + if (! checkSwiftForAccount($account)) { + print img_picto($langs->trans("SwiftNotValid"),'warning'); + } else { + print img_picto($langs->trans("SwiftValid"),'info'); + } + } + print '
'.$langs->trans("BankAccountDomiciliation").''; + print $account->domiciliation; + print "
'.$langs->trans("BankAccountOwner").''; + print $account->proprio; + print "
'.$langs->trans("BankAccountOwnerAddress").''; + print $account->owner_address; + print "
'; + + // Check BBAN + if ($account->label && ! checkBanForAccount($account)) + { + print '
'.$langs->trans("RIBControlError").'
'; + } + + print "
"; + + dol_fiche_end(); + + /* + * Barre d'actions + */ + print '
'; + + if ($user->rights->user->user->creer) + { + print ''.$langs->trans("Edit").''; + } + + print '
'; +} + +// Edit +if ($id && $action == 'edit' && $user->rights->user->user->creer) +{ + $title = $langs->trans("User"); + dol_fiche_head($head, 'bank', $title, 0, 'user'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); + + print '
'; + + print '
'; + print ''; + + print ''; + print ''; + + print ''; + print ''; + + // Show fields of bank account + $fieldlists='BankCode DeskCode AccountNumber BankAccountNumberKey'; + if (! empty($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') $fieldlists='BankCode DeskCode BankAccountNumberKey AccountNumber'; + } + else $fieldlists=$conf->global->BANK_SHOW_ORDER_OPTION; + } + $fieldlistsarray=explode(' ',$fieldlists); + + foreach($fieldlistsarray as $val) + { + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + + if ($val == 'DeskCode') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 2) + { + print ''; + print ''; + print ''; + } + } + + if ($val == 'AccountNumber') + { + print ''; + print ''; + print ''; + } + + if ($val == 'BankAccountNumberKey') + { + if ($account->useDetailedBBAN() == 1) + { + print ''; + print ''; + print ''; + } + } + } + + // IBAN + print ''; + print ''; + + print ''; + print ''; + + print '"; + + print ''; + print ''; + print "\n"; + + print '"; + + print '
'.$langs->trans("LabelRIB").'
'.$langs->trans("BankName").'
'.$langs->trans("BankCode").'
'.$langs->trans("DeskCode").'
'.$langs->trans("BankCode").'
'.$langs->trans("BankAccountNumber").'
'.$langs->trans("BankAccountNumberKey").'
'.$langs->trans("IBAN").'
'.$langs->trans("BIC").'
'.$langs->trans("BankAccountDomiciliation").''; + print '
'.$langs->trans("BankAccountOwner").'
'.$langs->trans("BankAccountOwnerAddress").''; + print "
'; + + print '
'; + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php new file mode 100644 index 00000000000..c89d7162c2a --- /dev/null +++ b/htdocs/user/class/userbankaccount.class.php @@ -0,0 +1,257 @@ + + * Copyright (C) 2010-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Peter Fontaine + * Copyright (C) 2015 Alexandre Spangaro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/user/class/userbankaccount.class.php + * \ingroup user + * \brief File of class to manage bank accounts description of users + */ + +require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; + + +/** + * Class to manage bank accounts description of third parties + */ +class UserBankAccount extends Account +{ + var $socid; + + var $datec; + var $datem; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + + $this->socid = 0; + $this->clos = 0; + $this->solde = 0; + $this->error_number = 0; + return 1; + } + + + /** + * Create bank information record + * + * @param Object $user User + * @return int <0 if KO, >= 0 if OK + */ + function create($user='') + { + $now=dol_now(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_rib (fk_user, datec)"; + $sql.= " VALUES (".$this->userid.", '".$this->db->idate($now)."')"; + $resql=$this->db->query($sql); + if ($resql) + { + if ($this->db->affected_rows($resql)) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."user_rib"); + return 1; + } + } + else + { + print $this->db->error(); + return 0; + } + } + + /** + * Update bank account + * + * @param User $user Object user + * @return int <=0 if KO, >0 if OK + */ + function update($user='') + { + global $conf; + + if (! $this->id) + { + $this->create(); + } + + $sql = "UPDATE ".MAIN_DB_PREFIX."user_rib SET"; + $sql.= " bank = '" .$this->db->escape($this->bank)."'"; + $sql.= ",code_banque='".$this->code_banque."'"; + $sql.= ",code_guichet='".$this->code_guichet."'"; + $sql.= ",number='".$this->number."'"; + $sql.= ",cle_rib='".$this->cle_rib."'"; + $sql.= ",bic='".$this->bic."'"; + $sql.= ",iban_prefix = '".$this->iban."'"; + $sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; + $sql.= ",proprio = '".$this->db->escape($this->proprio)."'"; + $sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'"; + + if (trim($this->label) != '') + $sql.= ",label = '".$this->db->escape($this->label)."'"; + else + $sql.= ",label = NULL"; + $sql.= " WHERE rowid = ".$this->id; + + $result = $this->db->query($sql); + if ($result) + { + return 1; + } + else + { + dol_print_error($this->db); + return 0; + } + } + + /** + * Load record from database + * + * @param int $id Id of record + * @param int $socid Id of company. If this is filled, function will return the default RIB of company + * @return int <0 if KO, >0 if OK + */ + function fetch($id, $socid=0) + { + if (empty($id) && empty($socid)) return -1; + + $sql = "SELECT rowid, fk_user, entity, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio,"; + $sql.= " owner_address, default_rib, label, datec, tms as datem"; + $sql.= " FROM ".MAIN_DB_PREFIX."user_rib"; + if ($id) $sql.= " WHERE rowid = ".$id; + if ($socid) $sql.= " WHERE fk_user = ".$userid; + + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); + + $this->id = $obj->rowid; + $this->socid = $obj->fk_soc; + $this->bank = $obj->bank; + $this->code_banque = $obj->code_banque; + $this->code_guichet = $obj->code_guichet; + $this->number = $obj->number; + $this->cle_rib = $obj->cle_rib; + $this->bic = $obj->bic; + $this->iban = $obj->iban; + $this->domiciliation = $obj->domiciliation; + $this->proprio = $obj->proprio; + $this->owner_address = $obj->owner_address; + $this->label = $obj->label; + $this->datec = $this->db->jdate($obj->datec); + $this->datem = $this->db->jdate($obj->datem); + } + $this->db->free($resql); + + return 1; + } + else + { + dol_print_error($this->db); + return -1; + } + } + + /** + * Return RIB + * + * @param boolean $displayriblabel Prepend or Hide Label + * @return string RIB + */ + function getRibLabel($displayriblabel = true) + { + global $langs,$conf; + + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) + { + if ($this->label && $displayriblabel) $rib = $this->label." : "; + + // Show fields of bank account + $fieldlists='BankCode DeskCode AccountNumber BankAccountNumberKey'; + if (! empty($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION)) + { + if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') $fieldlists='BankCode DeskCode BankAccountNumberKey AccountNumber'; + } + else $fieldlists=$conf->global->BANK_SHOW_ORDER_OPTION; + } + $fieldlistsarray=explode(' ',$fieldlists); + + foreach($fieldlistsarray as $val) + { + if ($val == 'BankCode') + { + if ($this->useDetailedBBAN() == 1) + { + $rib.=$this->code_banque.' '; + } + } + + if ($val == 'DeskCode') + { + if ($this->useDetailedBBAN() == 1) + { + $rib.=$this->code_guichet.' '; + } + } + + if ($val == 'BankCode') + { + if ($this->useDetailedBBAN() == 2) + { + $rib.=$this->code_banque.' '; + } + } + + if ($val == 'AccountNumber') + { + $rib.=$this->number.' '; + } + + if ($val == 'BankAccountNumberKey') + { + if ($this->useDetailedBBAN() == 1) + { + $rib.=$this->cle_rib.' '; + } + } + } + } + else + { + $rib=''; + } + + return $rib; + } +} +