llx_supplier_proposaldet.sql 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. -- ========================================================================
  2. -- Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
  3. --
  4. -- This program is free software; you can redistribute it and/or modify
  5. -- it under the terms of the GNU General Public License as published by
  6. -- the Free Software Foundation; either version 3 of the License, or
  7. -- (at your option) any later version.
  8. --
  9. -- This program is distributed in the hope that it will be useful,
  10. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. -- GNU General Public License for more details.
  13. --
  14. -- You should have received a copy of the GNU General Public License
  15. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. -- ========================================================================
  17. CREATE TABLE llx_supplier_proposaldet (
  18. rowid integer AUTO_INCREMENT PRIMARY KEY,
  19. fk_supplier_proposal integer NOT NULL,
  20. fk_parent_line integer DEFAULT NULL,
  21. fk_product integer DEFAULT NULL,
  22. label varchar(255) DEFAULT NULL,
  23. description text,
  24. fk_remise_except integer DEFAULT NULL,
  25. vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here.
  26. tva_tx double(7,4) DEFAULT 0, -- Vat rate
  27. localtax1_tx double(7,4) DEFAULT 0,
  28. localtax1_type varchar(10) DEFAULT NULL,
  29. localtax2_tx double(7,4) DEFAULT 0,
  30. localtax2_type varchar(10) DEFAULT NULL,
  31. qty double DEFAULT NULL,
  32. remise_percent double DEFAULT '0',
  33. remise double DEFAULT '0',
  34. price double DEFAULT NULL,
  35. subprice double(24,8) DEFAULT 0,
  36. total_ht double(24,8) DEFAULT 0,
  37. total_tva double(24,8) DEFAULT 0,
  38. total_localtax1 double(24,8) DEFAULT 0,
  39. total_localtax2 double(24,8) DEFAULT 0,
  40. total_ttc double(24,8) DEFAULT 0,
  41. product_type integer DEFAULT 0,
  42. date_start datetime DEFAULT NULL, -- date debut si service
  43. date_end datetime DEFAULT NULL, -- date fin si service
  44. info_bits integer DEFAULT 0,
  45. buy_price_ht double(24,8) DEFAULT 0,
  46. fk_product_fournisseur_price integer DEFAULT NULL,
  47. special_code integer DEFAULT 0,
  48. rang integer DEFAULT 0,
  49. ref_fourn varchar(30) DEFAULT NULL,
  50. fk_multicurrency integer,
  51. multicurrency_code varchar(3),
  52. multicurrency_subprice double(24,8) DEFAULT 0,
  53. multicurrency_total_ht double(24,8) DEFAULT 0,
  54. multicurrency_total_tva double(24,8) DEFAULT 0,
  55. multicurrency_total_ttc double(24,8) DEFAULT 0,
  56. fk_unit integer DEFAULT NULL
  57. ) ENGINE=innodb;