llx_asset_accountancy_codes_economic-asset.sql 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. -- ========================================================================
  2. -- Copyright (C) 2022 OpenDSI <support@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. -- Table to store the configuration of the accounting accounts of a fixed asset for economic status (fk_asset will be filled and fk_asset_model will be null)
  19. -- or to store the configuration of the accounting accounts for templates of asset (fk_asset_model will be filled and fk_asset will be null)
  20. --
  21. -- Data example:
  22. -- INSERT INTO llx_asset_accountancy_codes_economic (fk_asset, fk_asset_model, asset, depreciation_asset, depreciation_expense, value_asset_sold, receivable_on_assignment, proceeds_from_sales, vat_collected, vat_deductible, tms, fk_user_modif) VALUES
  23. -- (1, NULL, '2183', '2818', '68112', '675', '465', '775', '44571', '44562', '2022-01-18 14:20:20', 1);
  24. CREATE TABLE llx_asset_accountancy_codes_economic(
  25. rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
  26. fk_asset integer,
  27. fk_asset_model integer,
  28. asset varchar(32),
  29. depreciation_asset varchar(32),
  30. depreciation_expense varchar(32),
  31. value_asset_sold varchar(32),
  32. receivable_on_assignment varchar(32),
  33. proceeds_from_sales varchar(32),
  34. vat_collected varchar(32),
  35. vat_deductible varchar(32),
  36. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  37. fk_user_modif integer
  38. ) ENGINE=innodb;