1-- ===================================================================
2-- Copyright (C) 2000-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3-- Copyright (C) 2005-2010 Laurent Destailleur  <eldy@users.sourceforge.net>
4--
5-- This program is free software; you can redistribute it and/or modify
6-- it under the terms of the GNU General Public License as published by
7-- the Free Software Foundation; either version 3 of the License, or
8-- (at your option) any later version.
9--
10-- This program is distributed in the hope that it will be useful,
11-- but WITHOUT ANY WARRANTY; without even the implied warranty of
12-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13-- GNU General Public License for more details.
14--
15-- You should have received a copy of the GNU General Public License
16-- along with this program. If not, see <https://www.gnu.org/licenses/>.
17--
18-- ===================================================================
19
20create table llx_bank
21(
22  rowid           integer AUTO_INCREMENT PRIMARY KEY,
23  datec           datetime,
24  tms             timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
25  datev           date,                      -- date de valeur
26  dateo           date,                      -- date operation
27  amount          double(24,8) NOT NULL default 0,
28  label           varchar(255),
29  fk_account      integer,
30  fk_user_author  integer,
31  fk_user_rappro  integer,
32  fk_type         varchar(6),                -- TIP,VIR,PRE,CB,CHQ,... (Code in llx_c_paiement)
33  num_releve      varchar(50),
34  num_chq         varchar(50),
35  numero_compte   varchar(32) NULL,		       -- FEC:CompteNum	| account number
36  rappro          tinyint default 0,
37  note            text,
38  fk_bordereau    integer DEFAULT 0,
39  banque          varchar(255),              -- banque pour les cheques
40  emetteur        varchar(255),              -- emetteur du cheque
41  author          varchar(40),               -- a supprimer apres migration
42  origin_id       integer,
43  origin_type     varchar(64) NULL,
44  import_key	  varchar(14)
45)ENGINE=innodb;
46