Creation of the interface USER
This commit is contained in:
parent
e5ab551ccc
commit
916cfefdd5
24 changed files with 1651 additions and 175 deletions
|
|
@ -32,7 +32,7 @@ create table ac_users (
|
|||
primary key (use_id)
|
||||
);
|
||||
|
||||
insert into ac_users (use_login, use_active,use_pass,use_usertype,use_admin) values (user,1,
|
||||
insert into ac_users (use_login, use_active,use_pass,use_usertype,use_admin) values ('phpcompta',1,
|
||||
'b1cc88e1907cde80cb2595fa793b3da9','compta',1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -50,3 +50,18 @@ insert into parm_periode (p_start,p_end,p_exercice) values ('01-10-2003','30-10
|
|||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-11-2003','30-11-2003','2003');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-12-2003','31-12-2003','2003');
|
||||
insert into parm_periode (p_start,p_exercice) values ('31-12-2003','2003');
|
||||
|
||||
-- for the year 2004
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-01-2004','31-01-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-02-2004','28-02-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-03-2004','31-03-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-04-2004','30-04-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-05-2004','31-05-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-06-2004','30-06-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-07-2004','31-07-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-08-2004','31-08-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-09-2004','30-09-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-10-2004','30-10-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-11-2004','30-11-2004','2004');
|
||||
insert into parm_periode (p_start,p_end,p_exercice) values ('01-12-2004','31-12-2004','2004');
|
||||
insert into parm_periode (p_start,p_exercice) values ('31-12-2004','2004');
|
||||
|
|
|
|||
265
sql/fiche.sql
265
sql/fiche.sql
|
|
@ -1,54 +1,223 @@
|
|||
/* $Revision$ */
|
||||
/*
|
||||
* This file is part of PhpCompta.
|
||||
*
|
||||
* PhpCompta 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.
|
||||
*
|
||||
* PhpCompta 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 PhpCompta; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
drop sequence s_isup;
|
||||
-- For the fiche dev only
|
||||
-- Create the sequence
|
||||
\echo recreate Sequence
|
||||
\echo try first to drop it, no worry about error messages
|
||||
|
||||
\echo drop SEQUENCE s_fiche
|
||||
drop SEQUENCE s_fiche;
|
||||
\echo CREATE SEQUENCE s_fiche
|
||||
CREATE SEQUENCE s_fiche;
|
||||
\echo drop sequence s_fiche_def_ref
|
||||
drop sequence s_fiche_def_ref;
|
||||
\echo create sequence s_fiche_def_ref
|
||||
create sequence s_fiche_def_ref;
|
||||
\echo drop sequence s_fdef
|
||||
drop sequence s_fdef;
|
||||
drop sequence s_idef;
|
||||
|
||||
drop table isupp;
|
||||
drop table fiche ;
|
||||
drop table isupp_def ;
|
||||
drop table fichedef ;
|
||||
create sequence s_isup;
|
||||
|
||||
\echo create sequence s_fdef
|
||||
create sequence s_fdef;
|
||||
create sequence s_idef;
|
||||
\echo drop sequence s_attr_def;
|
||||
drop sequence s_attr_def;
|
||||
\echo drop sequence s_attr_def;
|
||||
drop sequence s_attr_def;
|
||||
\echo create sequence s_attr_def
|
||||
create sequence s_attr_def;
|
||||
\echo drop SEQUENCE s_jnt_fic_att_value
|
||||
drop SEQUENCE s_jnt_fic_att_value;
|
||||
\echo CREATE SEQUENCE s_jnt_fic_att_value
|
||||
CREATE SEQUENCE s_jnt_fic_att_value;
|
||||
|
||||
create table fichedef (
|
||||
fd_id integer not null default nextval('s_fdef') primary key,
|
||||
fd_label text not null,
|
||||
fd_class_base text
|
||||
);
|
||||
create table fiche (
|
||||
f_id integer not null references tmp_pcmn(pcm_val) primary key,
|
||||
f_label text not null,
|
||||
f_fd_id integer
|
||||
);
|
||||
create table isupp_def (
|
||||
isd_id integer not null default nextval('s_idef') primary key,
|
||||
isd_label text,
|
||||
isd_fd_id integer references fichedef(fd_id),
|
||||
isd_form bool
|
||||
\echo Drop first the tables and after
|
||||
\echo recreate them
|
||||
\echo drop table fiche_def_ref
|
||||
drop table fiche_def_ref cascade;
|
||||
\echo CREATE TABLE fiche_def_ref
|
||||
CREATE TABLE fiche_def_ref (
|
||||
frd_id integer DEFAULT nextval('s_fiche_def_ref'::text) primary key,
|
||||
frd_text text,
|
||||
frd_class_base integer default null
|
||||
);
|
||||
|
||||
create table isupp (
|
||||
is_id integer not null default nextval('s_isup') primary key,
|
||||
is_f_id integer references tmp_pcmn(pcm_val),
|
||||
is_isd_id integer references isupp_def(isd_id),
|
||||
is_value text
|
||||
\echo drop TABLE fiche_def
|
||||
drop TABLE fiche_def cascade;
|
||||
\echo CREATE TABLE fiche_def
|
||||
CREATE TABLE fiche_def (
|
||||
fd_id integer DEFAULT nextval('s_fdef'::text) primary key,
|
||||
fd_class_base integer,
|
||||
fd_label text NOT NULL,
|
||||
fd_create_account bool default false,
|
||||
frd_id integer NOT NULL references fiche_def_ref(frd_id)
|
||||
);
|
||||
|
||||
\echo drop TABLE attr_value
|
||||
drop TABLE attr_value cascade;
|
||||
\echo CREATE TABLE attr_value
|
||||
CREATE TABLE attr_value (
|
||||
jft_id integer references jnt_fic_att_value(jft_id),
|
||||
av_text text
|
||||
);
|
||||
|
||||
\echo drop TABLE attr_def
|
||||
drop TABLE attr_def cascade;
|
||||
\echo CREATE TABLE attr_def
|
||||
CREATE TABLE attr_def (
|
||||
ad_id integer DEFAULT nextval('s_attr_def'::text) primary key,
|
||||
ad_text text
|
||||
);
|
||||
|
||||
\echo drop TABLE attr_min
|
||||
drop TABLE attr_min cascade;
|
||||
\echo CREATE TABLE attr_min
|
||||
CREATE TABLE attr_min (
|
||||
frd_id integer references fiche_def_ref(frd_id),
|
||||
ad_id integer references attr_def(ad_id)
|
||||
);
|
||||
|
||||
\echo drop TABLE fiche
|
||||
drop TABLE fiche cascade;
|
||||
\echo CREATE TABLE fiche
|
||||
CREATE TABLE fiche (
|
||||
f_id integer DEFAULT nextval('s_fiche'::text) primary key,
|
||||
fd_id integer references fiche_def(fd_id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
\echo drop TABLE jnt_fic_att_value
|
||||
drop TABLE jnt_fic_att_value cascade;
|
||||
\echo CREATE TABLE jnt_fic_att_value
|
||||
CREATE TABLE jnt_fic_att_value (
|
||||
jft_id integer DEFAULT nextval('s_jnt_fic_att_value'::text) primary key,
|
||||
f_id integer references fiche(f_id),
|
||||
ad_id integer references attr_def(ad_id)
|
||||
);
|
||||
\echo drop attr_value
|
||||
drop table attr_value;
|
||||
\echo create table attr_value
|
||||
create table attr_value (
|
||||
jft_id integer references jnt_fic_att_value(jft_id),
|
||||
av_text text);
|
||||
|
||||
\echo drop table jnt_fic_attr
|
||||
drop table jnt_fic_attr
|
||||
;
|
||||
\echo create table jnt_fic_attr
|
||||
create table jnt_fic_attr (
|
||||
fd_id integer references fiche_def(fd_id),
|
||||
ad_id integer references attr_def(ad_id))
|
||||
;
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\connect - phpcompta
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
--
|
||||
-- Data for TOC entry 1 (OID 21236)
|
||||
-- Name: attr_def; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO attr_def VALUES (1, 'Nom');
|
||||
INSERT INTO attr_def VALUES (2, 'Taux TVA');
|
||||
INSERT INTO attr_def VALUES (3, 'Numéro de compte');
|
||||
INSERT INTO attr_def VALUES (4, 'Nom de la banque');
|
||||
INSERT INTO attr_def VALUES (5, 'Poste Comptable');
|
||||
INSERT INTO attr_def VALUES (6, 'Prix vente');
|
||||
INSERT INTO attr_def VALUES (7, 'Prix achat');
|
||||
INSERT INTO attr_def VALUES (8, 'Durée Amortissement');
|
||||
INSERT INTO attr_def VALUES (9, 'Description');
|
||||
INSERT INTO attr_def VALUES (10, 'Date début');
|
||||
INSERT INTO attr_def VALUES (11, 'Montant initial');
|
||||
INSERT INTO attr_def VALUES (12, 'Personne de contact ');
|
||||
INSERT INTO attr_def VALUES (13, 'numéro de tva ');
|
||||
INSERT INTO attr_def VALUES (14, 'Adresse ');
|
||||
INSERT INTO attr_def VALUES (15, 'code postale ');
|
||||
INSERT INTO attr_def VALUES (16, 'pays ');
|
||||
INSERT INTO attr_def VALUES (17, 'téléphone ');
|
||||
INSERT INTO attr_def VALUES (18, 'email ');
|
||||
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\connect - phpcompta
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
--
|
||||
-- Data for TOC entry 1 (OID 21206)
|
||||
-- Name: fiche_def_ref; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO fiche_def_ref VALUES (1, 'Vente Service', 700);
|
||||
INSERT INTO fiche_def_ref VALUES (2, 'Marchandises achat ', 604);
|
||||
-- INSERT INTO fiche_def_ref VALUES (2, 'Marchandises Vente & Achat', 604,704);
|
||||
INSERT INTO fiche_def_ref VALUES (3, 'Achat Service et biens divers', 61);
|
||||
INSERT INTO fiche_def_ref VALUES (4, 'Banque', 5500);
|
||||
INSERT INTO fiche_def_ref VALUES (5, 'Prêt > a un an', 17);
|
||||
INSERT INTO fiche_def_ref VALUES (6, 'Prêt < a un an', 430);
|
||||
INSERT INTO fiche_def_ref VALUES (8, 'Fournisseurs', 440);
|
||||
INSERT INTO fiche_def_ref VALUES (9, 'Clients', 400);
|
||||
INSERT INTO fiche_def_ref VALUES (10, 'Salaire Administrateur', 6200);
|
||||
INSERT INTO fiche_def_ref VALUES (11, 'Salaire Ouvrier', 6203);
|
||||
INSERT INTO fiche_def_ref VALUES (12, 'Salaire Employé', 6202);
|
||||
INSERT INTO fiche_def_ref VALUES (13, 'Dépenses non admises', 674);
|
||||
INSERT INTO fiche_def_ref VALUES (7, 'Matériel à amortir', 24);
|
||||
|
||||
INSERT INTO fiche_def_ref VALUES (14, 'Marchandises Vente ', 704);
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\connect - phpcompta
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
--
|
||||
-- Data for TOC entry 1 (OID 21244)
|
||||
-- Name: attr_min; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO attr_min VALUES (1, 1);
|
||||
INSERT INTO attr_min VALUES (1, 2);
|
||||
INSERT INTO attr_min VALUES (2, 1);
|
||||
INSERT INTO attr_min VALUES (2, 2);
|
||||
INSERT INTO attr_min VALUES (3, 1);
|
||||
INSERT INTO attr_min VALUES (3, 2);
|
||||
INSERT INTO attr_min VALUES (4, 1);
|
||||
INSERT INTO attr_min VALUES (4, 3);
|
||||
INSERT INTO attr_min VALUES (4, 4);
|
||||
INSERT INTO attr_min VALUES (4, 12);
|
||||
INSERT INTO attr_min VALUES (4, 13);
|
||||
INSERT INTO attr_min VALUES (4, 14);
|
||||
INSERT INTO attr_min VALUES (4, 15);
|
||||
INSERT INTO attr_min VALUES (4, 16);
|
||||
INSERT INTO attr_min VALUES (4, 17);
|
||||
INSERT INTO attr_min VALUES (4, 18);
|
||||
INSERT INTO attr_min VALUES (8, 1);
|
||||
INSERT INTO attr_min VALUES (8, 12);
|
||||
INSERT INTO attr_min VALUES (8, 13);
|
||||
INSERT INTO attr_min VALUES (8, 14);
|
||||
INSERT INTO attr_min VALUES (8, 15);
|
||||
INSERT INTO attr_min VALUES (8, 16);
|
||||
INSERT INTO attr_min VALUES (8, 17);
|
||||
INSERT INTO attr_min VALUES (8, 18);
|
||||
INSERT INTO attr_min VALUES (9, 1);
|
||||
INSERT INTO attr_min VALUES (9, 12);
|
||||
INSERT INTO attr_min VALUES (9, 13);
|
||||
INSERT INTO attr_min VALUES (9, 14);
|
||||
INSERT INTO attr_min VALUES (9, 15);
|
||||
INSERT INTO attr_min VALUES (9, 16);
|
||||
INSERT INTO attr_min VALUES (9, 17);
|
||||
INSERT INTO attr_min VALUES (9, 18);
|
||||
INSERT INTO attr_min VALUES (1, 6);
|
||||
INSERT INTO attr_min VALUES (1, 7);
|
||||
INSERT INTO attr_min VALUES (2, 6);
|
||||
INSERT INTO attr_min VALUES (2, 7);
|
||||
INSERT INTO attr_min VALUES (3, 7);
|
||||
INSERT INTO attr_min VALUES (14, 1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ insert into jrn_type values ('OD','Op
|
|||
|
||||
insert into jrn_def values (1,'Financier','5* ','5*',null,null,5,5,false,null,'FIN','FIN-01');
|
||||
insert into jrn_def values (2,'Vente','7*','4*',null,null,1,3,true,'échéance','VEN','VEN-01');
|
||||
insert into jrn_def values (3,'Achat','6*','4*',1,3,true,'échéance','ACH','ACH-01');
|
||||
insert into jrn_def values (3,'Achat','6*','4*',null,null,1,3,true,'échéance','ACH','ACH-01');
|
||||
insert into jrn_def values (4,'Opération Diverses',null,null,null,null,5,5,false,null,'OD','OD-01');
|
||||
|
||||
create sequence s_jrnx;
|
||||
|
|
@ -66,8 +66,9 @@ create table jrn (
|
|||
jr_montant float not null,
|
||||
jr_comment text ,
|
||||
jr_date date ,
|
||||
jr_ech date ,
|
||||
jr_grpt_id integer not null,
|
||||
jr_rapt integer,
|
||||
jr_rapt text,
|
||||
jr_internal text,
|
||||
jr_tech_date timestamp not null default now(),
|
||||
jr_tech_per integer not null
|
||||
|
|
|
|||
|
|
@ -27,18 +27,42 @@ create table jrn_action (
|
|||
ja_lang text default 'FR',
|
||||
ja_jrn_type char(3) references jrn_type(jrn_type_id)
|
||||
);
|
||||
insert into jrn_action (ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) VALUES (
|
||||
'Nouvelle','Création d\'une facture','user_jrn.php','action=insert_vente','VEN'
|
||||
);
|
||||
insert into jrn_action (ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) VALUES (
|
||||
'Voir','Voir toutes les factures','user_jrn.php','action=voir_vente','VEN'
|
||||
);
|
||||
insert into jrn_action (ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) VALUES (
|
||||
'Voir Impayés','Voir toutes les factures non payées','user_jrn.php','action=voir_vente_non_paye','VEN'
|
||||
);
|
||||
insert into jrn_action (ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) VALUES (
|
||||
'Impression','Impression du journal','user_jrn.php','action=impress','VEN'
|
||||
);
|
||||
insert into jrn_action (ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) VALUES (
|
||||
'Recherche','Recherche dans le journal','user_jrn.php','action=search_ven','VEN'
|
||||
);
|
||||
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
\connect - phpcompta
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
--
|
||||
-- Data for TOC entry 1 (OID 17800)
|
||||
-- Name: jrn_action; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
-- menu vente
|
||||
INSERT INTO jrn_action VALUES (2, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'VEN');
|
||||
INSERT INTO jrn_action VALUES (4, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'VEN');
|
||||
INSERT INTO jrn_action VALUES (6, 'Recherche', 'Recherche dans le journal', 'user_jrn.php', 'action=search', 'FR', 'VEN');
|
||||
INSERT INTO jrn_action VALUES (1, 'Nouvelle', 'Création d''une facture', 'user_jrn.php', 'action=insert_vente&blank', 'FR', 'VEN');
|
||||
INSERT INTO jrn_action VALUES (5, 'Impression', 'Impression du journal', 'impress.php', 'filter=1&action=viewpdf&type=jrn', 'FR', 'VEN');
|
||||
|
||||
-- menu achat
|
||||
INSERT INTO jrn_action VALUES (10, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'ACH');
|
||||
INSERT INTO jrn_action VALUES (12, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ACH');
|
||||
INSERT INTO jrn_action VALUES (14, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'ACH');
|
||||
INSERT INTO jrn_action VALUES (16, 'Impression', 'Impression du journal', 'impress.php', 'filter=1&action=viewpdf&type=jrn', 'FR', 'ACH');
|
||||
INSERT INTO jrn_action VALUES (18, 'Recherche', 'Recherche dans le journal', 'user_jrn.php', 'action=search', 'FR', 'ACH');
|
||||
|
||||
-- menu banque
|
||||
INSERT INTO jrn_action VALUES (20, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'FIN');
|
||||
INSERT INTO jrn_action VALUES (22, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'FIN');
|
||||
INSERT INTO jrn_action VALUES (24, 'Impression', 'Impression du journal', 'impress.php', 'filter=1&action=viewpdf&type=jrn', 'FR', 'FIN');
|
||||
INSERT INTO jrn_action VALUES (26, 'Recherche', 'Recherche dans le journal', 'user_jrn.php', 'action=search', 'FR', 'FIN');
|
||||
|
||||
-- Menu opérations diverses
|
||||
INSERT INTO jrn_action VALUES (30, 'Nouveau', null, 'user_jrn.php', 'action=new&blank', 'FR', 'OD');
|
||||
INSERT INTO jrn_action VALUES (32, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'OD');
|
||||
INSERT INTO jrn_action VALUES (34, 'Impression', 'Impression du journal', 'impress.php', 'filter=1&action=viewpdf&type=jrn', 'FR', 'OD');
|
||||
INSERT INTO jrn_action VALUES (36, 'Recherche', 'Recherche dans le journal', 'user_jrn.php', 'action=search', 'FR', 'OD');
|
||||
|
||||
|
|
|
|||
30
sql/tva_rate.sql
Normal file
30
sql/tva_rate.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
--
|
||||
-- TOC entry 2 (OID 51704)
|
||||
-- Name: tva_rate; Type: TABLE; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE TABLE tva_rate (
|
||||
tva_id integer NOT NULL,
|
||||
tva_label text NOT NULL,
|
||||
tva_rate double precision DEFAULT 0.0 NOT NULL,
|
||||
tva_comment text,
|
||||
tva_poste text
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 3 (OID 51704)
|
||||
-- Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO tva_rate VALUES (1, '21%', 0.21, 'Tva applicable à tout ce qui bien et service divers', '411,451');
|
||||
INSERT INTO tva_rate VALUES (3, '0%', 0, 'Tva applicable lors de vente/achat intracommunautaire', '411,451');
|
||||
INSERT INTO tva_rate VALUES (2, '6%', 0.06, 'Tva applicable aux journaux et livres', '411,451');
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue