llx_accounting_bookkeeping_tmp.sql 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- ============================================================================
  2. -- Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
  3. -- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
  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_accounting_bookkeeping_tmp
  20. (
  21. rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
  22. entity integer DEFAULT 1 NOT NULL, -- | multi company id
  23. doc_date date NOT NULL, -- FEC:PieceDate
  24. doc_type varchar(30) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
  25. doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number
  26. fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid
  27. fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid
  28. thirdparty_code varchar(32), -- Third party code (customer or supplier) when record is saved (may help debug)
  29. subledger_account varchar(32), -- FEC:CompAuxNum | account number of subledger account
  30. subledger_label varchar(255), -- FEC:CompAuxLib | label of subledger account
  31. numero_compte varchar(32), -- FEC:CompteNum | account number
  32. label_compte varchar(255) NOT NULL, -- FEC:CompteLib | label of account
  33. label_operation varchar(255), -- FEC:EcritureLib | label of the operation
  34. debit double(24,8) NOT NULL, -- FEC:Debit
  35. credit double(24,8) NOT NULL, -- FEC:Credit
  36. montant double(24,8) NOT NULL, -- FEC:Montant (Not necessary)
  37. sens varchar(1) DEFAULT NULL, -- FEC:Sens (Not necessary)
  38. multicurrency_amount double(24,8), -- FEC:Montantdevise
  39. multicurrency_code varchar(255), -- FEC:Idevise
  40. lettering_code varchar(255), -- FEC:EcritureLet
  41. date_lettering datetime, -- FEC:DateLet
  42. date_lim_reglement datetime, -- | date limite de reglement
  43. fk_user_author integer NOT NULL, -- | user creating
  44. fk_user_modif integer, -- | user making last change
  45. date_creation datetime, -- FEC:EcritureDate | creation date
  46. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date
  47. fk_user integer NULL, -- The id of user that validate the accounting source document
  48. code_journal varchar(32) NOT NULL, -- FEC:JournalCode
  49. journal_label varchar(255), -- FEC:JournalLib
  50. piece_num integer NOT NULL, -- FEC:EcritureNum
  51. date_validated datetime, -- FEC:ValidDate | if empty: movement not validated / if not empty: movement validated (No deleting / No modification)
  52. import_key varchar(14),
  53. extraparams varchar(255) -- for other parameters with json format
  54. ) ENGINE=innodb;