llx_paiement.sql 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. -- ===================================================================
  2. -- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
  4. -- Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
  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. -- ===================================================================
  20. create table llx_paiement
  21. (
  22. rowid integer AUTO_INCREMENT PRIMARY KEY,
  23. ref varchar(30) NULL, -- payment reference number
  24. ref_ext varchar(255) NULL, -- payment external reference
  25. entity integer DEFAULT 1 NOT NULL, -- Multi company id
  26. datec datetime, -- date de creation
  27. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  28. datep datetime, -- payment date
  29. amount double(24,8) DEFAULT 0, -- amount paid in Dolibarr currency
  30. multicurrency_amount double(24,8) DEFAULT 0, -- amount paid in invoice currency
  31. fk_paiement integer NOT NULL, -- type of payment in llx_c_paiement
  32. num_paiement varchar(50),
  33. note text,
  34. ext_payment_id varchar(255), -- external id of payment (for example Stripe charge id)
  35. ext_payment_site varchar(128), -- name of external paymentmode (for example 'stripe')
  36. fk_bank integer NOT NULL DEFAULT 0,
  37. fk_user_creat integer, -- utilisateur qui a cree l'info
  38. fk_user_modif integer, -- utilisateur qui a modifie l'info
  39. statut smallint DEFAULT 0 NOT NULL, -- Satut, 0 ou 1, 1 n'est plus supprimable
  40. fk_export_compta integer DEFAULT 0 NOT NULL, -- fk_export_compta 0 pas exporte
  41. pos_change double(24,8) DEFAULT 0 -- Excess received in TakePOS cash payment
  42. )ENGINE=innodb;