llx_product_pricerules.sql 1.4 KB

1234567891011121314151617181920212223242526272829
  1. -- ============================================================================
  2. -- Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
  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 used only when PRODUIT_MULTIPRICES is set (prices per level) + PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL is set
  19. -- A checkbox become available on product to allow to set price rules
  20. CREATE TABLE llx_product_pricerules
  21. (
  22. rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
  23. level INTEGER NOT NULL, -- Which price level is this rule for?
  24. fk_level INTEGER NOT NULL, -- Price variations are made over price of X
  25. var_percent REAL NOT NULL, -- Price variation over based price
  26. var_min_percent REAL NOT NULL -- Min price discount over general price
  27. )ENGINE=innodb;