llx_supplier_proposal.sql 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_proposal (
  18. rowid integer AUTO_INCREMENT PRIMARY KEY,
  19. ref varchar(30) NOT NULL,
  20. entity integer NOT NULL DEFAULT 1,
  21. ref_ext varchar(255) DEFAULT NULL,
  22. fk_soc integer DEFAULT NULL,
  23. fk_projet integer DEFAULT NULL,
  24. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  25. datec datetime DEFAULT NULL,
  26. date_valid datetime DEFAULT NULL,
  27. date_cloture datetime DEFAULT NULL,
  28. fk_user_author integer DEFAULT NULL,
  29. fk_user_modif integer DEFAULT NULL,
  30. fk_user_valid integer DEFAULT NULL,
  31. fk_user_cloture integer DEFAULT NULL,
  32. fk_statut smallint DEFAULT 0 NOT NULL, -- 0=draft, 1=validated, 2=accepted, 3=refused, 4=billed/closed
  33. price double DEFAULT 0,
  34. remise_percent double DEFAULT 0,
  35. remise_absolue double DEFAULT 0,
  36. remise double DEFAULT 0,
  37. total_ht double(24,8) DEFAULT 0,
  38. total_tva double(24,8) DEFAULT 0,
  39. localtax1 double(24,8) DEFAULT 0,
  40. localtax2 double(24,8) DEFAULT 0,
  41. total_ttc double(24,8) DEFAULT 0,
  42. fk_account integer DEFAULT NULL,
  43. fk_currency varchar(3) DEFAULT NULL,
  44. fk_cond_reglement integer DEFAULT NULL,
  45. fk_mode_reglement integer DEFAULT NULL,
  46. note_private text,
  47. note_public text,
  48. model_pdf varchar(255) DEFAULT NULL,
  49. last_main_doc varchar(255), -- relative filepath+filename of last main generated document
  50. date_livraison date DEFAULT NULL,
  51. fk_shipping_method integer DEFAULT NULL,
  52. import_key varchar(14) DEFAULT NULL,
  53. extraparams varchar(255) DEFAULT NULL,
  54. fk_multicurrency integer,
  55. multicurrency_code varchar(3),
  56. multicurrency_tx double(24,8) DEFAULT 1,
  57. multicurrency_total_ht double(24,8) DEFAULT 0,
  58. multicurrency_total_tva double(24,8) DEFAULT 0,
  59. multicurrency_total_ttc double(24,8) DEFAULT 0
  60. ) ENGINE=innodb;