1-- ============================================================================ 2-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3-- Copyright (C) 2009-2011 Laurent Destailleur <eldy@users.sourceforge.net> 4-- Copyright (C) 2009-2013 Regis Houssin <regis.houssin@inodbox.com> 5-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> 6-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> 7-- 8-- This program is free software; you can redistribute it and/or modify 9-- it under the terms of the GNU General Public License as published by 10-- the Free Software Foundation; either version 3 of the License, or 11-- (at your option) any later version. 12-- 13-- This program is distributed in the hope that it will be useful, 14-- but WITHOUT ANY WARRANTY; without even the implied warranty of 15-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16-- GNU General Public License for more details. 17-- 18-- You should have received a copy of the GNU General Public License 19-- along with this program. If not, see <https://www.gnu.org/licenses/>. 20-- 21-- ============================================================================ 22 23create table llx_product_customer_price 24( 25 rowid integer AUTO_INCREMENT PRIMARY KEY, 26 entity integer DEFAULT 1 NOT NULL, -- multi company id 27 datec datetime, 28 tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 29 fk_product integer NOT NULL, 30 fk_soc integer NOT NULL, 31 ref_customer varchar(30), 32 price double(24,8) DEFAULT 0, 33 price_ttc double(24,8) DEFAULT 0, 34 price_min double(24,8) DEFAULT 0, 35 price_min_ttc double(24,8) DEFAULT 0, 36 price_base_type varchar(3) DEFAULT 'HT', 37 default_vat_code varchar(10), -- Same code than into table llx_c_tva (but no constraints). Should be used in priority to find default vat, npr, localtaxes for product. 38 tva_tx double(6,3), 39 recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT 40 localtax1_tx double(6,3) DEFAULT 0, -- Other local VAT 1 41 localtax1_type varchar(10) NOT NULL DEFAULT '0', 42 localtax2_tx double(6,3) DEFAULT 0, -- Other local VAT 2 43 localtax2_type varchar(10) NOT NULL DEFAULT '0', 44 fk_user integer, 45 import_key varchar(14) -- Import key 46)ENGINE=innodb; 47