From e7d113f273ef63049f8880952546a9fe7dd0392e Mon Sep 17 00:00:00 2001 From: opensides Date: Sun, 13 Jun 2004 10:51:12 +0000 Subject: [PATCH] adaptation pour dolibarr head --- pgsql/tables/llx_c_pays.sql | 3 ++- pgsql/tables/llx_commandedet.sql | 36 +++++++++++++++++++++++++ pgsql/tables/llx_paiement_facture.sql | 33 +++++++++++++++++++++++ pgsql/tables/llx_paiementcharge.sql | 38 +++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 pgsql/tables/llx_commandedet.sql create mode 100644 pgsql/tables/llx_paiement_facture.sql create mode 100644 pgsql/tables/llx_paiementcharge.sql diff --git a/pgsql/tables/llx_c_pays.sql b/pgsql/tables/llx_c_pays.sql index 593ecf995dc..1d98316b7b8 100644 --- a/pgsql/tables/llx_c_pays.sql +++ b/pgsql/tables/llx_c_pays.sql @@ -24,7 +24,8 @@ create table llx_c_pays ( id SERIAL PRIMARY KEY, libelle varchar(25), - code char(2) NOT NULL + code char(2) NOT NULL, + active tinyint default 1 NOT NULL ); diff --git a/pgsql/tables/llx_commandedet.sql b/pgsql/tables/llx_commandedet.sql new file mode 100644 index 00000000000..80562bf7e1e --- /dev/null +++ b/pgsql/tables/llx_commandedet.sql @@ -0,0 +1,36 @@ +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_commandedet +( + rowid serial PRIMARY KEY, + fk_commande integer, + fk_product integer, + label varchar(255), + description text, + tva_tx real default 19.6, -- taux tva + qty real, -- quantité + remise_percent real default 0, -- pourcentage de remise + remise real default 0, -- montant de la remise + subprice real, -- prix avant remise + price real -- prix final +); diff --git a/pgsql/tables/llx_paiement_facture.sql b/pgsql/tables/llx_paiement_facture.sql new file mode 100644 index 00000000000..dfec9f09051 --- /dev/null +++ b/pgsql/tables/llx_paiement_facture.sql @@ -0,0 +1,33 @@ +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_paiement_facture +( + rowid serial PRIMARY KEY, + fk_paiement integer, + fk_facture integer, + amount real default 0 +); + +CREATE INDEX llx_paiement_facture_fk_paiement ON llx_paiement_facture(fk_paiement); + +CREATE INDEX llx_paiement_facture_fk_facture ON llx_paiement_facture(fk_facture); \ No newline at end of file diff --git a/pgsql/tables/llx_paiementcharge.sql b/pgsql/tables/llx_paiementcharge.sql new file mode 100644 index 00000000000..6d346cd4c65 --- /dev/null +++ b/pgsql/tables/llx_paiementcharge.sql @@ -0,0 +1,38 @@ +-- =================================================================== +-- Copyright (C) 2004 Laurent Destailleur +-- Copyright (C) 2004 Benoit Mortier +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- $Source$ +-- =================================================================== + +create table llx_paiementcharge +( + rowid serial PRIMARY KEY, + fk_charge integer, + datec timestamp, -- date de creation + tms timestamp, + datep timestamp, -- payment date + amount real default 0, + fk_typepaiement integer NOT NULL, + num_paiement varchar(50), + note text, + fk_bank integer NOT NULL, + fk_user_creat integer, -- utilisateur qui a créé l'info + fk_user_modif integer -- utilisateur qui a modifié l'info + +);