llx_chargesociales.sql 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- ========================================================================
  2. -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
  4. -- Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
  5. -- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
  6. -- Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
  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_chargesociales
  23. (
  24. rowid integer AUTO_INCREMENT PRIMARY KEY,
  25. ref varchar(16), -- 'TX....'
  26. date_ech datetime NOT NULL, -- date echeance
  27. libelle varchar(80) NOT NULL,
  28. entity integer DEFAULT 1 NOT NULL, -- multi company id
  29. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  30. date_creation datetime, -- date de creation
  31. date_valid datetime, -- date de validation
  32. fk_user integer DEFAULT NULL, -- utilisateur concerné
  33. fk_user_author integer, -- user making creation
  34. fk_user_modif integer, -- user making last change
  35. fk_user_valid integer, -- user validating
  36. fk_type integer NOT NULL,
  37. fk_account integer, -- bank account
  38. fk_mode_reglement integer, -- mode de reglement
  39. amount double(24,8) default 0 NOT NULL,
  40. paye smallint default 0 NOT NULL,
  41. periode date,
  42. fk_projet integer DEFAULT NULL,
  43. note_private text,
  44. note_public text,
  45. import_key varchar(14)
  46. )ENGINE=innodb;
  47. --
  48. -- List of codes for the field entity
  49. --
  50. -- 1 : first company tax
  51. -- 2 : second company tax
  52. -- 3 : etc...
  53. --