llx_reception.sql 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. -- ===================================================================
  2. -- Copyright (C) 2003-2010 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2008-2010 Regis Houssin <regis.houssin@capnetworks.com>
  4. -- Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
  5. -- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
  6. --
  7. -- This program is free software; you can redistribute it and/or modify
  8. -- it under the terms of the GNU General Public License as published by
  9. -- the Free Software Foundation; either version 3 of the License, or
  10. -- (at your option) any later version.
  11. --
  12. -- This program is distributed in the hope that it will be useful,
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. -- GNU General Public License for more details.
  16. --
  17. -- You should have received a copy of the GNU General Public License
  18. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. --
  20. -- Note: a reception is linked to a supplier order or other object using llx_element_element table.
  21. -- ===================================================================
  22. create table llx_reception
  23. (
  24. rowid integer AUTO_INCREMENT PRIMARY KEY,
  25. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  26. ref varchar(30) NOT NULL,
  27. entity integer DEFAULT 1 NOT NULL, -- multi company id
  28. fk_soc integer NOT NULL,
  29. fk_projet integer DEFAULT NULL,
  30. ref_ext varchar(30), -- reference into an external system (not used by dolibarr)
  31. ref_supplier varchar(255), -- reference of reception on supplier side
  32. date_creation datetime, -- date de creation
  33. fk_user_author integer, -- author of creation
  34. fk_user_modif integer, -- author of last change
  35. date_valid datetime, -- date de validation
  36. fk_user_valid integer, -- valideur
  37. date_delivery datetime DEFAULT NULL, -- date planned of delivery
  38. date_reception datetime,
  39. fk_shipping_method integer,
  40. tracking_number varchar(50),
  41. fk_statut smallint DEFAULT 0, -- 0 = draft, 1 = validated, 2 = billed or closed depending on WORKFLOW_BILL_ON_SHIPMENT option
  42. billed smallint DEFAULT 0,
  43. height float, -- height
  44. width float, -- with
  45. size_units integer, -- unit of all sizes (height, width, depth)
  46. size float, -- depth
  47. weight_units integer, -- unit of weight
  48. weight float, -- weight
  49. note_private text,
  50. note_public text,
  51. model_pdf varchar(255),
  52. fk_incoterms integer, -- for incoterms
  53. location_incoterms varchar(255), -- for incoterms
  54. import_key varchar(14),
  55. extraparams varchar(255) -- for other parameters with json format
  56. )ENGINE=innodb;