llx_delivery.sql 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. -- ===================================================================
  2. -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2008-2010 Regis Houssin <regis.houssin@inodbox.com>
  4. --
  5. -- This program is free software; you can redistribute it and/or modify
  6. -- it under the terms of the GNU General Public License as published by
  7. -- the Free Software Foundation; either version 3 of the License, or
  8. -- (at your option) any later version.
  9. --
  10. -- This program is distributed in the hope that it will be useful,
  11. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. -- GNU General Public License for more details.
  14. --
  15. -- You should have received a copy of the GNU General Public License
  16. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. --
  18. -- ===================================================================
  19. create table llx_delivery
  20. (
  21. rowid integer AUTO_INCREMENT PRIMARY KEY,
  22. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  23. ref varchar(30) NOT NULL, -- delivery number
  24. entity integer DEFAULT 1 NOT NULL, -- multi company id
  25. fk_soc integer NOT NULL,
  26. ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
  27. ref_customer varchar(255), -- customer number
  28. date_creation datetime, -- date de creation
  29. fk_user_author integer, -- createur du bon de livraison
  30. date_valid datetime, -- date de validation
  31. fk_user_valid integer, -- valideur du bon de livraison
  32. date_delivery datetime DEFAULT NULL, -- delivery date
  33. fk_address integer, -- delivery address (deprecated)
  34. fk_statut smallint DEFAULT 0,
  35. total_ht double(24,8) DEFAULT 0,
  36. note_private text,
  37. note_public text,
  38. model_pdf varchar(255),
  39. last_main_doc varchar(255), -- relative filepath+filename of last main generated document
  40. fk_incoterms integer, -- for incoterms
  41. location_incoterms varchar(255), -- for incoterms
  42. import_key varchar(14),
  43. extraparams varchar(255) -- for other parameters with json format
  44. )ENGINE=innodb;