llx_product_customer_price.sql 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. create table llx_product_customer_price
  23. (
  24. rowid integer AUTO_INCREMENT PRIMARY KEY,
  25. entity integer DEFAULT 1 NOT NULL, -- multi company id
  26. datec datetime,
  27. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  28. fk_product integer NOT NULL,
  29. fk_soc integer NOT NULL,
  30. ref_customer varchar(128),
  31. price double(24,8) DEFAULT 0,
  32. price_ttc double(24,8) DEFAULT 0,
  33. price_min double(24,8) DEFAULT 0,
  34. price_min_ttc double(24,8) DEFAULT 0,
  35. price_base_type varchar(3) DEFAULT 'HT',
  36. 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.
  37. tva_tx double(7,4),
  38. recuperableonly integer NOT NULL DEFAULT '0', -- Other NPR VAT
  39. localtax1_tx double(7,4) DEFAULT 0, -- Other local VAT 1
  40. localtax1_type varchar(10) NOT NULL DEFAULT '0',
  41. localtax2_tx double(7,4) DEFAULT 0, -- Other local VAT 2
  42. localtax2_type varchar(10) NOT NULL DEFAULT '0',
  43. fk_user integer,
  44. import_key varchar(14) -- Import key
  45. )ENGINE=innodb;