1-- ============================================================================
2-- Copyright (C) 2002-2003	Rodolphe Quiedeville	<rodolphe@quiedeville.org>
3-- Copyright (C) 2005-2012	Regis Houssin			<regis.houssin@inodbox.com>
4-- Copyright (C) 2010		Juanjo Menent			<jmenent@2byte.es>
5-- Copyright (C) 2012		Maxime Kohlhaas			<maxime.kohlhaas@atm-consulting.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-- This table is used to defined price by qty when a line into llx_product_price
21-- is set with price_by_qty = 1
22-- ============================================================================
23
24create table llx_product_price_by_qty
25(
26  rowid				integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
27  fk_product_price	integer NOT NULL,
28  price				double(24,8) DEFAULT 0,
29  price_base_type	varchar(3) DEFAULT 'HT',
30  quantity			double DEFAULT NULL,
31  remise_percent	double NOT NULL DEFAULT 0,
32  remise			double NOT NULL DEFAULT 0,
33  unitprice			double(24,8) DEFAULT 0,
34  fk_user_creat 	integer,
35  fk_user_modif 	integer,
36
37  fk_multicurrency		integer,
38  multicurrency_code	varchar(255),
39  multicurrency_tx			double(24,8) DEFAULT 1,
40  multicurrency_price	double(24,8) DEFAULT NULL,
41  multicurrency_price_ttc	double(24,8) DEFAULT NULL,
42
43  tms				timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
44  import_key    	varchar(14)
45)ENGINE=innodb;
46