llx_accounting_account.sql 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- ============================================================================
  2. -- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
  3. -- Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
  4. -- Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
  5. --
  6. -- This program is free software; you can redistribute it and/or modify
  7. -- it under the terms of the GNU General Public License as published by
  8. -- the Free Software Foundation; either version 3 of the License, or
  9. -- (at your option) any later version.
  10. --
  11. -- This program is distributed in the hope that it will be useful,
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. -- GNU General Public License for more details.
  15. --
  16. -- You should have received a copy of the GNU General Public License
  17. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. --
  19. -- Table of 'accounts' for accountancy expert module
  20. -- ============================================================================
  21. create table llx_accounting_account
  22. (
  23. rowid bigint AUTO_INCREMENT PRIMARY KEY,
  24. entity integer DEFAULT 1 NOT NULL,
  25. datec datetime,
  26. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  27. fk_pcg_version varchar(32) NOT NULL, -- Chart system
  28. pcg_type varchar(20) NOT NULL, -- First part of Key for predefined groups
  29. account_number varchar(32) NOT NULL,
  30. account_parent integer DEFAULT 0, -- Hierarchic parent.
  31. label varchar(255) NOT NULL,
  32. labelshort varchar(255) DEFAULT NULL,
  33. fk_accounting_category integer DEFAULT 0, -- ID of personalized group for report
  34. fk_user_author integer DEFAULT NULL,
  35. fk_user_modif integer DEFAULT NULL,
  36. active tinyint DEFAULT 1 NOT NULL,
  37. reconcilable tinyint DEFAULT 0 NOT NULL,
  38. import_key varchar(14),
  39. extraparams varchar(255) -- for other parameters with json format
  40. )ENGINE=innodb;