diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 068cd4103266a84c1cd3e49835181e0797ffd1fe..8b68fa921accd88544b269e0252dca789a94801e 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<br>"; - 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 b653cfbf5c002dd1e6dc9aca370e1231587f25b7..5083ec3b495674aa4071916bf9ac424aa20f402f 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * * 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 e83eff0ce4dbc4c2d91402eb2def5931c6cb97ff..767a7dd0e7a3e166dce57ae67e799ec872181a66 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 0000000000000000000000000000000000000000..05738ce45826e5de8dcd2f63af3276bc533716a8 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -0,0 +1,37 @@ +-- ============================================================================= +-- Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> +-- +-- 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 <http://www.gnu.org/licenses/>. +-- +-- ============================================================================= + +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 4346d00715807cd04805421f56ff9227caa97742..3450180e1532aee2305656f6a91c437523e7c989 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 bbe6c27f041005fec8f47099cdfc7ebb1053af89..98a013a40148fb41b2ab42dcdd6d609ee7d4016f 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 ec4338e8bca2ad6905cee379100a8b0becfa5c9d..f2b546002f285e85f71d736d5e31b80a5d1c2b2a 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 bebb74d98611e818118d81d55d5dfc5eb62f15cb..f2b546002f285e85f71d736d5e31b80a5d1c2b2a 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 8ad73597be74e4690e6a5b354ceb560c5542ab0b..2482989b0cc5112cf6608b337b1480f45f866081 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 f8c84994d473348e27391c7095c451fdfac9e0fb..9bab123aca7f214c66ac06f8a1635eed9d8ee9e9 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 4e916fe1fb095017458fcdd1093c1efb8cc8afca..7012f52be5ae6acc556b223c8a822b5883ce62ac 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 ae205e9d77050e9de7990790a6328bb58b008ad7..84a1e05229a10ad64bf63c1fd77dbae9aef24c84 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 bc4bdb360faaf5046d321966748582f0d44e9551..0725e5fc1558c11c816567ff93a962450a1376f1 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 f8c84994d473348e27391c7095c451fdfac9e0fb..1fd90502328debaba9b7e16e00a2b47a9848e03b 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 f41dd8a3bc02959bdf97c4334d9df8eb5b3209d7..0d9cf16f4a2139bea02e90c58b9108e8456db13c 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 73c66e9b2b33cb54953d608d06896218ebe6dc44..7b72fee88a86fb273f9f2a9e0a54126784e2357e 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 8680cce82bff07a3c3aa496e6280d871bcc50e27..93165497458917b4b2fdb26a301e2195f801f9a9 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 ee34a22c78e0cd31d74739b7cb8a1bda9aa6e608..43d05a50940d1b364d1dc00f731a952503ab19a4 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 1db8369b3d571114205b1df33c74356590be04e2..b0292d92aaec99817b1a0dff1c1c354cd715f10c 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 04a24af2e22a3ef25a986218506e1cbf0147db71..fb51c4b100c90c3e1bcb801cd16e0226cd598516 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 8053007e9ddc69c0e5adb53ad1cc5fe511ab7a43..e054bf182766231d586066a18ae451228e5025e2 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 d6ecce335cba5efbb3ddf5d2f6f1e329619f8c68..e054bf182766231d586066a18ae451228e5025e2 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 435fbc77985db9e7d9c970dbdcc40d469c3551a7..1d194e23ec2bf3e3c45233091d06f25c21006610 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 c0eaee6542fc0d716f1fd9ecaf7e30a7c96ecd36..482dc3c31dd0f83d885c384b8d5a19d35ffdb6e3 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 0fa4283476b0da9b026b8b26a2226ae30a9abd2f..148928d397d562a0d193a81e4c28c830410d6e9a 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 12e6cd655d6630345cd24c74b5e85bec38524c1a..bb6095bd00a792c96a465b2f14ddacb5bd269a72 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 741dabd5e193196549a2a1296760643eb9b11c00..12a575454126e6c2a8af2bde64a37fa266b8381f 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 3d99cf1eaef689386c6bcae4b7e3f237d53bf43b..317c034b9b4780f4e94966b8acf30c7ea75852ea 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 12cd9da537a67a983fef14a8c96d81320199b839..0000000000000000000000000000000000000000 --- 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 0798d15f938689a6b894e2da42fd7cbe5d73aea4..35d8b1b3169f715eea352ee2bc07a4e0888b0f02 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 bdebed8fa264b115bcbfa4df01a32e5f84793462..0000000000000000000000000000000000000000 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 fbaee7cc6bd21fb4f562365a376918f52633026f..b83e7cd310aa66c2d1fff8988bbb7dabea41b332 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 d395710a8777d9c9612301f716557ccffc9188f6..0000000000000000000000000000000000000000 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 6efce90a78859b6f4649304a8481fd193e6cb609..18559b692d133323891fb18891dadb79bc027169 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 df9b443ceecb364cede57efc36815cf7112e3653..ba06d79a766a3bd14329bab3baa73ae130736da7 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 5fc4f661821e26f0bfe1d79c6168b36c47e1ecc3..0000000000000000000000000000000000000000 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 828bf8f2e709d32ecb911377c85b8538f558671d..7b9227c0674c839b3383586590a7bfe6e6b13fdc 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 bed6b8dcbfbb062a2ff1d6affd40c1b072b2c2dd..0000000000000000000000000000000000000000 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 542ff5766e1d7df538e04a1c2dffde2c7de8f635..1bb8e0dafd64e92bd077b868cffc51307c37eea8 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 269258a8cfb5302da89828e648105fb0dd32c0b4..0000000000000000000000000000000000000000 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 01e30553fc569e01123faefa7ef3c019cbb36b5d..8abd6437ea69f4fd9c43960b6a14d677e94764bd 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 8e227ddc83f7c92994716cbe7c75cfdb4814feea..0000000000000000000000000000000000000000 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 d9d96f0255b04e220db0fb0549d01c42bb2df960..a70a9d29b775c0cd504a87277e11d5de4ba276d3 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 e3ea742e7c7edd0d0e970ae45c28e464d90fce7e..0000000000000000000000000000000000000000 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 39f808bed32f27c7d591d2e68e170ee96468356b..b51ce3ed95a437af48d672cb4b8494807587c080 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 adfa8c1599b9c2b74e15d0b86e5cba6dfbe8587a..0000000000000000000000000000000000000000 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 f4dfc5f360a87341fd9e6a59f10bc733c68028ee..b51ce3ed95a437af48d672cb4b8494807587c080 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 c8e58fc222091713ae13ff57f13fef53b96a4511..0000000000000000000000000000000000000000 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 00769352daef5a513aa7b39eed513a461d15cb9a..b51ce3ed95a437af48d672cb4b8494807587c080 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 0672d20bce4bb1776f71dc8038e32a8382f5ae87..0000000000000000000000000000000000000000 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 5f9240240da3f037ca1918367f6b6489b972c260..b51ce3ed95a437af48d672cb4b8494807587c080 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 6a4d7b1acce5db322cde66f1e2fad71876449e3f..0000000000000000000000000000000000000000 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 8c2380eda131f90b77a1f3792b2afbbcabb5b7b4..0bc7dfd48026b9d341ad11217046b949625fd402 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 fd1e54f4754189e57bbdb7ff41d7c8e7f2618ff4..0000000000000000000000000000000000000000 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 493974477f38e5669668280796e2427499c336f7..014c9918c2e1fee9d00082877de83d6a6dd4ca06 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 2c174340c7696473d43c94ba34399b19fbd6fbac..1614347a829d55ba7c165290563c4979eff8693a 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 ff0d692307f28e4b34e49314a5c525e8726feffe..0000000000000000000000000000000000000000 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 b7ff50e3d9990ba330c6e079d8fa2938b90507eb..7b65a3d522e233755609ef0e370b2fdeb25704b6 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 f9de32d30029fe43864afaeb341ca2204ee30d83..0000000000000000000000000000000000000000 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 fb72919971c555e17a11bb4ee4d0bdd22e2a9cc5..9bba632552c230fcd9dab589aaafcb8e3948f985 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 8c77498c304af9150165b348fc08498d7aa3f11c..0000000000000000000000000000000000000000 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 503e5c67519060721c3ab0f5bc146292530e9f7b..fb04031d47a2df76d49938e674ea79ee0082d470 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 9a501e762d0d460c396ba28c1631f9ae38b12165..0000000000000000000000000000000000000000 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 6bb68041d19064950fbee0a2c11116f7b4a12578..8826337cd3196ca3f91316ffefbb9c4a725fa455 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 4abe721969427e9f5f4e22dc7ac814f9cbc151dc..0000000000000000000000000000000000000000 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 a5ecf2ceb78bdb30ca662aa15f9afb81983003d7..a82363318156927050ee0ce88cf0632a042a85cc 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 0a5d9a7951fffbc4b473c79c447a2a8ecd00fb37..0000000000000000000000000000000000000000 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 ae4d177c6cdb769943524b09e643971c1382a7e9..54f4aa382fe65b963ada43e8b5468879ab4c7dea 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 d6c28b6d7ee28267dd5792dd34045956a5d8e92b..0000000000000000000000000000000000000000 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 fab7db59040300ef6fbcbd91ced1831ac17c4df1..8d8da880f0ed080f7cb941c3c0418750a8a19ab2 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 bda5823f8c36729b82f6d310cb6c7e1991821c95..0000000000000000000000000000000000000000 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 de7f2b7b22164a355844cc2f6c6b738d1e88e4ba..244478041a433f518bece1ee9f40788e953a73f5 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 80f9a7f553a765bde7599d380459f301d726ef77..0000000000000000000000000000000000000000 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 953731ca93435dad89d71d2f7574a86cb1be85b9..3e386e112d8a9da3935f13655069b64226523287 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 46be8b6fe0f6c733bc1130255b140d9d0da85c9f..31628692b72e75bb6ac02d4c7fc671bc09bd0399 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 b5600221f02fc922e0c2bda2149f123a6d707d35..2e6898246c2ab9ad5dcf2e0f35f59d4f5d8bc03f 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 0b02fada4147e31e71f53a800b91839be9b66f07..3a777f181d85869ea98b895c6ae7c61a7923efd9 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 25edfa85b45b03ac727df4e3f8f93a037a5c6801..f29c713022cf3ca48e607fc9382921acb2081111 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 201577281f048ad530a5ffc90ae5ddcde1ea09cb..b35923a7e4ff612a9062fd6d52d18d8ceeea497e 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 b4022e77740bb96770f8fee065c58284e3518c45..19d4be8371db14278febf70be41acb3963dd7d0f 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 93564621d7a5f5be223adff859f9a0d37980e5d5..19d4be8371db14278febf70be41acb3963dd7d0f 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 2080958f0fb04a7ddb9fe953bd9294e3666d43b8..19d4be8371db14278febf70be41acb3963dd7d0f 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 7a9692a08045fcaa51db342804aa593ef1bff0bc..19d4be8371db14278febf70be41acb3963dd7d0f 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 39109ef5ee61c102adfab2c4c7378fd83f76c040..bde60c8877c7ac3d47ebc9c0609ba0f7be711c92 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 c9d1539dddcdce4f285117d26cab14ee97ddb90b..efe44594ae8c783c434517c0a8cb89e81c098edd 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 8cda1f3f2202f020c2aa7f0438b72e06f559c83e..98a013a40148fb41b2ab42dcdd6d609ee7d4016f 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 5678cdd2411bf87a5a55920770749aaab067ca5b..75b1de981da4344286785aa815b5b0eef23459e1 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 ba16a4ab6c0dfe3a033f2739a587e8c4b567d181..98a013a40148fb41b2ab42dcdd6d609ee7d4016f 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 4ea2c09ccc96b569c2ed0e2aac8f2fb0b987cdc2..50c65619ee337320b5fdb57105719d3f3bed0c59 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 8168f76fa26b3e8f5002b4e21966d23e5f026cdc..b0292d92aaec99817b1a0dff1c1c354cd715f10c 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 aaea38dbef2c74ef5ec519976be9b70ecf4e94d2..fb51c4b100c90c3e1bcb801cd16e0226cd598516 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 36cdcc8d4a2d0220e02cdddb5d62dea514d60a54..5f6fbc4ded6b2159c064190495590927c090cf1d 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 2a582b8bd4c899f370f0e74a234005c1f00d6ac1..efe44594ae8c783c434517c0a8cb89e81c098edd 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 d4272f367c6e5eae37c9ddc745fd8a9be7d05bb7..16030c443338558c86faa43bc79a985192a1857f 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 f571504b24677f54c02299d6eb3435fcf1118788..cc204fdcaf1f376df619bf444699ec4123df7d9b 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 a75f954555ed53222249ca6921a7df634949d1ef..6e14b35ffbbb4acc323abdfcb9ea0d37421ddb97 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 6186d18da70caa5acaa255752415d8136edcdc98..8a3a5091614a7b394b736de789d24c29d5228623 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 6f364389133c425747e0eaf8eb2920013a815572..fb51c4b100c90c3e1bcb801cd16e0226cd598516 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 d5cd141733d3b07e6d6348aaf0afecac51346718..977c4cbd8f91a5c010de1e00ed9938b64a740ced 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 bc3966d2fa2e83c5810278c33a37ea5fc6718d90..668d1bc68a13e0118d53a2331c13be10cd7a7933 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 ccfd2d2f5b2cc8a689ef175cbece501f8084084b..7b72fee88a86fb273f9f2a9e0a54126784e2357e 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 aae8bf6eba03015d44032e7fafb2450c05a19dda..4c4a2e48c29043e83face284e3c33a7469578774 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 be0255f7ec2679667491349672d653bfaea6ab89..cc204fdcaf1f376df619bf444699ec4123df7d9b 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 fdc1dd8e22ba4d7780de2fa6aaf8be3d130e2d28..7f11fe166b8aba21f0c5a7a6c191a5d58a119497 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 7bb7ef583b465f156837d8900d29c41e636c0533..148928d397d562a0d193a81e4c28c830410d6e9a 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 b4022e77740bb96770f8fee065c58284e3518c45..19d4be8371db14278febf70be41acb3963dd7d0f 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 b112af5cf0afc02fc7c8f00999205ed0a8d8b603..faa4774a5cb33366af150a4331b3a0c05c8ac5b4 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 1ceb098d9cc3e9a75d8125cab0a63e79aed51d7c..f5df34a3bc9f8393c23f35e25fb7b18b4b51654b 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 cd0eb4109f7768afd725ee12fc5213b3d4c31adb..b8ad5b5cc2460224ca85ccaed177b9ffc9f9ae03 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 b5de3223bd4944e9ba35075c3c6a0052731a12d2..d1f88f3c794510b47ac4b97f7d6568c3b6e24b04 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 20a1ddb6131aaa940f8ca6e16b1ab2051d95535e..19d4be8371db14278febf70be41acb3963dd7d0f 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 5691147d8ffc7e161001fe58d28bd306815f779a..96eaf71df1e2ec5c3450fc491c5cc8eb355a6759 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 23a4e0b1dbbc3749b03c45864b52f7d12f907520..0bfd66d818ed353dae9362de2760565767aa02af 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 8722632547c5b7179d68c6e3e670131c72c80bd3..6e8bcbf98a57f1c6e80aa31b21e15677e3796778 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 79910e5e214f7cda81bc1e7a1e9e2d45a05eb813..695352538d934ef7366d58a08183d55c558aec5a 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 fd84ab427dbd736dfd5be112faf87c9d7d2896d8..76139922af1f9fb5ac1f63c43fc79e2d3bfe8cfe 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 1444573cf05c248eaad1c94fa6ad2cedcd7a78d8..76139922af1f9fb5ac1f63c43fc79e2d3bfe8cfe 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 4a01b50435a54567ce0d53cad192e728aba5505a..c54e95f03ba60dd0dc30f7227c8cb70c0e7c43cd 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 2dc60e66b3ec3d81f7a71167d00921dbb1bca75b..19d4be8371db14278febf70be41acb3963dd7d0f 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 ccfd2d2f5b2cc8a689ef175cbece501f8084084b..b59cbf36f3eeab619f6c875e1ee1a4eba26c3eca 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 8cda1f3f2202f020c2aa7f0438b72e06f559c83e..b35923a7e4ff612a9062fd6d52d18d8ceeea497e 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 c798ced0b5c113d90d6987b597b477a0face49fa..7a4a0a44f38d545f0a9a5b1379f7f95a244ce450 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 65e9041589f39e0c76746ea08669baa778442a61..4f8ad8e43e2e6ffaaf1a0751713aa1e1128b046c 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 2f439db7b500111372c4f8cba7e71e06e460b823..f6bcc6478aecbbafaeb3cac77dd47f4845c8d042 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 2dc60e66b3ec3d81f7a71167d00921dbb1bca75b..19d4be8371db14278febf70be41acb3963dd7d0f 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 14dc14a9602dbabc7b0702b0db699610bbd68313..c54e95f03ba60dd0dc30f7227c8cb70c0e7c43cd 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 8cda1f3f2202f020c2aa7f0438b72e06f559c83e..a9852339cc0d4ede24c3f5a473dd9a1ae07efd18 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 6186d18da70caa5acaa255752415d8136edcdc98..4ae5d40a34072b9d1e5ee77ab16c99723101482c 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 95cc4412111f7ec23f1295471416152743455e88..3d75bc937e59131d6e83eca6237fb53b63280d09 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 efd446a1a4c05b50932240855227fec33c4564c2..599e87b3ab83c621f919b124054165edfe13692a 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 f4217646b2645e16a1c83ccedb6755a8932a1e38..9bab123aca7f214c66ac06f8a1635eed9d8ee9e9 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 728bb3935366414766d184afb9cbc545e4ccebe1..7d0344d4dbb4584f45eb469d43a3506fa9057bcc 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 4922ea1ec12a8606851317be0927fa7c83132889..96021dc5081e1daa4d37cd649d720e676c27ecec 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 f807a78d281f1b8b9db94abb430a94456a5bf7a3..e0f87b5860376ef84bdb2ef80464a67f132fcfd0 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 a81e2fa0df60af0e3719f655335833d9d8172810..6e8bcbf98a57f1c6e80aa31b21e15677e3796778 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 8c116b0dc4218939fcb62ee4087b2f2a353f6d03..9bd70dccb731658e40d16ba29f4c09174d35c5ec 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 a49fc171c06d79261f00cc16118595d22077b29b..e6fb611f3bce650dd1c8b36e190277d573c63c87 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 9994475cdfe0fb8c646eb1877a84443066a73d93..a4fac077e7aa050f4a84419d6d3df6af9af4d16d 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 a4029f119def5d9ca4c5f7f1bc6a452176bf5b06..a4fac077e7aa050f4a84419d6d3df6af9af4d16d 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 2c479d9453b4a6e65bc3909c793c221241071707..79f3cd6420303e214de569e153aa49ce1816676c 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 12437f848238b68f5e1b716b5f56a7a5fe076df1..5715b64beed38049a6f48d0aed63fc5016d46290 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 f997e53799b568372453abbdc854c78d5c628a40..4ae5d40a34072b9d1e5ee77ab16c99723101482c 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 bb66213f41332ebfae7172ce9e949bd2a4c60dda..f3c34618c6b568c56ce9815285bd517bf5398445 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 4b6b458467588e6c444e1d4e23a00622db915374..d6496ab6f892098f74795a9a7f6628f8ce88bcdf 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 28a4376fb438b41bee3481e229439c14b55f8e1a..ad7e703ccac95afb2a7078f244ab47c1a47c26ac 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 d4e32d98f57ff37c78bdf1e6b4235e7fb4cefc17..0f72bfaccd50450154b10e9563966bf74a8d68ab 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 9b035d99511c7edb7d17f84e171817e6edee3b3a..8e05ce551c7cc277ca1271eae12e91b77401f61e 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 6e7c2a412c60a614c7ebd91e0e06df4ebfb46191..f83b7635712300abcf059f591e413105286f0bbc 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 034a8d0c5e4a4264c8d3dc0b9185eff071087d54..7ff265a49172eff0f2b0ede94ab364bbabe33cf2 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 46394177698fb286ee15fd47544bf6d0de642807..2474d61bb76d75bdb846f71f844aa0aa6e2f0e01 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 b2539dba849a6f4a1ff231d2004df2b39607f582..4d0f7ba2a04f5abf1438fd1501324ec0dab07539 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 ae2243275490d5769ba220fd3ee00bd9c3175a3d..ffb07138f9669b5e595a3ec4a405f62a4e3de894 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 e9273e727f59a5eefc3516fac772d8326f64804a..b832916f5e97b28900f42852d245eead209cdb4e 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 de788526bc1e458293e2c957066e54695c1d44f3..33114ffd1c928c7807bf462507874b45f3f29aa3 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 d3c5b125bbef73d5cdc855a8a6ef7ec9a450235a..142d71505c8c1a4855394adf3a392990224b3ecf 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 05d8ea630b88abf9e2bc09ed311fb223e818231c..da63e58c0687e7247d19dabd297eacf70157b943 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 d7548d28709860acebe173ed2ca4954678f950f6..acf1ddf85b3388b4fb02a683664d7599d96ebfe3 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 afefaa94d47dbe2e173bbcb9d464e02dd2bfc771..44d193e427e2da00e32b61d361bf5a4c05cfdd67 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 315abdf179d730998a31ef3be62955f892771663..343b28cbbe9d37e56568f759548cc75bb224c6f2 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 76c1e9f1e6a37537d3f3ad016ea6411213012116..f22aab3688bab8ba60673dc6b484a85d380db1ae 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 f1b93b8cc8267b6299f2b299726e05ca560ac881..dc168ba9439b1f04c813c2794c8778dc78b8dcc9 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 56df547b9b19033a1d8ae9eaa284d5b999d73052..a7a191f45bb98b2ae16dbf1628a611a84954c9a5 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 0000000000000000000000000000000000000000..0325fcd0a508f0c37e9dc0af5f4a0c8c01c92de2 --- /dev/null +++ b/htdocs/user/bank.php @@ -0,0 +1,390 @@ +<?php +/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> + * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> + * Copyright (C) 2015 Marcos GarcĂa <marcosgdf@gmail.com> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * + * 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 <http://www.gnu.org/licenses/>. + */ + +/** + * \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 '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">'; + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + print '<input type="hidden" name="action" value="update">'; + print '<input type="hidden" name="id" value="'.$_GET["id"].'">'; +} +if ($id && $action == 'create' && $user->rights->user->user->creer) +{ + print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">'; + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + print '<input type="hidden" name="action" value="add">'; +} + + +// View +if ($id && $action != 'edit') +{ + $title = $langs->trans("User"); + dol_fiche_head($head, 'bank', $title, 0, 'user'); + + $linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); + + print '<div class="fichecenter">'; + + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent">'; + + print '<tr><td class="titlefield">'.$langs->trans("LabelRIB").'</td>'; + print '<td colspan="4">'.$account->label.'</td></tr>'; + + print '<tr><td>'.$langs->trans("BankName").'</td>'; + print '<td colspan="4">'.$account->bank.'</td></tr>'; + + // 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 '<tr><td>'.$langs->trans("BankCode").'</td>'; + print '<td colspan="3">'.$account->code_banque.'</td>'; + print '</tr>'; + } + } + if ($val == 'DeskCode') + { + if ($account->useDetailedBBAN() == 1) + { + print '<tr><td>'.$langs->trans("DeskCode").'</td>'; + print '<td colspan="3">'.$account->code_guichet.'</td>'; + print '</tr>'; + } + } + + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 2) + { + print '<tr><td>'.$langs->trans("BankCode").'</td>'; + print '<td colspan="3">'.$account->code_banque.'</td>'; + print '</tr>'; + } + } + + if ($val == 'AccountNumber') + { + print '<tr><td>'.$langs->trans("BankAccountNumber").'</td>'; + print '<td colspan="3">'.$account->number.'</td>'; + print '</tr>'; + } + + if ($val == 'BankAccountNumberKey') + { + if ($account->useDetailedBBAN() == 1) + { + print '<tr><td>'.$langs->trans("BankAccountNumberKey").'</td>'; + print '<td colspan="3">'.$account->cle_rib.'</td>'; + print '</tr>'; + } + } + } + + print '<tr><td valign="top">'.$langs->trans("IBAN").'</td>'; + print '<td colspan="4">'.$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 '</td></tr>'; + + print '<tr><td valign="top">'.$langs->trans("BIC").'</td>'; + print '<td colspan="4">'.$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 '</td></tr>'; + + print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">'; + print $account->domiciliation; + print "</td></tr>\n"; + + print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td><td colspan="4">'; + print $account->proprio; + print "</td></tr>\n"; + + print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">'; + print $account->owner_address; + print "</td></tr>\n"; + + print '</table>'; + + // Check BBAN + if ($account->label && ! checkBanForAccount($account)) + { + print '<div class="warning">'.$langs->trans("RIBControlError").'</div>'; + } + + print "</div>"; + + dol_fiche_end(); + + /* + * Barre d'actions + */ + print '<div class="tabsAction">'; + + if ($user->rights->user->user->creer) + { + print '<a class="butAction" href="bank.php?id='.$object->id.'&action=edit">'.$langs->trans("Edit").'</a>'; + } + + print '</div>'; +} + +// Edit +if ($id && $action == 'edit' && $user->rights->user->user->creer) +{ + $title = $langs->trans("User"); + dol_fiche_head($head, 'bank', $title, 0, 'user'); + + $linkback = '<a href="'.DOL_URL_ROOT.'/user/index.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); + + print '<div class="fichecenter">'; + + print '<div class="underbanner clearboth"></div>'; + print '<table class="border centpercent">'; + + print '<tr><td valign="top" width="35%" class="fieldrequired">'.$langs->trans("LabelRIB").'</td>'; + print '<td colspan="4"><input size="30" type="text" name="label" value="'.$account->label.'"></td></tr>'; + + print '<tr><td class="fieldrequired">'.$langs->trans("BankName").'</td>'; + print '<td><input size="30" type="text" name="bank" value="'.$account->bank.'"></td></tr>'; + + // 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 '<tr><td>'.$langs->trans("BankCode").'</td>'; + print '<td><input size="8" type="text" class="flat" name="code_banque" value="'.$account->code_banque.'"></td>'; + print '</tr>'; + } + } + + if ($val == 'DeskCode') + { + if ($account->useDetailedBBAN() == 1) + { + print '<tr><td>'.$langs->trans("DeskCode").'</td>'; + print '<td><input size="8" type="text" class="flat" name="code_guichet" value="'.$account->code_guichet.'"></td>'; + print '</tr>'; + } + } + + if ($val == 'BankCode') + { + if ($account->useDetailedBBAN() == 2) + { + print '<tr><td>'.$langs->trans("BankCode").'</td>'; + print '<td><input size="8" type="text" class="flat" name="code_banque" value="'.$account->code_banque.'"></td>'; + print '</tr>'; + } + } + + if ($val == 'AccountNumber') + { + print '<td class="fieldrequired">'.$langs->trans("BankAccountNumber").'</td>'; + print '<td><input size="18" type="text" class="flat" name="number" value="'.$account->number.'"></td>'; + print '</tr>'; + } + + if ($val == 'BankAccountNumberKey') + { + if ($account->useDetailedBBAN() == 1) + { + print '<td>'.$langs->trans("BankAccountNumberKey").'</td>'; + print '<td><input size="3" type="text" class="flat" name="cle_rib" value="'.$account->cle_rib.'"></td>'; + print '</tr>'; + } + } + } + + // IBAN + print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("IBAN").'</td>'; + print '<td colspan="4"><input size="30" type="text" name="iban" value="'.$account->iban.'"></td></tr>'; + + print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("BIC").'</td>'; + print '<td colspan="4"><input size="12" type="text" name="bic" value="'.$account->bic.'"></td></tr>'; + + print '<tr><td valign="top">'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">'; + print '<textarea name="domiciliation" rows="4" cols="40">'; + print $account->domiciliation; + print "</textarea></td></tr>"; + + print '<tr><td valign="top">'.$langs->trans("BankAccountOwner").'</td>'; + print '<td colspan="4"><input size="30" type="text" name="proprio" value="'.$account->proprio.'"></td></tr>'; + print "</td></tr>\n"; + + print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">'; + print "<textarea name=\"owner_address\" rows=\"4\" cols=\"40\">"; + print $account->owner_address; + print "</textarea></td></tr>"; + + print '</table>'; + + print '</div>'; + + dol_fiche_end(); + + print '<div align="center">'; + print '<input class="button" value="'.$langs->trans("Modify").'" type="submit">'; + print ' '; + print '<input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">'; + print '</div>'; +} + +llxFooter(); + +$db->close(); diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php new file mode 100644 index 0000000000000000000000000000000000000000..c89d7162c2ad2b53e38e18c36836ae5e12df88ae --- /dev/null +++ b/htdocs/user/class/userbankaccount.class.php @@ -0,0 +1,257 @@ +<?php +/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2010-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com> + * Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr> + * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> + * + * 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 <http://www.gnu.org/licenses/>. + */ + +/** + * \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; + } +} +