llx_payment_salary.sql 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- ===================================================================
  2. -- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
  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. -- ===================================================================
  18. create table llx_payment_salary
  19. (
  20. rowid integer AUTO_INCREMENT PRIMARY KEY,
  21. ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet)
  22. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  23. datec datetime, -- Create date
  24. fk_user integer DEFAULT NULL,
  25. datep date, -- payment date
  26. datev date, -- value date (this field should not be here, only into bank tables)
  27. salary double(24,8), -- salary of user when payment was done
  28. amount double(24,8) NOT NULL DEFAULT 0,
  29. fk_projet integer DEFAULT NULL,
  30. fk_typepayment integer NOT NULL,
  31. num_payment varchar(50), -- num cheque or other
  32. label varchar(255),
  33. datesp date, -- date start period
  34. dateep date, -- date end period
  35. entity integer DEFAULT 1 NOT NULL, -- multi company id
  36. note text,
  37. fk_bank integer,
  38. fk_user_author integer, -- user creating
  39. fk_user_modif integer, -- user making last change
  40. fk_salary integer
  41. )ENGINE=innodb;