1-- ============================================================================
2-- Copyright (C) 2004      Rodolphe Quiedeville <rodolphe@quiedeville.org>
3-- Copyright (C) 2006-2007 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-- Remises exceptionnelles
20-- ============================================================================
21
22create table llx_societe_remise_except
23(
24  rowid						integer AUTO_INCREMENT PRIMARY KEY,
25  entity					integer DEFAULT 1 NOT NULL,				-- multi company id
26  fk_soc					integer NOT NULL,						-- customer or supplier
27  discount_type				integer DEFAULT 0 NOT NULL,				-- 0 => customer, 1 => supplier
28  datec						datetime,
29  amount_ht					double(24,8) NOT NULL,
30  amount_tva				double(24,8) DEFAULT 0 NOT NULL,
31  amount_ttc				double(24,8) DEFAULT 0 NOT NULL,
32  tva_tx					double(6,3)  DEFAULT 0 NOT NULL,
33  vat_src_code				varchar(10)  DEFAULT '',				-- Vat code used as source of vat fields. Not strict foreign key here.
34  fk_user					integer NOT NULL,
35  fk_facture_line			integer,
36  fk_facture				integer,
37  fk_facture_source			integer,
38  fk_invoice_supplier_line	integer,
39  fk_invoice_supplier		integer,
40  fk_invoice_supplier_source integer,
41  description				text NOT NULL,
42  multicurrency_amount_ht	double(24,8) DEFAULT 0 NOT NULL,
43  multicurrency_amount_tva	double(24,8) DEFAULT 0 NOT NULL,
44  multicurrency_amount_ttc	double(24,8) DEFAULT 0 NOT NULL
45)ENGINE=innodb;
46