2002-12-17 20:13:06 +01:00
|
|
|
-- ===================================================================
|
2003-03-13 20:07:52 +01:00
|
|
|
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2018-10-27 14:43:12 +02:00
|
|
|
-- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
|
2011-06-29 19:55:32 +02:00
|
|
|
-- Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
2019-01-28 21:39:22 +01:00
|
|
|
-- Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
2002-12-17 20:13:06 +01:00
|
|
|
--
|
|
|
|
|
-- 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
|
2013-01-16 15:36:08 +01:00
|
|
|
-- the Free Software Foundation; either version 3 of the License, or
|
2002-12-17 20:13:06 +01:00
|
|
|
-- (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
|
2019-09-23 21:55:30 +02:00
|
|
|
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2002-12-17 20:13:06 +01:00
|
|
|
--
|
|
|
|
|
-- ===================================================================
|
|
|
|
|
|
2007-12-02 22:48:15 +01:00
|
|
|
|
2002-12-17 20:13:06 +01:00
|
|
|
create table llx_don
|
|
|
|
|
(
|
|
|
|
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
2009-12-01 14:27:53 +01:00
|
|
|
ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL)
|
|
|
|
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
2002-12-17 20:13:06 +01:00
|
|
|
tms timestamp,
|
2015-03-26 20:43:34 +01:00
|
|
|
fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate
|
2015-04-02 06:36:32 +02:00
|
|
|
datedon datetime, -- Date of the donation/promise
|
2017-10-29 06:56:05 +01:00
|
|
|
amount double(24,8) DEFAULT 0,
|
2018-03-02 12:32:49 +01:00
|
|
|
fk_payment integer, -- Id of payment mode
|
2015-03-18 05:07:32 +01:00
|
|
|
paid smallint default 0 NOT NULL,
|
2019-01-18 11:23:59 +01:00
|
|
|
fk_soc integer NULL,
|
2013-03-09 16:19:15 +01:00
|
|
|
firstname varchar(50),
|
|
|
|
|
lastname varchar(50),
|
2002-12-22 15:13:21 +01:00
|
|
|
societe varchar(50),
|
2013-02-15 19:26:09 +01:00
|
|
|
address text,
|
2013-03-09 16:19:15 +01:00
|
|
|
zip varchar(30),
|
|
|
|
|
town varchar(50),
|
2015-03-18 05:07:32 +01:00
|
|
|
country varchar(50), -- Deprecated - Replace with fk_country
|
2019-01-18 11:23:59 +01:00
|
|
|
fk_country integer NOT NULL,
|
2002-12-22 16:04:04 +01:00
|
|
|
email varchar(255),
|
2011-06-29 19:55:32 +02:00
|
|
|
phone varchar(24),
|
|
|
|
|
phone_mobile varchar(24),
|
2016-09-23 10:04:27 +02:00
|
|
|
public smallint DEFAULT 1 NOT NULL, -- Donation is public ? (0,1)
|
|
|
|
|
fk_projet integer NULL, -- Donation is given for a project ?
|
|
|
|
|
datec datetime, -- Create date
|
2002-12-17 20:13:06 +01:00
|
|
|
fk_user_author integer NOT NULL,
|
2019-10-31 23:17:08 +01:00
|
|
|
fk_user_modif integer,
|
2016-09-23 10:04:27 +02:00
|
|
|
date_valid datetime, -- date de validation
|
2008-11-14 12:43:24 +01:00
|
|
|
fk_user_valid integer NULL,
|
2013-04-09 17:18:07 +02:00
|
|
|
note_private text,
|
2008-11-17 01:12:33 +01:00
|
|
|
note_public text,
|
2011-02-20 21:53:26 +01:00
|
|
|
model_pdf varchar(255),
|
2017-07-24 11:53:57 +02:00
|
|
|
import_key varchar(14),
|
|
|
|
|
extraparams varchar(255) -- for other parameters with json format
|
2011-02-24 10:57:02 +01:00
|
|
|
)ENGINE=innodb;
|