llx_bank_account.sql 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. -- =============================================================================
  2. -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
  4. -- Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. -- Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
  6. --
  7. -- This program is free software; you can redistribute it and/or modify
  8. -- it under the terms of the GNU General Public License as published by
  9. -- the Free Software Foundation; either version 3 of the License, or
  10. -- (at your option) any later version.
  11. --
  12. -- This program is distributed in the hope that it will be useful,
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. -- GNU General Public License for more details.
  16. --
  17. -- You should have received a copy of the GNU General Public License
  18. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. --
  20. -- =============================================================================
  21. -- courant : type of account: 0 epargne, 1 curent/card/cheque, 2 cash
  22. -- clos : is account opened or closed
  23. create table llx_bank_account
  24. (
  25. rowid integer AUTO_INCREMENT PRIMARY KEY,
  26. datec datetime,
  27. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  28. ref varchar(12) NOT NULL,
  29. label varchar(30) NOT NULL,
  30. entity integer DEFAULT 1 NOT NULL, -- multi company id
  31. fk_user_author integer,
  32. fk_user_modif integer,
  33. bank varchar(60),
  34. code_banque varchar(128),
  35. code_guichet varchar(6),
  36. number varchar(255),
  37. cle_rib varchar(5),
  38. bic varchar(11),
  39. iban_prefix varchar(34), -- full iban. 34 according to ISO 13616
  40. country_iban varchar(2), -- deprecated
  41. cle_iban varchar(2),
  42. domiciliation varchar(255),
  43. pti_in_ctti smallint DEFAULT 0,
  44. state_id integer DEFAULT NULL,
  45. fk_pays integer NOT NULL,
  46. proprio varchar(60),
  47. owner_address varchar(255),
  48. courant smallint DEFAULT 0 NOT NULL,
  49. clos smallint DEFAULT 0 NOT NULL,
  50. rappro smallint DEFAULT 1,
  51. url varchar(128),
  52. account_number varchar(32), -- bank accountancy number
  53. fk_accountancy_journal integer, -- bank accountancy journal
  54. currency_code varchar(3) NOT NULL,
  55. min_allowed integer DEFAULT 0,
  56. min_desired integer DEFAULT 0,
  57. comment text, -- TODO rename in note_private
  58. note_public text,
  59. model_pdf varchar(255),
  60. import_key varchar(14),
  61. extraparams varchar(255), -- for other parameters with json format
  62. ics varchar(32), -- Creditor Identifier CI
  63. ics_transfer varchar(32) -- Creditor Identifier CI for transfer
  64. )ENGINE=innodb;