llx_societe_remise_except.sql 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. -- ============================================================================
  2. -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
  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. -- Remises exceptionnelles
  20. -- ============================================================================
  21. create table llx_societe_remise_except
  22. (
  23. rowid integer AUTO_INCREMENT PRIMARY KEY,
  24. entity integer DEFAULT 1 NOT NULL, -- multi company id
  25. fk_soc integer NOT NULL, -- customer or supplier
  26. discount_type integer DEFAULT 0 NOT NULL, -- 0 => customer, 1 => supplier
  27. datec datetime,
  28. amount_ht double(24,8) NOT NULL,
  29. amount_tva double(24,8) DEFAULT 0 NOT NULL,
  30. amount_ttc double(24,8) DEFAULT 0 NOT NULL,
  31. tva_tx double(7,4) DEFAULT 0 NOT NULL,
  32. vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here.
  33. fk_user integer NOT NULL,
  34. fk_facture_line integer,
  35. fk_facture integer,
  36. fk_facture_source integer,
  37. fk_invoice_supplier_line integer,
  38. fk_invoice_supplier integer,
  39. fk_invoice_supplier_source integer,
  40. description text NOT NULL,
  41. multicurrency_code varchar(3) NULL,
  42. multicurrency_tx double(24,8) NULL,
  43. multicurrency_amount_ht double(24,8) DEFAULT 0 NOT NULL,
  44. multicurrency_amount_tva double(24,8) DEFAULT 0 NOT NULL,
  45. multicurrency_amount_ttc double(24,8) DEFAULT 0 NOT NULL
  46. )ENGINE=innodb;