[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 09/19: Database : correct the scripts for cre
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 09/19: Database : correct the scripts for creating DB and adapt to postgreSQL 12 |
Date: |
Sat, 31 Aug 2024 17:46:28 -0400 (EDT) |
sparkyx pushed a commit to branch pre-stable
in repository noalyss.
commit 062ed82febb89a1184de0d6543265f3b95429c26
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Aug 24 11:59:55 2024 +0200
Database : correct the scripts for creating DB and adapt to postgreSQL 12
---
html/install.php | 76 +-
include/class/package_template.class.php | 29 +-
include/sql/account_repository/constraint.sql | 41 -
include/sql/account_repository/data.sql | 52 +-
include/sql/account_repository/index.sql | 8 +-
include/sql/account_repository/make-sql | 34 +-
include/sql/account_repository/schema.sql | 137 +-
include/sql/account_repository/sequence.sql | 18 +-
include/sql/account_repository/table.sql | 26 +-
include/sql/mod1/comment.sql | 495 +--
include/sql/mod1/constraint.sql | 908 +++--
include/sql/mod1/data.sql | 3466 ++++++++++---------
include/sql/mod1/function.sql | 1004 +++---
include/sql/mod1/index.sql | 67 +-
include/sql/mod1/make-sql | 26 -
include/sql/mod1/schema.sql | 4608 +++++++++++++++++++------
include/sql/mod1/sequence.sql | 443 ++-
include/sql/mod1/table.sql | 434 ++-
include/sql/mod1/view.sql | 757 +++-
include/sql/mod2/data.sql | 2699 ++++++++-------
include/sql/mod2/make-sql | 27 +-
21 files changed, 10058 insertions(+), 5297 deletions(-)
diff --git a/html/install.php b/html/install.php
index 90e517ea8..dd0639ee5 100644
--- a/html/install.php
+++ b/html/install.php
@@ -404,6 +404,8 @@ echo "<li>";
echo "</li>";
}
+
+
//---------------------------------------------------------------------------------------
// Check php modules
//---------------------------------------------------------------------------------------
@@ -484,17 +486,20 @@ if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI"))
?>
<h2><?php echo _('Base de données')?></h2>
<?php
- // Verify Psql version
- //--
+//-------------------------------------------------------------------------------------------
+// Verify Psql version
+//
+//-------------------------------------------------------------------------------------------
+
$sql="select setting from pg_settings where name='server_version'";
$version=$cn->get_value($sql);
echo _("Version base de données :"),$version;
$majeur=explode(".",$version);
-if ( $majeur[0] < 10 )
+if ( $majeur[0] < 12 )
{
?>
- <p><?php echo $failed . _(" Vous devez absolument utiliser au minimum une
version 10 de PostGresql, si votre distribution n'en
+ <p><?php echo $failed . _(" Vous devez utiliser au minimum une version 12
de PostGresql, si votre distribution n'en
offre pas, installez-en une en la compilant. Lisez attentivement la notice sur
postgresql.org pour migrer
vos bases de données")?>
</p>
@@ -594,19 +599,48 @@ if ($account == 0 ) {
echo "Creation of ".domaine."account_repository";
if ( DEBUGNOALYSS == 0 ) ob_start();
$cn->exec_sql("create database ".domaine."account_repository
encoding='utf8'");
- $cn=new Database();
- $cn->start();
- $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/schema.sql");
- $cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/data.sql");
-
$cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql");
+ $repo=new Database();
+ $sql_trigger_activate="
+ create or replace procedure public.trigger_activate(to_enable bool)
+language plpgsql
+as
+$$
+declare
+ rec1 record;
+ cmd text;
+begin
+for rec1 in (select relname,nspname
+ from pg_catalog.pg_class pc join pg_catalog.pg_namespace pn on
(pn.oid=pc.relnamespace)
+ where pn.nspname in ('public','comptaproc') and relhastriggers
is true) loop
+ if to_enable is false then
+ cmd=format('alter table %s.%s disable trigger
all',rec1.nspname,rec1.relname);
+ else
+ cmd=format('alter table %s.%s enable trigger
all',rec1.nspname,rec1.relname);
+ end if;
+ execute cmd;
+ raise notice '%',cmd;
+ end loop;
+end
+
+$$;
+ ";
+
+ $repo->exec_sql($sql_trigger_activate);
+ $repo->start();
+
$repo->execute_script(NOALYSS_INCLUDE."/sql/account_repository/schema.sql");
+ $repo->exec_sql("call public.trigger_activate(false) ");
+ $repo->execute_script(NOALYSS_INCLUDE."/sql/account_repository/data.sql");
+
+ $repo->commit($cn);
/* update name administrator */
$cadmin=NOALYSS_ADMINISTRATOR;
$cpassword_admin=NOALYSS_ADMIN_PASSWORD;
- $cn->exec_sql("update ac_users set
use_login=$1,use_pass=md5($2),use_active=1 where use_id=1",
+ $repo->exec_sql("update public.ac_users set
use_login=$1,use_pass=md5($2),use_active=1 where use_id=1",
array(strtolower($cadmin),$cpassword_admin));
- $cn->commit($cn);
+ $repo->exec_sql("call public.trigger_activate(true) ");
+ $repo->exec_sql("drop procedure public.trigger_activate ");
if ( DEBUGNOALYSS == 0 )
{
ob_end_clean();
@@ -620,27 +654,35 @@ if ($account == 0 ) {
$cn->exec_sql("create database ".domaine."mod1 encoding='utf8'");
$cn=new Database(1,'mod');
+ $cn->exec_sql($sql_trigger_activate);
$cn->start();
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
+ $cn->exec_sql("call public.trigger_activate(false) ");
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/data.sql');
- $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
- $cn->commit();
+ $cn->commit();
+ $cn->exec_sql("call public.trigger_activate(true) ");
+ $cn->exec_sql("drop procedure public.trigger_activate");
if ( DEBUGNOALYSS == 0 )
{
ob_end_clean();
}
- echo _("Creation of Modele 2");
+ echo _("Creation of Modele 2");
$cn->exec_sql("create database ".domaine."mod2 encoding='utf8'");
$cn=new Database(2,'mod');
+ $cn->exec_sql($sql_trigger_activate);
+
$cn->start();
if ( DEBUGNOALYSS == 0 ) { ob_start(); }
+
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/schema.sql');
+ $cn->exec_sql("call public.trigger_activate(false) ");
$cn->execute_script(NOALYSS_INCLUDE.'/sql/mod2/data.sql');
- $cn->execute_script(NOALYSS_INCLUDE.'/sql/mod1/constraint.sql');
- $cn->commit();
+ $cn->commit();
+ $cn->exec_sql("call public.trigger_activate(true) ");
+ $cn->exec_sql("drop procedure public.trigger_activate");
if ( DEBUGNOALYSS == 0 ) ob_end_clean();
echo '<h1>'._('Important').'</h1>';
echo '<p>'._('Utilisateur administrateur'),' ',NOALYSS_ADMINISTRATOR,'</p>';
@@ -725,7 +767,7 @@ define ('ALLOWED_ADMIN',1);
$rep=new Database();
if (defined("NOALYSS_ADMINISTRATOR") && defined ("NOALYSS_ADMIN_PASSWORD"))
{
- $rep->exec_sql("update ac_users set use_login=$1 ,use_pass=md5($2)
+ $rep->exec_sql("update public.ac_users set use_login=$1 ,use_pass=md5($2)
where use_id=1",
array(strtolower(NOALYSS_ADMINISTRATOR),
NOALYSS_ADMIN_PASSWORD));
diff --git a/include/class/package_template.class.php
b/include/class/package_template.class.php
index 85c7747f2..bcd958c02 100644
--- a/include/class/package_template.class.php
+++ b/include/class/package_template.class.php
@@ -63,12 +63,39 @@ class Package_Template extends Package_Noalyss
$cn->exec_sql($sql);
$newdb=new Database($seq, 'mod');
+ $sql_trigger_activate="
+ create or replace procedure public.trigger_activate(to_enable bool)
+language plpgsql
+as
+$$
+declare
+ rec1 record;
+ cmd text;
+begin
+for rec1 in (select relname,nspname
+ from pg_catalog.pg_class pc join pg_catalog.pg_namespace pn on
(pn.oid=pc.relnamespace)
+ where pn.nspname in ('public','comptaproc') and relhastriggers
is true) loop
+ if to_enable is false then
+ cmd=format('alter table %s.%s disable trigger
all',rec1.nspname,rec1.relname);
+ else
+ cmd=format('alter table %s.%s enable trigger
all',rec1.nspname,rec1.relname);
+ end if;
+ execute cmd;
+ raise notice '%',cmd;
+ end loop;
+end
+$$;
+ ";
+
+ $newdb->exec_sql($sql_trigger_activate);
// Execute SQL Script
$newdb->execute_script($tmpdir.'/schema.sql');
+ $newdb->exec_sql("call public.trigger_activate(false) ");
$newdb->execute_script($tmpdir.'/data.sql');
$newdb->execute_script($tmpdir.'/constraint.sql');
-
+ $newdb->exec_sql("call public.trigger_activate(true) ");
+ $newdb->exec_sql("drop procedure public.trigger_activate ");
// Register into account_repository, we add the seq number for
avoiding duplicate
$description = sprintf(_("Installé le %s"),date("d-m-Y h:i:s"));
$cn->exec_sql(" insert into modeledef (mod_id,mod_name,mod_desc)
values ($1,$2,$3)",
diff --git a/include/sql/account_repository/constraint.sql
b/include/sql/account_repository/constraint.sql
index d909222b5..6aa16aa8f 100644
--- a/include/sql/account_repository/constraint.sql
+++ b/include/sql/account_repository/constraint.sql
@@ -2,44 +2,3 @@
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
-ALTER TABLE ONLY audit_connect ALTER COLUMN ac_id SET DEFAULT
nextval('audit_connect_ac_id_seq'::regclass);
-ALTER TABLE ONLY dossier_sent_email ALTER COLUMN id SET DEFAULT
nextval('dossier_sent_email_id_seq'::regclass);
-ALTER TABLE ONLY ac_dossier
- ADD CONSTRAINT ac_dossier_dos_name_key UNIQUE (dos_name);
-ALTER TABLE ONLY ac_dossier
- ADD CONSTRAINT ac_dossier_pkey PRIMARY KEY (dos_id);
-ALTER TABLE ONLY ac_users
- ADD CONSTRAINT ac_users_pkey PRIMARY KEY (use_id);
-ALTER TABLE ONLY ac_users
- ADD CONSTRAINT ac_users_use_login_key UNIQUE (use_login);
-ALTER TABLE ONLY audit_connect
- ADD CONSTRAINT audit_connect_pkey PRIMARY KEY (ac_id);
-ALTER TABLE ONLY dossier_sent_email
- ADD CONSTRAINT de_date_dos_id_ux UNIQUE (de_date, dos_id);
-ALTER TABLE ONLY dossier_sent_email
- ADD CONSTRAINT dossier_sent_email_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY jnt_use_dos
- ADD CONSTRAINT jnt_use_dos_pkey PRIMARY KEY (jnt_id);
-ALTER TABLE ONLY modeledef
- ADD CONSTRAINT modeledef_pkey PRIMARY KEY (mod_id);
-ALTER TABLE ONLY user_global_pref
- ADD CONSTRAINT pk_user_global_pref PRIMARY KEY (user_id, parameter_type);
-ALTER TABLE ONLY progress
- ADD CONSTRAINT progress_pkey PRIMARY KEY (p_id);
-ALTER TABLE ONLY recover_pass
- ADD CONSTRAINT recover_pass_pkey PRIMARY KEY (request);
-ALTER TABLE ONLY jnt_use_dos
- ADD CONSTRAINT use_id_dos_id_uniq UNIQUE (use_id, dos_id);
-ALTER TABLE ONLY version
- ADD CONSTRAINT version_pkey PRIMARY KEY (val);
-ALTER TABLE ONLY recover_pass
- ADD CONSTRAINT ac_users_recover_pass_fk FOREIGN KEY (use_id) REFERENCES
ac_users(use_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY dossier_sent_email
- ADD CONSTRAINT de_ac_dossier_fk FOREIGN KEY (dos_id) REFERENCES
ac_dossier(dos_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY user_global_pref
- ADD CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES
ac_users(use_login) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jnt_use_dos
- ADD CONSTRAINT jnt_use_dos_dos_id_fkey FOREIGN KEY (dos_id) REFERENCES
ac_dossier(dos_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jnt_use_dos
- ADD CONSTRAINT jnt_use_dos_use_id_fkey FOREIGN KEY (use_id) REFERENCES
ac_users(use_id);
-CREATE TRIGGER limit_user_trg BEFORE INSERT OR UPDATE ON audit_connect FOR
EACH ROW EXECUTE PROCEDURE limit_user();
diff --git a/include/sql/account_repository/data.sql
b/include/sql/account_repository/data.sql
index c97cbdebc..7495da312 100644
--- a/include/sql/account_repository/data.sql
+++ b/include/sql/account_repository/data.sql
@@ -1,85 +1,91 @@
+set search_path = public,comptaproc,pg_catalog ;
+
SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
+SET xmloption = content;
SET client_min_messages = warning;
+SET row_security = off;
-
-INSERT INTO ac_users (use_id, use_first_name, use_name, use_login, use_active,
use_pass, use_admin, use_email) VALUES (4, 'demo', 'demo', 'demo', 0,
'fe01ce2a7fbac8fafaed7c982a04e229', 0, NULL);
-INSERT INTO ac_users (use_id, use_first_name, use_name, use_login, use_active,
use_pass, use_admin, use_email) VALUES (1, NULL, NULL, 'admin', 1,
'b1cc88e1907cde80cb2595fa793b3da9', 1, NULL);
+INSERT INTO public.ac_users (use_id, use_first_name, use_name, use_login,
use_active, use_pass, use_admin, use_email) VALUES (4, 'demo', 'demo', 'demo',
0, 'fe01ce2a7fbac8fafaed7c982a04e229', 0, NULL);
+INSERT INTO public.ac_users (use_id, use_first_name, use_name, use_login,
use_active, use_pass, use_admin, use_email) VALUES (1, NULL, NULL, 'admin', 1,
'04cd7fc709122459e51c439171c43209', 1, NULL);
-SELECT pg_catalog.setval('audit_connect_ac_id_seq', 1, false);
-SELECT pg_catalog.setval('dossier_id', 24, true);
+INSERT INTO public.modeledef (mod_id, mod_name, mod_desc) VALUES (1, '(BE)
Basique', 'Comptabilité Belge, à adapter');
+INSERT INTO public.modeledef (mod_id, mod_name, mod_desc) VALUES (2, '(FR)
Basique', 'Comptabilité Française, à adapter');
-SELECT pg_catalog.setval('dossier_sent_email_id_seq', 1, false);
-INSERT INTO modeledef (mod_id, mod_name, mod_desc) VALUES (1, '(BE) Basique',
'Comptabilité Belge, à adapter');
-INSERT INTO modeledef (mod_id, mod_name, mod_desc) VALUES (2, '(FR) Basique',
'Comptabilité Française, à adapter');
+INSERT INTO public.theme (the_name, the_filestyle, the_filebutton) VALUES
('Light', 'style-light.css', NULL);
+INSERT INTO public.theme (the_name, the_filestyle, the_filebutton) VALUES
('Classique', 'style-classic.css', NULL);
+INSERT INTO public.theme (the_name, the_filestyle, the_filebutton) VALUES
('Classic7', 'style-classic7.css', NULL);
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('demo', 'PAGESIZE', '50');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('demo', 'LANG', 'fr_FR.utf8');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('admin', 'PAGESIZE', '50');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('admin', 'LANG', 'fr_FR.utf8');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('admin', 'TOPMENU', 'TEXT');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('demo', 'THEME', 'Classic7');
+INSERT INTO public.user_global_pref (user_id, parameter_type, parameter_value)
VALUES ('admin', 'THEME', 'Classic7');
+INSERT INTO public.version (val) VALUES (18);
-SELECT pg_catalog.setval('s_modid', 8, true);
+SELECT pg_catalog.setval('public.audit_connect_ac_id_seq', 1, false);
-SELECT pg_catalog.setval('seq_jnt_use_dos', 28, true);
+SELECT pg_catalog.setval('public.dossier_id', 24, true);
-SELECT pg_catalog.setval('seq_priv_user', 12, true);
+SELECT pg_catalog.setval('public.dossier_sent_email_id_seq', 1, false);
-INSERT INTO theme (the_name, the_filestyle, the_filebutton) VALUES ('Light',
'style-light.css', NULL);
-INSERT INTO theme (the_name, the_filestyle, the_filebutton) VALUES
('Classique', 'style-classic.css', NULL);
-INSERT INTO theme (the_name, the_filestyle, the_filebutton) VALUES
('Classic7', 'style-classic7.css', NULL);
+SELECT pg_catalog.setval('public.s_modid', 8, true);
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('demo', 'PAGESIZE', '50');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('demo', 'LANG', 'fr_FR.utf8');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('admin', 'PAGESIZE', '50');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('admin', 'LANG', 'fr_FR.utf8');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('admin', 'TOPMENU', 'TEXT');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('demo', 'THEME', 'Classic7');
-INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES
('admin', 'THEME', 'Classic7');
+SELECT pg_catalog.setval('public.seq_jnt_use_dos', 28, true);
-SELECT pg_catalog.setval('users_id', 5, true);
+SELECT pg_catalog.setval('public.seq_priv_user', 12, true);
-INSERT INTO version (val) VALUES (18);
+SELECT pg_catalog.setval('public.users_id', 5, true);
diff --git a/include/sql/account_repository/index.sql
b/include/sql/account_repository/index.sql
index 45898c221..3ffa5acbd 100644
--- a/include/sql/account_repository/index.sql
+++ b/include/sql/account_repository/index.sql
@@ -1,4 +1,4 @@
-CREATE INDEX audit_connect_ac_user ON audit_connect USING btree (ac_user);
-CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id);
-CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id);
-CREATE INDEX fki_ac_users_recover_pass_fk ON recover_pass USING btree (use_id);
+CREATE INDEX audit_connect_ac_user ON public.audit_connect USING btree
(ac_user);
+CREATE INDEX fk_jnt_dos_id ON public.jnt_use_dos USING btree (dos_id);
+CREATE INDEX fk_jnt_use_dos ON public.jnt_use_dos USING btree (use_id);
+CREATE INDEX fki_ac_users_recover_pass_fk ON public.recover_pass USING btree
(use_id);
diff --git a/include/sql/account_repository/make-sql
b/include/sql/account_repository/make-sql
index 74a29558b..1a6d86df6 100755
--- a/include/sql/account_repository/make-sql
+++ b/include/sql/account_repository/make-sql
@@ -4,39 +4,15 @@
# under GPL license
#
-export TEMPLATE=${DOMAIN}account_repository
+#export TEMPLATE=${DOMAIN}account_repository
+export TEMPLATE=account_repository
+
pg_dump -O -U dany -s $TEMPLATE|grep -v "COMMENT ON SCHEMA public IS 'Standard
public schema';" |sed "/^--/d" > schema.sql
sed -i -e "/COMMENT ON EXTENSION/d" schema.sql
sed -i -e "/CREATE EXTENSION/d" schema.sql
-awk '/SEQUENCE/,/;/ { print $0;}' < schema.sql > sequence.sql
-awk '/CREATE DOMAIN/,/;/ { print $0;}' < schema.sql > table.sql
-awk '/CREATE TABLE/,/;/ { print $0;}' < schema.sql >> table.sql
-awk '/CREATE VIEW/,/;/ { print $0;}' < schema.sql > view.sql
-awk '/INDEX/,/;/ { print $0;}' < schema.sql > index.sql
-(
-echo " SET client_encoding = 'utf8';"
-echo " SET check_function_bodies = false;"
-echo " SET client_min_messages = warning;"
-echo "SET search_path = public, pg_catalog;"
-)> constraint.sql
-
-
-awk '/ALTER TABLE/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/CREATE TRIGGER/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/COMMENT ON CONSTRAINT/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/COMMENT ON TRIGGER/,/;/ { print $0;}' < schema.sql >> constraint.sql
-
-# function in XML
-## awk 'BEGIN{print "<PROCEDURES>";} /CREATE FUNCTION/,/\$\$;/ { if (/CREATE
FUNCTION/) {print "<procedure>";} if (/\$\$;/) {print "</procedure>";} print
$0;} END { print "</PROCEDURES>";}' < schema.sql
-awk '/CREATE FUNCTION/,/\$\$;/ { print $0;}' < schema.sql > function.sql
-awk '/COMMENT/,/;/ {print $0;}' < schema.sql > comment.sql
-
-sed -i -e "/REVOKE /d" -e "/GRANT /d" -e "/ALTER TABLE.*/d" -e "/ADD
CONSTRAINT/d" -e "/CREATE PROCEDURAL/d" -e "/CREATE TRIGGER/d" -e "/COMMENT ON
CONSTRAINT/d" -e "/COMMENT ON TRIGGER/d" schema.sql
-
-
-grep setval schema.sql >> sequence.sql
-pg_dump -O -U dany --data-only --column-inserts -O ${TEMPLATE}|sed "/^--/d" |
sed -e "/SET search_path/d" > data.sql
+echo "set search_path = public,comptaproc,pg_catalog ;" > data.sql
+pg_dump -O -U dany --data-only --column-inserts -O ${TEMPLATE}|sed "/^--/d" |
sed -e "/SET search_path/d" >> data.sql
diff --git a/include/sql/account_repository/schema.sql
b/include/sql/account_repository/schema.sql
index de2bf0324..ec3f51aad 100644
--- a/include/sql/account_repository/schema.sql
+++ b/include/sql/account_repository/schema.sql
@@ -1,20 +1,18 @@
+
SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
+SET xmloption = content;
SET client_min_messages = warning;
+SET row_security = off;
-
-
-
-
-
-SET search_path = public, pg_catalog;
-
-
-CREATE FUNCTION limit_user() RETURNS trigger
+CREATE FUNCTION public.limit_user() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -25,7 +23,7 @@ end; $$;
-CREATE FUNCTION upgrade_repo(p_version integer) RETURNS void
+CREATE FUNCTION public.upgrade_repo(p_version integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -43,22 +41,23 @@ $$;
SET default_tablespace = '';
+SET default_table_access_method = heap;
-CREATE TABLE ac_dossier (
+CREATE TABLE public.ac_dossier (
dos_id integer DEFAULT nextval(('dossier_id'::text)::regclass) NOT NULL,
dos_name text NOT NULL,
dos_description text,
- dos_email integer DEFAULT (-1)
+ dos_email integer DEFAULT '-1'::integer
);
-COMMENT ON COLUMN ac_dossier.dos_email IS 'Max emails per day : 0 none , -1
unlimited or max value';
+COMMENT ON COLUMN public.ac_dossier.dos_email IS 'Max emails per day : 0 none
, -1 unlimited or max value';
-CREATE TABLE ac_users (
+CREATE TABLE public.ac_users (
use_id integer DEFAULT nextval(('users_id'::text)::regclass) NOT NULL,
use_first_name text,
use_name text,
@@ -72,11 +71,11 @@ CREATE TABLE ac_users (
-COMMENT ON COLUMN ac_users.use_email IS 'Email of the user';
+COMMENT ON COLUMN public.ac_users.use_email IS 'Email of the user';
-CREATE TABLE audit_connect (
+CREATE TABLE public.audit_connect (
ac_id integer NOT NULL,
ac_user text,
ac_date timestamp without time zone DEFAULT now(),
@@ -84,12 +83,12 @@ CREATE TABLE audit_connect (
ac_state text,
ac_module text,
ac_url text,
- CONSTRAINT valid_state CHECK ((((ac_state = 'FAIL'::text) OR (ac_state =
'SUCCESS'::text)) OR (ac_state = 'AUDIT'::text)))
+ CONSTRAINT valid_state CHECK (((ac_state = 'FAIL'::text) OR (ac_state =
'SUCCESS'::text) OR (ac_state = 'AUDIT'::text)))
);
-CREATE SEQUENCE audit_connect_ac_id_seq
+CREATE SEQUENCE public.audit_connect_ac_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -98,11 +97,11 @@ CREATE SEQUENCE audit_connect_ac_id_seq
-ALTER SEQUENCE audit_connect_ac_id_seq OWNED BY audit_connect.ac_id;
+ALTER SEQUENCE public.audit_connect_ac_id_seq OWNED BY
public.audit_connect.ac_id;
-CREATE SEQUENCE dossier_id
+CREATE SEQUENCE public.dossier_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -111,7 +110,7 @@ CREATE SEQUENCE dossier_id
-CREATE TABLE dossier_sent_email (
+CREATE TABLE public.dossier_sent_email (
id integer NOT NULL,
de_date character varying(8) NOT NULL,
de_sent_email integer NOT NULL,
@@ -120,27 +119,27 @@ CREATE TABLE dossier_sent_email (
-COMMENT ON TABLE dossier_sent_email IS 'Count the sent email by folder';
+COMMENT ON TABLE public.dossier_sent_email IS 'Count the sent email by folder';
-COMMENT ON COLUMN dossier_sent_email.id IS 'primary key';
+COMMENT ON COLUMN public.dossier_sent_email.id IS 'primary key';
-COMMENT ON COLUMN dossier_sent_email.de_date IS 'Date YYYYMMDD';
+COMMENT ON COLUMN public.dossier_sent_email.de_date IS 'Date YYYYMMDD';
-COMMENT ON COLUMN dossier_sent_email.de_sent_email IS 'Number of sent emails';
+COMMENT ON COLUMN public.dossier_sent_email.de_sent_email IS 'Number of sent
emails';
-COMMENT ON COLUMN dossier_sent_email.dos_id IS 'Link to ac_dossier';
+COMMENT ON COLUMN public.dossier_sent_email.dos_id IS 'Link to ac_dossier';
-CREATE SEQUENCE dossier_sent_email_id_seq
+CREATE SEQUENCE public.dossier_sent_email_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -149,11 +148,11 @@ CREATE SEQUENCE dossier_sent_email_id_seq
-ALTER SEQUENCE dossier_sent_email_id_seq OWNED BY dossier_sent_email.id;
+ALTER SEQUENCE public.dossier_sent_email_id_seq OWNED BY
public.dossier_sent_email.id;
-CREATE TABLE jnt_use_dos (
+CREATE TABLE public.jnt_use_dos (
jnt_id integer DEFAULT nextval(('seq_jnt_use_dos'::text)::regclass) NOT
NULL,
use_id integer NOT NULL,
dos_id integer NOT NULL
@@ -161,7 +160,7 @@ CREATE TABLE jnt_use_dos (
-CREATE TABLE modeledef (
+CREATE TABLE public.modeledef (
mod_id integer DEFAULT nextval(('s_modid'::text)::regclass) NOT NULL,
mod_name text NOT NULL,
mod_desc text
@@ -169,7 +168,7 @@ CREATE TABLE modeledef (
-CREATE TABLE progress (
+CREATE TABLE public.progress (
p_id character varying(16) NOT NULL,
p_value numeric(5,2) NOT NULL,
p_created timestamp without time zone DEFAULT now()
@@ -177,7 +176,7 @@ CREATE TABLE progress (
-CREATE TABLE recover_pass (
+CREATE TABLE public.recover_pass (
use_id bigint NOT NULL,
request text NOT NULL,
password text NOT NULL,
@@ -189,7 +188,7 @@ CREATE TABLE recover_pass (
-CREATE SEQUENCE s_modid
+CREATE SEQUENCE public.s_modid
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -198,7 +197,7 @@ CREATE SEQUENCE s_modid
-CREATE SEQUENCE seq_jnt_use_dos
+CREATE SEQUENCE public.seq_jnt_use_dos
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -207,7 +206,7 @@ CREATE SEQUENCE seq_jnt_use_dos
-CREATE SEQUENCE seq_priv_user
+CREATE SEQUENCE public.seq_priv_user
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -216,7 +215,7 @@ CREATE SEQUENCE seq_priv_user
-CREATE TABLE theme (
+CREATE TABLE public.theme (
the_name text NOT NULL,
the_filestyle text,
the_filebutton text
@@ -224,7 +223,7 @@ CREATE TABLE theme (
-CREATE TABLE user_global_pref (
+CREATE TABLE public.user_global_pref (
user_id text NOT NULL,
parameter_type text NOT NULL,
parameter_value text
@@ -232,23 +231,23 @@ CREATE TABLE user_global_pref (
-COMMENT ON TABLE user_global_pref IS 'The user''s global parameter ';
+COMMENT ON TABLE public.user_global_pref IS 'The user''s global parameter ';
-COMMENT ON COLUMN user_global_pref.user_id IS 'user''s login ';
+COMMENT ON COLUMN public.user_global_pref.user_id IS 'user''s login ';
-COMMENT ON COLUMN user_global_pref.parameter_type IS 'the type of parameter ';
+COMMENT ON COLUMN public.user_global_pref.parameter_type IS 'the type of
parameter ';
-COMMENT ON COLUMN user_global_pref.parameter_value IS 'the value of parameter
';
+COMMENT ON COLUMN public.user_global_pref.parameter_value IS 'the value of
parameter ';
-CREATE SEQUENCE users_id
+CREATE SEQUENCE public.users_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -257,94 +256,132 @@ CREATE SEQUENCE users_id
-CREATE TABLE version (
+CREATE TABLE public.version (
val integer NOT NULL
);
+ALTER TABLE ONLY public.audit_connect ALTER COLUMN ac_id SET DEFAULT
nextval('public.audit_connect_ac_id_seq'::regclass);
+ALTER TABLE ONLY public.dossier_sent_email ALTER COLUMN id SET DEFAULT
nextval('public.dossier_sent_email_id_seq'::regclass);
+ALTER TABLE ONLY public.ac_dossier
+ ADD CONSTRAINT ac_dossier_dos_name_key UNIQUE (dos_name);
+ALTER TABLE ONLY public.ac_dossier
+ ADD CONSTRAINT ac_dossier_pkey PRIMARY KEY (dos_id);
+ALTER TABLE ONLY public.ac_users
+ ADD CONSTRAINT ac_users_pkey PRIMARY KEY (use_id);
+ALTER TABLE ONLY public.ac_users
+ ADD CONSTRAINT ac_users_use_login_key UNIQUE (use_login);
+ALTER TABLE ONLY public.audit_connect
+ ADD CONSTRAINT audit_connect_pkey PRIMARY KEY (ac_id);
+ALTER TABLE ONLY public.dossier_sent_email
+ ADD CONSTRAINT de_date_dos_id_ux UNIQUE (de_date, dos_id);
+ALTER TABLE ONLY public.dossier_sent_email
+ ADD CONSTRAINT dossier_sent_email_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.jnt_use_dos
+ ADD CONSTRAINT jnt_use_dos_pkey PRIMARY KEY (jnt_id);
+ALTER TABLE ONLY public.modeledef
+ ADD CONSTRAINT modeledef_pkey PRIMARY KEY (mod_id);
+ALTER TABLE ONLY public.user_global_pref
+ ADD CONSTRAINT pk_user_global_pref PRIMARY KEY (user_id, parameter_type);
+ALTER TABLE ONLY public.progress
+ ADD CONSTRAINT progress_pkey PRIMARY KEY (p_id);
+ALTER TABLE ONLY public.recover_pass
+ ADD CONSTRAINT recover_pass_pkey PRIMARY KEY (request);
+ALTER TABLE ONLY public.jnt_use_dos
+ ADD CONSTRAINT use_id_dos_id_uniq UNIQUE (use_id, dos_id);
+ALTER TABLE ONLY public.version
+ ADD CONSTRAINT version_pkey PRIMARY KEY (val);
-CREATE INDEX audit_connect_ac_user ON audit_connect USING btree (ac_user);
-
-
-
-CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id);
+CREATE INDEX audit_connect_ac_user ON public.audit_connect USING btree
(ac_user);
-CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id);
+CREATE INDEX fk_jnt_dos_id ON public.jnt_use_dos USING btree (dos_id);
-CREATE INDEX fki_ac_users_recover_pass_fk ON recover_pass USING btree (use_id);
+CREATE INDEX fk_jnt_use_dos ON public.jnt_use_dos USING btree (use_id);
+CREATE INDEX fki_ac_users_recover_pass_fk ON public.recover_pass USING btree
(use_id);
+CREATE TRIGGER limit_user_trg BEFORE INSERT OR UPDATE ON public.audit_connect
FOR EACH ROW EXECUTE FUNCTION public.limit_user();
+ALTER TABLE ONLY public.recover_pass
+ ADD CONSTRAINT ac_users_recover_pass_fk FOREIGN KEY (use_id) REFERENCES
public.ac_users(use_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.dossier_sent_email
+ ADD CONSTRAINT de_ac_dossier_fk FOREIGN KEY (dos_id) REFERENCES
public.ac_dossier(dos_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_global_pref
+ ADD CONSTRAINT fk_user_id FOREIGN KEY (user_id) REFERENCES
public.ac_users(use_login) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_use_dos
+ ADD CONSTRAINT jnt_use_dos_dos_id_fkey FOREIGN KEY (dos_id) REFERENCES
public.ac_dossier(dos_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_use_dos
+ ADD CONSTRAINT jnt_use_dos_use_id_fkey FOREIGN KEY (use_id) REFERENCES
public.ac_users(use_id);
diff --git a/include/sql/account_repository/sequence.sql
b/include/sql/account_repository/sequence.sql
index 32ecd65a5..d540158f7 100644
--- a/include/sql/account_repository/sequence.sql
+++ b/include/sql/account_repository/sequence.sql
@@ -1,42 +1,42 @@
-CREATE SEQUENCE audit_connect_ac_id_seq
+CREATE SEQUENCE public.audit_connect_ac_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE audit_connect_ac_id_seq OWNED BY audit_connect.ac_id;
-CREATE SEQUENCE dossier_id
+ALTER SEQUENCE public.audit_connect_ac_id_seq OWNED BY
public.audit_connect.ac_id;
+CREATE SEQUENCE public.dossier_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE dossier_sent_email_id_seq
+CREATE SEQUENCE public.dossier_sent_email_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE dossier_sent_email_id_seq OWNED BY dossier_sent_email.id;
-CREATE SEQUENCE s_modid
+ALTER SEQUENCE public.dossier_sent_email_id_seq OWNED BY
public.dossier_sent_email.id;
+CREATE SEQUENCE public.s_modid
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_jnt_use_dos
+CREATE SEQUENCE public.seq_jnt_use_dos
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_priv_user
+CREATE SEQUENCE public.seq_priv_user
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE users_id
+CREATE SEQUENCE public.users_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
diff --git a/include/sql/account_repository/table.sql
b/include/sql/account_repository/table.sql
index 59e07421e..36e0a2d15 100644
--- a/include/sql/account_repository/table.sql
+++ b/include/sql/account_repository/table.sql
@@ -1,10 +1,10 @@
-CREATE TABLE ac_dossier (
+CREATE TABLE public.ac_dossier (
dos_id integer DEFAULT nextval(('dossier_id'::text)::regclass) NOT NULL,
dos_name text NOT NULL,
dos_description text,
- dos_email integer DEFAULT (-1)
+ dos_email integer DEFAULT '-1'::integer
);
-CREATE TABLE ac_users (
+CREATE TABLE public.ac_users (
use_id integer DEFAULT nextval(('users_id'::text)::regclass) NOT NULL,
use_first_name text,
use_name text,
@@ -15,7 +15,7 @@ CREATE TABLE ac_users (
use_email text,
CONSTRAINT ac_users_use_active_check CHECK (((use_active = 0) OR
(use_active = 1)))
);
-CREATE TABLE audit_connect (
+CREATE TABLE public.audit_connect (
ac_id integer NOT NULL,
ac_user text,
ac_date timestamp without time zone DEFAULT now(),
@@ -23,30 +23,30 @@ CREATE TABLE audit_connect (
ac_state text,
ac_module text,
ac_url text,
- CONSTRAINT valid_state CHECK ((((ac_state = 'FAIL'::text) OR (ac_state =
'SUCCESS'::text)) OR (ac_state = 'AUDIT'::text)))
+ CONSTRAINT valid_state CHECK (((ac_state = 'FAIL'::text) OR (ac_state =
'SUCCESS'::text) OR (ac_state = 'AUDIT'::text)))
);
-CREATE TABLE dossier_sent_email (
+CREATE TABLE public.dossier_sent_email (
id integer NOT NULL,
de_date character varying(8) NOT NULL,
de_sent_email integer NOT NULL,
dos_id integer NOT NULL
);
-CREATE TABLE jnt_use_dos (
+CREATE TABLE public.jnt_use_dos (
jnt_id integer DEFAULT nextval(('seq_jnt_use_dos'::text)::regclass) NOT
NULL,
use_id integer NOT NULL,
dos_id integer NOT NULL
);
-CREATE TABLE modeledef (
+CREATE TABLE public.modeledef (
mod_id integer DEFAULT nextval(('s_modid'::text)::regclass) NOT NULL,
mod_name text NOT NULL,
mod_desc text
);
-CREATE TABLE progress (
+CREATE TABLE public.progress (
p_id character varying(16) NOT NULL,
p_value numeric(5,2) NOT NULL,
p_created timestamp without time zone DEFAULT now()
);
-CREATE TABLE recover_pass (
+CREATE TABLE public.recover_pass (
use_id bigint NOT NULL,
request text NOT NULL,
password text NOT NULL,
@@ -55,16 +55,16 @@ CREATE TABLE recover_pass (
recover_on timestamp with time zone,
recover_by text
);
-CREATE TABLE theme (
+CREATE TABLE public.theme (
the_name text NOT NULL,
the_filestyle text,
the_filebutton text
);
-CREATE TABLE user_global_pref (
+CREATE TABLE public.user_global_pref (
user_id text NOT NULL,
parameter_type text NOT NULL,
parameter_value text
);
-CREATE TABLE version (
+CREATE TABLE public.version (
val integer NOT NULL
);
diff --git a/include/sql/mod1/comment.sql b/include/sql/mod1/comment.sql
index f10933c53..219bada4d 100644
--- a/include/sql/mod1/comment.sql
+++ b/include/sql/mod1/comment.sql
@@ -1,203 +1,308 @@
-COMMENT ON FUNCTION correct_sequence(p_sequence text, p_col text, p_table
text) IS ' Often the primary key is a sequence number and sometimes the value
of the sequence is not synchronized with the primary key ( p_sequence :
sequence name, p_col : col of the pk,p_table : concerned table';
-COMMENT ON FUNCTION format_account(p_account public.account_type) IS 'format
the accounting :
+COMMENT ON FUNCTION comptaproc.correct_sequence(p_sequence text, p_col text,
p_table text) IS ' Often the primary key is a sequence number and sometimes the
value of the sequence is not synchronized with the primary key ( p_sequence :
sequence name, p_col : col of the pk,p_table : concerned table';
+COMMENT ON FUNCTION comptaproc.format_account(p_account public.account_type)
IS 'format the accounting :
- upper case
- remove space and special char.
';
-COMMENT ON FUNCTION html_quote(p_string text) IS 'remove harmfull HTML char';
-COMMENT ON TABLE action IS 'The different privileges';
-COMMENT ON COLUMN action.ac_code IS 'this code will be used in the code with
the function User::check_action ';
-COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class
Action_Detail';
-COMMENT ON COLUMN action_detail.f_id IS 'the concerned card';
-COMMENT ON COLUMN action_detail.ad_text IS ' Description ';
-COMMENT ON COLUMN action_detail.ad_pu IS ' price per unit ';
-COMMENT ON COLUMN action_detail.ad_quant IS 'quantity ';
-COMMENT ON COLUMN action_detail.ad_tva_id IS ' tva_id ';
-COMMENT ON COLUMN action_detail.ad_tva_amount IS ' tva_amount ';
-COMMENT ON COLUMN action_detail.ad_total_amount IS ' total amount';
-COMMENT ON TABLE action_gestion IS 'Contains the details for the follow-up of
customer, supplier, administration';
-COMMENT ON COLUMN action_gestion.ag_type IS ' type of action: see
document_type ';
-COMMENT ON COLUMN action_gestion.f_id_dest IS ' third party ';
-COMMENT ON COLUMN action_gestion.ag_title IS ' title ';
-COMMENT ON COLUMN action_gestion.ag_timestamp IS ' ';
-COMMENT ON COLUMN action_gestion.ag_ref IS 'its reference ';
-COMMENT ON COLUMN action_gestion.ag_priority IS 'Low, medium, important ';
-COMMENT ON COLUMN action_gestion.ag_dest IS ' is the profile which has to take
care of this action ';
-COMMENT ON COLUMN action_gestion.ag_owner IS ' is the owner of this action ';
-COMMENT ON COLUMN action_gestion.ag_contact IS ' contact of the third part ';
-COMMENT ON COLUMN action_gestion.ag_state IS 'state of the action same as
document_state ';
-COMMENT ON COLUMN action_gestion_comment.agc_id IS 'PK';
-COMMENT ON COLUMN action_gestion_comment.ag_id IS 'FK to action_gestion';
-COMMENT ON COLUMN action_gestion_comment.agc_comment IS 'comment';
-COMMENT ON COLUMN action_gestion_comment.tech_user IS 'user_login';
-COMMENT ON COLUMN action_gestion_operation.ago_id IS 'pk';
-COMMENT ON COLUMN action_gestion_operation.ag_id IS 'fk to action_gestion';
-COMMENT ON COLUMN action_gestion_operation.jr_id IS 'fk to jrn';
-COMMENT ON COLUMN action_gestion_related.aga_id IS 'pk';
-COMMENT ON COLUMN action_gestion_related.aga_least IS 'fk to action_gestion,
smallest ag_id';
-COMMENT ON COLUMN action_gestion_related.aga_greatest IS 'fk to action_gestion
greatest ag_id';
-COMMENT ON COLUMN action_gestion_related.aga_type IS 'Type de liens';
-COMMENT ON TABLE action_person IS 'Person involved in the action';
-COMMENT ON COLUMN action_person.ap_id IS 'pk';
-COMMENT ON COLUMN action_person.ag_id IS 'fk to fiche';
-COMMENT ON TABLE attr_def IS 'The available attributs for the cards';
-COMMENT ON TABLE attr_min IS 'The value of attributs for the cards';
-COMMENT ON TABLE bilan IS 'contains the template and the data for generating
different documents ';
-COMMENT ON COLUMN bilan.b_id IS 'primary key';
-COMMENT ON COLUMN bilan.b_name IS 'Name of the document';
-COMMENT ON COLUMN bilan.b_file_template IS 'path of the template
(document/...)';
-COMMENT ON COLUMN bilan.b_file_form IS 'path of the file with forms';
-COMMENT ON COLUMN bilan.b_type IS 'type = ODS, RTF...';
-COMMENT ON TABLE bookmark IS 'Bookmark of the connected user';
-COMMENT ON TABLE centralized IS 'The centralized journal';
-COMMENT ON TABLE document IS 'This table contains all the documents : summary
and lob files';
-COMMENT ON TABLE document_modele IS ' contains all the template for the
documents';
-COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the
document modele';
-COMMENT ON TABLE document_state IS 'State of the document';
-COMMENT ON TABLE document_type IS 'Type of document : meeting, invoice,...';
-COMMENT ON COLUMN document_type.dt_prefix IS 'Prefix for ag_ref';
-COMMENT ON TABLE extension IS 'Content the needed information for the
extension';
-COMMENT ON COLUMN extension.ex_id IS 'Primary key';
-COMMENT ON COLUMN extension.ex_name IS 'code of the extension ';
-COMMENT ON COLUMN extension.ex_code IS 'code of the extension ';
-COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension ';
-COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include';
-COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled N : disabled ';
-COMMENT ON TABLE fiche IS 'Cards';
-COMMENT ON TABLE fiche_def IS 'Cards definition';
-COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition';
-COMMENT ON TABLE fiche_detail IS 'join between the card and the attribut
definition';
-COMMENT ON TABLE forecast IS 'contains the name of the forecast';
-COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key';
-COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category';
-COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the
table forecast';
-COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when
displaid';
-COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key';
-COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem';
-COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry';
-COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)';
-COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)';
-COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount';
-COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C';
-COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value
parm_periode.p_id ';
-COMMENT ON TABLE form IS 'Forms content';
-COMMENT ON TABLE info_def IS 'Contains the types of additionnal info we can
add to a operation';
-COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the
attribut definition';
-COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy
writing';
-COMMENT ON COLUMN jrn.jr_optype IS 'Type of operation , NOR = NORMAL , OPE
opening , EXT extourne, CLO closing';
-COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties';
-COMMENT ON COLUMN jrn_def.jrn_enable IS 'Set to 1 if the ledger is enable ';
-COMMENT ON TABLE jrn_note IS 'Note about operation';
-COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation';
-COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)';
-COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy
writing';
-COMMENT ON TABLE key_distribution IS 'Distribution key for analytic';
-COMMENT ON COLUMN key_distribution.kd_id IS 'PK';
-COMMENT ON COLUMN key_distribution.kd_name IS 'Name of the key';
-COMMENT ON COLUMN key_distribution.kd_description IS 'Description of the key';
-COMMENT ON TABLE key_distribution_activity IS 'Contains the analytic account';
-COMMENT ON COLUMN key_distribution_activity.ka_id IS 'pk';
-COMMENT ON COLUMN key_distribution_activity.ke_id IS 'fk to
key_distribution_detail';
-COMMENT ON COLUMN key_distribution_activity.po_id IS 'fk to poste_analytique';
-COMMENT ON COLUMN key_distribution_activity.pa_id IS 'fk to plan_analytique';
-COMMENT ON TABLE key_distribution_detail IS 'Row of activity and percent';
-COMMENT ON COLUMN key_distribution_detail.ke_id IS 'pk';
-COMMENT ON COLUMN key_distribution_detail.kd_id IS 'fk to key_distribution';
-COMMENT ON COLUMN key_distribution_detail.ke_row IS 'group order';
-COMMENT ON TABLE key_distribution_ledger IS 'Legder where the distribution key
can be used';
-COMMENT ON COLUMN key_distribution_ledger.kl_id IS 'pk';
-COMMENT ON COLUMN key_distribution_ledger.kd_id IS 'fk to key_distribution';
-COMMENT ON COLUMN key_distribution_ledger.jrn_def_id IS 'fk to jrnd_def,
ledger where this key is available';
-COMMENT ON COLUMN menu_ref.me_code IS 'Menu Code ';
-COMMENT ON COLUMN menu_ref.me_menu IS 'Label to display';
-COMMENT ON COLUMN menu_ref.me_file IS 'if not empty file to include';
-COMMENT ON COLUMN menu_ref.me_url IS 'url ';
-COMMENT ON COLUMN menu_ref.me_type IS 'ME for menu
+COMMENT ON FUNCTION comptaproc.format_quickcode(p_qcode text) IS 'Put in upper
case and remove invalid char';
+COMMENT ON FUNCTION comptaproc.four_upper_letter() IS 'Cut to the 4 first
letter in uppercase';
+COMMENT ON FUNCTION comptaproc.html_quote(p_string text) IS 'remove harmfull
HTML char';
+COMMENT ON FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text
text) IS 'update the qcode + related columns in other cards';
+COMMENT ON TABLE public.acc_other_tax IS 'Additional tax for Sale or Purchase
';
+COMMENT ON COLUMN public.acc_other_tax.ac_label IS 'Label of the tax';
+COMMENT ON COLUMN public.acc_other_tax.ac_rate IS 'rate of the tax in percent';
+COMMENT ON COLUMN public.acc_other_tax.ajrn_def_id IS 'array of to FK jrn_def
(jrn_def_id)';
+COMMENT ON COLUMN public.acc_other_tax.ac_accounting IS 'FK tmp_pcmn
(pcm_val)';
+COMMENT ON TABLE public.action IS 'The different privileges';
+COMMENT ON COLUMN public.action.ac_code IS 'this code will be used in the code
with the function User::check_action ';
+COMMENT ON TABLE public.action_detail IS 'Detail of action_gestion, see class
Action_Detail';
+COMMENT ON COLUMN public.action_detail.f_id IS 'the concerned card';
+COMMENT ON COLUMN public.action_detail.ad_text IS ' Description ';
+COMMENT ON COLUMN public.action_detail.ad_pu IS ' price per unit ';
+COMMENT ON COLUMN public.action_detail.ad_quant IS 'quantity ';
+COMMENT ON COLUMN public.action_detail.ad_tva_id IS ' tva_id ';
+COMMENT ON COLUMN public.action_detail.ad_tva_amount IS ' tva_amount ';
+COMMENT ON COLUMN public.action_detail.ad_total_amount IS ' total amount';
+COMMENT ON TABLE public.action_gestion IS 'Contains the details for the
follow-up of customer, supplier, administration';
+COMMENT ON COLUMN public.action_gestion.ag_type IS ' type of action: see
document_type ';
+COMMENT ON COLUMN public.action_gestion.f_id_dest IS 'third party';
+COMMENT ON COLUMN public.action_gestion.ag_title IS 'title';
+COMMENT ON COLUMN public.action_gestion.ag_ref IS 'its reference';
+COMMENT ON COLUMN public.action_gestion.ag_priority IS 'Low, medium,
important';
+COMMENT ON COLUMN public.action_gestion.ag_dest IS 'is the profile which has
to take care of this action';
+COMMENT ON COLUMN public.action_gestion.ag_owner IS 'is the owner of this
action';
+COMMENT ON COLUMN public.action_gestion.ag_contact IS 'contact of the third
part';
+COMMENT ON COLUMN public.action_gestion.ag_state IS 'state of the action same
as document_state';
+COMMENT ON TABLE public.action_gestion_comment IS 'comment on action
management';
+COMMENT ON COLUMN public.action_gestion_comment.agc_id IS 'PK';
+COMMENT ON COLUMN public.action_gestion_comment.ag_id IS 'FK to
action_gestion';
+COMMENT ON COLUMN public.action_gestion_comment.agc_comment IS 'comment';
+COMMENT ON COLUMN public.action_gestion_comment.tech_user IS 'user_login';
+COMMENT ON TABLE public.action_gestion_operation IS 'Operation linked on
action';
+COMMENT ON COLUMN public.action_gestion_operation.ago_id IS 'pk';
+COMMENT ON COLUMN public.action_gestion_operation.ag_id IS 'fk to
action_gestion';
+COMMENT ON COLUMN public.action_gestion_operation.jr_id IS 'fk to jrn';
+COMMENT ON TABLE public.action_gestion_related IS 'link between action';
+COMMENT ON COLUMN public.action_gestion_related.aga_id IS 'pk';
+COMMENT ON COLUMN public.action_gestion_related.aga_least IS 'fk to
action_gestion, smallest ag_id';
+COMMENT ON COLUMN public.action_gestion_related.aga_greatest IS 'fk to
action_gestion greatest ag_id';
+COMMENT ON COLUMN public.action_gestion_related.aga_type IS 'Type de liens';
+COMMENT ON TABLE public.action_person IS 'Person involved in the action';
+COMMENT ON COLUMN public.action_person.ap_id IS 'pk';
+COMMENT ON COLUMN public.action_person.ag_id IS 'fk to fiche';
+COMMENT ON TABLE public.action_person_option IS 'option for each contact';
+COMMENT ON COLUMN public.action_person_option.ap_value IS 'Value of the
option';
+COMMENT ON COLUMN public.action_person_option.contact_option_ref_id IS 'FK to
contact_option';
+COMMENT ON COLUMN public.action_person_option.action_person_id IS 'FK to
action_person';
+COMMENT ON TABLE public.action_tags IS 'Tags link to action';
+COMMENT ON TABLE public.attr_def IS 'The available attributs for the cards';
+COMMENT ON COLUMN public.attr_def.ad_search_followup IS '1 : search available
from followup , 0 : search not available in followup';
+COMMENT ON COLUMN public.attr_def.ad_default_order IS 'Default order of the
attribute';
+COMMENT ON TABLE public.attr_min IS 'The value of attributs for the cards';
+COMMENT ON TABLE public.bilan IS 'contains the template and the data for
generating different documents ';
+COMMENT ON COLUMN public.bilan.b_id IS 'primary key';
+COMMENT ON COLUMN public.bilan.b_name IS 'Name of the document';
+COMMENT ON COLUMN public.bilan.b_file_template IS 'path of the template
(document/...)';
+COMMENT ON COLUMN public.bilan.b_file_form IS 'path of the file with forms';
+COMMENT ON COLUMN public.bilan.b_type IS 'type = ODS, RTF...';
+COMMENT ON TABLE public.bookmark IS 'Bookmark of the connected user';
+COMMENT ON TABLE public.centralized IS 'The centralized journal';
+COMMENT ON TABLE public.contact_option_ref IS 'Option for the contact';
+COMMENT ON COLUMN public.contact_option_ref.cor_label IS 'Label de l''option';
+COMMENT ON COLUMN public.contact_option_ref.cor_type IS '0 text , 1 select ,2
nombre , 3 date';
+COMMENT ON COLUMN public.contact_option_ref.cor_value_select IS 'Select
values';
+COMMENT ON TABLE public.currency IS 'currency';
+COMMENT ON COLUMN public.currency.cr_code_iso IS 'Code ISO';
+COMMENT ON COLUMN public.currency.cr_name IS 'Name of the currency';
+COMMENT ON TABLE public.currency_history IS 'currency values history';
+COMMENT ON COLUMN public.currency_history.id IS 'pk';
+COMMENT ON COLUMN public.currency_history.ch_value IS 'rate of currency
depending of currency of the folder';
+COMMENT ON COLUMN public.currency_history.ch_from IS 'Date when the rate is
available';
+COMMENT ON COLUMN public.currency_history.currency_id IS 'FK to currency';
+COMMENT ON TABLE public.del_action IS 'deleted actions';
+COMMENT ON TABLE public.del_jrn IS 'deleted operation';
+COMMENT ON TABLE public.del_jrnx IS 'delete operation details';
+COMMENT ON TABLE public.document IS 'This table contains all the documents :
summary and lob files';
+COMMENT ON TABLE public.document_component IS 'Give the component of NOALYSS
that is using is';
+COMMENT ON COLUMN public.document_component.dc_id IS 'PK';
+COMMENT ON COLUMN public.document_component.dc_code IS 'Code used in
document_modele';
+COMMENT ON COLUMN public.document_component.dc_comment IS 'Code used in
document_modele';
+COMMENT ON TABLE public.document_modele IS ' contains all the template for the
documents';
+COMMENT ON TABLE public.document_option IS 'Reference of option addable to
document_type';
+COMMENT ON COLUMN public.document_option.do_code IS 'Code of the option to
add';
+COMMENT ON COLUMN public.document_option.document_type_id IS 'FK to
document_type';
+COMMENT ON COLUMN public.document_option.do_enable IS '1 the option is
activated, 0 is inativated';
+COMMENT ON COLUMN public.document_option.do_option IS 'Option for the detail';
+COMMENT ON SEQUENCE public.document_seq IS 'Sequence for the sequence bound to
the document modele';
+COMMENT ON TABLE public.document_state IS 'State of the document';
+COMMENT ON TABLE public.document_type IS 'Type of document : meeting,
invoice,...';
+COMMENT ON COLUMN public.document_type.dt_prefix IS 'Prefix for ag_ref';
+COMMENT ON TABLE public.extension IS 'Content the needed information for the
extension';
+COMMENT ON COLUMN public.extension.ex_id IS 'Primary key';
+COMMENT ON COLUMN public.extension.ex_name IS 'code of the extension ';
+COMMENT ON COLUMN public.extension.ex_code IS 'code of the extension ';
+COMMENT ON COLUMN public.extension.ex_desc IS 'Description of the extension ';
+COMMENT ON COLUMN public.extension.ex_file IS 'path to the extension to
include';
+COMMENT ON COLUMN public.extension.ex_enable IS 'Y : enabled N : disabled ';
+COMMENT ON TABLE public.fiche IS 'Cards';
+COMMENT ON COLUMN public.fiche.f_enable IS 'value = 1 if card enable ,
otherwise 0 ';
+COMMENT ON TABLE public.fiche_def IS 'Cards definition';
+COMMENT ON TABLE public.fiche_def_ref IS 'Family Cards definition';
+COMMENT ON TABLE public.fiche_detail IS 'join between the card and the
attribut definition';
+COMMENT ON TABLE public.forecast IS 'contains the name of the forecast';
+COMMENT ON TABLE public.forecast_category IS 'Category of forecast';
+COMMENT ON COLUMN public.forecast_category.fc_id IS 'primary key';
+COMMENT ON COLUMN public.forecast_category.fc_desc IS 'text of the category';
+COMMENT ON COLUMN public.forecast_category.f_id IS 'Foreign key, it is the
parent from the table forecast';
+COMMENT ON COLUMN public.forecast_category.fc_order IS 'Order of the category,
used when displaid';
+COMMENT ON TABLE public.forecast_item IS 'items of forecast';
+COMMENT ON COLUMN public.forecast_item.fi_id IS 'Primary key';
+COMMENT ON COLUMN public.forecast_item.fi_text IS 'Label of the i tem';
+COMMENT ON COLUMN public.forecast_item.fi_account IS 'Accountancy entry';
+COMMENT ON COLUMN public.forecast_item.fi_order IS 'Order of showing (not
used)';
+COMMENT ON COLUMN public.forecast_item.fi_amount IS 'Amount';
+COMMENT ON COLUMN public.forecast_item.fi_pid IS '0 for every month, or the
value parm_periode.p_id ';
+COMMENT ON TABLE public.form_definition IS 'Simple Report name';
+COMMENT ON TABLE public.form_detail IS 'Simple report details with formula';
+COMMENT ON TABLE public.groupe_analytique IS 'Group of analytic accountancy';
+COMMENT ON TABLE public.info_def IS 'Contains the types of additionnal info we
can add to a operation';
+COMMENT ON TABLE public.jnt_document_option_contact IS 'Many to many table
between document and contact option';
+COMMENT ON TABLE public.jnt_fic_attr IS 'join between the family card and the
attribut definition';
+COMMENT ON TABLE public.jnt_letter IS 'm2m tables for lettering';
+COMMENT ON TABLE public.jnt_tag_group_tag IS 'Many to Many table betwwen tag
and tag group';
+COMMENT ON TABLE public.jrn IS 'Journal: content one line for a group of
accountancy writing';
+COMMENT ON COLUMN public.jrn.jr_optype IS 'Type of operation , NOR = NORMAL ,
OPE opening , EXT extourne, CLO closing';
+COMMENT ON TABLE public.jrn_def IS 'Definition of a journal, his properties';
+COMMENT ON COLUMN public.jrn_def.jrn_enable IS 'Set to 1 if the ledger is
enable ';
+COMMENT ON COLUMN public.jrn_def.currency_id IS 'Default currency for
financial ledger';
+COMMENT ON COLUMN public.jrn_def.jrn_def_negative_amount IS '1 echo a warning
if you are not using an negative amount, default 0 for no warning';
+COMMENT ON COLUMN public.jrn_def.jrn_def_negative_warning IS 'Yell a warning
if the amount if not negative , in the case of jrn_def_negative_amount is Y';
+COMMENT ON COLUMN public.jrn_def.jrn_def_quantity IS 'Use the quantity column,
0->disable,1->enable,used only with Sale and Purchase otherwise ignored';
+COMMENT ON TABLE public.jrn_info IS 'extra info for operation';
+COMMENT ON TABLE public.jrn_note IS 'Note about operation';
+COMMENT ON TABLE public.jrn_periode IS 'Period by ledger';
+COMMENT ON TABLE public.jrn_rapt IS 'Rapprochement between operation';
+COMMENT ON COLUMN public.jrn_tax.j_id IS 'fk jrnx';
+COMMENT ON COLUMN public.jrn_tax.pcm_val IS 'FK tmp_pcmn';
+COMMENT ON COLUMN public.jrn_tax.ac_id IS 'FK to acc_other_tax';
+COMMENT ON TABLE public.jrn_type IS 'Type of journal (Sell, Buy,
Financial...)';
+COMMENT ON TABLE public.jrnx IS 'Journal: content one line for each
accountancy writing';
+COMMENT ON TABLE public.key_distribution IS 'Distribution key for analytic';
+COMMENT ON COLUMN public.key_distribution.kd_id IS 'PK';
+COMMENT ON COLUMN public.key_distribution.kd_name IS 'Name of the key';
+COMMENT ON COLUMN public.key_distribution.kd_description IS 'Description of
the key';
+COMMENT ON TABLE public.key_distribution_activity IS 'Contains the analytic
account';
+COMMENT ON COLUMN public.key_distribution_activity.ka_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_activity.ke_id IS 'fk to
key_distribution_detail';
+COMMENT ON COLUMN public.key_distribution_activity.po_id IS 'fk to
poste_analytique';
+COMMENT ON COLUMN public.key_distribution_activity.pa_id IS 'fk to
plan_analytique';
+COMMENT ON TABLE public.key_distribution_detail IS 'Row of activity and
percent';
+COMMENT ON COLUMN public.key_distribution_detail.ke_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_detail.kd_id IS 'fk to
key_distribution';
+COMMENT ON COLUMN public.key_distribution_detail.ke_row IS 'group order';
+COMMENT ON TABLE public.key_distribution_ledger IS 'Legder where the
distribution key can be used';
+COMMENT ON COLUMN public.key_distribution_ledger.kl_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_ledger.kd_id IS 'fk to
key_distribution';
+COMMENT ON COLUMN public.key_distribution_ledger.jrn_def_id IS 'fk to
jrnd_def, ledger where this key is available';
+COMMENT ON TABLE public.letter_cred IS 'Letter cred';
+COMMENT ON TABLE public.letter_deb IS 'letter deb';
+COMMENT ON TABLE public.menu_default IS 'default menu for certains actions';
+COMMENT ON TABLE public.menu_ref IS 'Definition of all the menu';
+COMMENT ON COLUMN public.menu_ref.me_code IS 'Menu Code ';
+COMMENT ON COLUMN public.menu_ref.me_menu IS 'Label to display';
+COMMENT ON COLUMN public.menu_ref.me_file IS 'if not empty file to include';
+COMMENT ON COLUMN public.menu_ref.me_url IS 'url ';
+COMMENT ON COLUMN public.menu_ref.me_type IS 'ME for menu
PR for Printing
SP for special meaning (ex: return to line)
PL for plugin';
-COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and
the corresponding ledger';
-COMMENT ON COLUMN mod_payment.jrn_def_id IS 'Ledger using this payment method';
-COMMENT ON TABLE op_predef IS 'predefined operation';
-COMMENT ON COLUMN op_predef.jrn_def_id IS 'jrn_id';
-COMMENT ON COLUMN op_predef.od_name IS 'name of the operation';
-COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined
operations';
-COMMENT ON TABLE operation_analytique IS 'History of the analytic account';
-COMMENT ON COLUMN operation_analytique.oa_jrnx_id_source IS 'jrnx.j_id source
of this amount, this amount is computed from an amount giving a ND VAT.Normally
NULL is there is no ND VAT.';
-COMMENT ON COLUMN operation_analytique.oa_positive IS 'Sign of the amount';
-COMMENT ON COLUMN operation_analytique.f_id IS 'FK to fiche.f_id , used only
with ODS';
-COMMENT ON TABLE parameter IS 'parameter of the company';
-COMMENT ON TABLE parm_money IS 'Currency conversion';
-COMMENT ON TABLE parm_periode IS 'Periode definition';
-COMMENT ON TABLE parm_poste IS 'Contains data for finding is the type of the
account (asset)';
-COMMENT ON TABLE plan_analytique IS 'Plan Analytique (max 5)';
-COMMENT ON TABLE poste_analytique IS 'Poste Analytique';
-COMMENT ON TABLE profile IS 'Available profile ';
-COMMENT ON COLUMN profile.p_name IS 'Name of the profile';
-COMMENT ON COLUMN profile.p_desc IS 'description of the profile';
-COMMENT ON COLUMN profile.with_calc IS 'show the calculator';
-COMMENT ON COLUMN profile.with_direct_form IS 'show the direct form';
-COMMENT ON TABLE profile_menu IS 'Join between the profile and the menu ';
-COMMENT ON COLUMN profile_menu.me_code_dep IS 'menu code dependency';
-COMMENT ON COLUMN profile_menu.p_id IS 'link to profile';
-COMMENT ON COLUMN profile_menu.p_order IS 'order of displaying menu';
-COMMENT ON COLUMN profile_menu.p_type_display IS 'M is a module
+COMMENT ON TABLE public.payment_method IS 'Contains the different media of
payment and the corresponding ledger';
+COMMENT ON COLUMN public.payment_method.jrn_def_id IS 'Ledger using this
payment method';
+COMMENT ON TABLE public.op_predef IS 'predefined operation';
+COMMENT ON COLUMN public.op_predef.jrn_def_id IS 'jrn_id';
+COMMENT ON COLUMN public.op_predef.od_name IS 'name of the operation';
+COMMENT ON TABLE public.op_predef_detail IS 'contains the detail of predefined
operations';
+COMMENT ON TABLE public.operation_analytique IS 'History of the analytic
account';
+COMMENT ON COLUMN public.operation_analytique.oa_jrnx_id_source IS 'jrnx.j_id
source of this amount, this amount is computed from an amount giving a ND
VAT.Normally NULL is there is no ND VAT.';
+COMMENT ON COLUMN public.operation_analytique.oa_positive IS 'Sign of the
amount';
+COMMENT ON COLUMN public.operation_analytique.f_id IS 'FK to fiche.f_id , used
only with ODS';
+COMMENT ON TABLE public.operation_currency IS 'Information about currency';
+COMMENT ON COLUMN public.operation_currency.oc_amount IS 'amount in currency';
+COMMENT ON COLUMN public.operation_currency.oc_vat_amount IS 'vat amount in
currency';
+COMMENT ON COLUMN public.operation_currency.oc_price_unit IS 'unit price in
currency';
+COMMENT ON COLUMN public.operation_currency.j_id IS 'fk to jrnx';
+COMMENT ON TABLE public.operation_tag IS 'Tag for operation';
+COMMENT ON TABLE public.parameter IS 'parameter of the company';
+COMMENT ON TABLE public.parameter_extra IS 'Extra parameter for the folder';
+COMMENT ON COLUMN public.parameter_extra.pe_code IS 'Code used in the
Document:generate';
+COMMENT ON COLUMN public.parameter_extra.pe_label IS 'Label description';
+COMMENT ON COLUMN public.parameter_extra.pe_value IS 'Value which will replace
the tag in Document:generate';
+COMMENT ON TABLE public.parm_code IS 'Parameter code and accountancy';
+COMMENT ON TABLE public.parm_money IS 'Currency conversion';
+COMMENT ON TABLE public.parm_periode IS 'Periode definition';
+COMMENT ON COLUMN public.parm_periode.p_start IS 'Start date of periode';
+COMMENT ON COLUMN public.parm_periode.p_end IS 'End date of periode';
+COMMENT ON COLUMN public.parm_periode.p_exercice IS 'Exercice';
+COMMENT ON COLUMN public.parm_periode.p_closed IS 'is closed';
+COMMENT ON COLUMN public.parm_periode.p_central IS 'is centralized (obsolete)';
+COMMENT ON COLUMN public.parm_periode.p_exercice_label IS 'label of the
exercice';
+COMMENT ON TABLE public.parm_poste IS 'Contains data for finding is the type
of the account (asset)';
+COMMENT ON TABLE public.plan_analytique IS 'Plan Analytique (max 5)';
+COMMENT ON TABLE public.poste_analytique IS 'Poste Analytique';
+COMMENT ON COLUMN public.poste_analytique.po_state IS 'Analytic Account state
: 0 disabled 0 enabled ';
+COMMENT ON TABLE public.profile IS 'Available profile ';
+COMMENT ON COLUMN public.profile.p_name IS 'Name of the profile';
+COMMENT ON COLUMN public.profile.p_desc IS 'description of the profile';
+COMMENT ON COLUMN public.profile.with_calc IS 'show the calculator';
+COMMENT ON COLUMN public.profile.with_direct_form IS 'show the direct form';
+COMMENT ON COLUMN public.profile.with_search_card IS 'Display a icon for
searching card : 1 display, 0 not displaid';
+COMMENT ON TABLE public.profile_menu IS 'Join between the profile and the
menu ';
+COMMENT ON COLUMN public.profile_menu.me_code_dep IS 'menu code dependency';
+COMMENT ON COLUMN public.profile_menu.p_id IS 'link to profile';
+COMMENT ON COLUMN public.profile_menu.p_order IS 'order of displaying menu';
+COMMENT ON COLUMN public.profile_menu.p_type_display IS 'M is a module
E is a menu
S is a select (for plugin)';
-COMMENT ON COLUMN profile_menu.pm_default IS 'default menu';
-COMMENT ON COLUMN profile_menu.pm_id_dep IS 'parent of this menu item';
-COMMENT ON TABLE profile_sec_repository IS 'Available profile for user';
-COMMENT ON COLUMN profile_sec_repository.ur_id IS 'pk';
-COMMENT ON COLUMN profile_sec_repository.p_id IS 'fk to profile';
-COMMENT ON COLUMN profile_sec_repository.r_id IS 'fk to stock_repository';
-COMMENT ON COLUMN profile_sec_repository.ur_right IS 'Type of right : R for
readonly W for write';
-COMMENT ON TABLE profile_user IS 'Contains the available profile for users';
-COMMENT ON COLUMN profile_user.user_name IS 'fk to available_user : login';
-COMMENT ON COLUMN profile_user.p_id IS 'fk to profile';
-COMMENT ON TABLE quant_fin IS 'Simple operation for financial';
-COMMENT ON COLUMN quant_purchase.qp_vat_sided IS 'amount of the VAT which
avoid VAT, case of the VAT which add the same amount at the deb and cred';
-COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer';
-COMMENT ON TABLE stock_goods IS 'About the goods';
-COMMENT ON TABLE stock_repository IS 'stock repository';
-COMMENT ON COLUMN stock_repository.r_id IS 'pk';
-COMMENT ON COLUMN stock_repository.r_name IS 'name of the stock';
-COMMENT ON COLUMN stock_repository.r_adress IS 'adress of the stock';
-COMMENT ON COLUMN stock_repository.r_country IS 'country of the stock';
-COMMENT ON COLUMN stock_repository.r_city IS 'City of the stock';
-COMMENT ON COLUMN stock_repository.r_phone IS 'Phone number';
-COMMENT ON COLUMN tags.t_actif IS 'Y if the tag is activate and can be used ';
-COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé';
-COMMENT ON COLUMN tmp_pcmn.id IS 'allow to identify the row, it is unique and
not null (pseudo pk)';
-COMMENT ON COLUMN tmp_pcmn.pcm_direct_use IS 'Value are N or Y , N cannot be
used directly , not even through a card';
-COMMENT ON TABLE todo_list IS 'Todo list';
-COMMENT ON COLUMN todo_list.is_public IS 'Flag for the public parameter';
-COMMENT ON TABLE todo_list_shared IS 'Note of todo list shared with other
users';
-COMMENT ON COLUMN todo_list_shared.todo_list_id IS 'fk to todo_list';
-COMMENT ON COLUMN todo_list_shared.use_login IS 'user login';
-COMMENT ON TABLE tva_rate IS 'Rate of vat';
-COMMENT ON COLUMN user_active_security.us_login IS 'user''s login';
-COMMENT ON COLUMN user_active_security.us_ledger IS 'Flag Security for ledger';
-COMMENT ON COLUMN user_active_security.us_action IS 'Security for action';
-COMMENT ON TABLE user_local_pref IS 'The user''s local parameter ';
-COMMENT ON COLUMN user_local_pref.user_id IS 'user''s login ';
-COMMENT ON COLUMN user_local_pref.parameter_type IS 'the type of parameter ';
-COMMENT ON COLUMN user_local_pref.parameter_value IS 'the value of parameter ';
-COMMENT ON TABLE user_sec_action_profile IS 'Available profile for user';
-COMMENT ON COLUMN user_sec_action_profile.ua_id IS 'pk';
-COMMENT ON COLUMN user_sec_action_profile.p_id IS 'fk to profile';
-COMMENT ON COLUMN user_sec_action_profile.ua_right IS 'Type of right : R for
readonly W for write';
-COMMENT ON VIEW v_menu_description IS 'Description des menus';
-COMMENT ON VIEW v_menu_profile IS 'Give the profile and the menu +
dependencies';
-COMMENT ON VIEW v_tva_rate IS 'Show this table to be easily used by
Tva_Rate_MTable';
-COMMENT ON COLUMN v_tva_rate.tva_purchase IS ' VAT used for purchase';
-COMMENT ON COLUMN v_tva_rate.tva_sale IS ' VAT used for sale';
-COMMENT ON COLUMN v_tva_rate.tva_both_side IS 'if 1 , VAT avoided ';
-COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family';
-COMMENT ON CONSTRAINT uniq_user_ledger ON user_sec_jrn IS 'Create an unique
combination user / ledger';
-COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS
'Truncate the column ag_title to 70 char';
-COMMENT ON TRIGGER profile_user_ins_upd ON profile_user IS 'Force the column
user_name to lowercase';
-COMMENT ON TRIGGER t_jrnx_ins ON jrnx IS 'check that the qcode used by the
card exists and format it : uppercase and trim the space';
-COMMENT ON TRIGGER t_letter_del ON jrnx IS 'Delete the lettering for this row';
-COMMENT ON TRIGGER todo_list_ins_upd ON todo_list IS 'Force the column
use_login to lowercase';
-COMMENT ON TRIGGER todo_list_shared_ins_upd ON todo_list_shared IS 'Force the
column ua_login to lowercase';
-COMMENT ON TRIGGER user_sec_act_ins_upd ON user_sec_act IS 'Force the column
ua_login to lowercase';
-COMMENT ON TRIGGER user_sec_jrn_after_ins_upd ON user_sec_jrn IS 'Force the
column uj_login to lowercase';
+COMMENT ON COLUMN public.profile_menu.pm_default IS 'default menu';
+COMMENT ON COLUMN public.profile_menu.pm_id_dep IS 'parent of this menu item';
+COMMENT ON TABLE public.profile_menu_type IS 'Type of menu';
+COMMENT ON TABLE public.profile_mobile IS 'Menu for mobile device';
+COMMENT ON COLUMN public.profile_mobile.pmo_id IS 'primary key';
+COMMENT ON COLUMN public.profile_mobile.me_code IS 'Code of menu_ref to
execute';
+COMMENT ON COLUMN public.profile_mobile.pmo_order IS 'item order in menu';
+COMMENT ON COLUMN public.profile_mobile.p_id IS 'Profile id ';
+COMMENT ON COLUMN public.profile_mobile.pmo_default IS 'possible values are 1
, the default HTML header (javascript,CSS,...) is loaded , 0 nothing is
loaded from noalyss ';
+COMMENT ON TABLE public.profile_sec_repository IS 'Available profile for user';
+COMMENT ON COLUMN public.profile_sec_repository.ur_id IS 'pk';
+COMMENT ON COLUMN public.profile_sec_repository.p_id IS 'fk to profile';
+COMMENT ON COLUMN public.profile_sec_repository.r_id IS 'fk to
stock_repository';
+COMMENT ON COLUMN public.profile_sec_repository.ur_right IS 'Type of right : R
for readonly W for write';
+COMMENT ON TABLE public.profile_user IS 'Contains the available profile for
users';
+COMMENT ON COLUMN public.profile_user.user_name IS 'fk to available_user :
login';
+COMMENT ON COLUMN public.profile_user.p_id IS 'fk to profile';
+COMMENT ON TABLE public.quant_fin IS 'Simple operation for financial';
+COMMENT ON TABLE public.quant_purchase IS 'Supplemental info for purchase';
+COMMENT ON COLUMN public.quant_purchase.qp_vat_sided IS 'amount of the VAT
which avoid VAT, case of the VAT which add the same amount at the deb and cred';
+COMMENT ON TABLE public.quant_sold IS 'Contains about invoice for customer';
+COMMENT ON TABLE public.stock_change IS 'Change of stock';
+COMMENT ON TABLE public.stock_goods IS 'About the goods';
+COMMENT ON TABLE public.stock_repository IS 'stock repository';
+COMMENT ON COLUMN public.stock_repository.r_id IS 'pk';
+COMMENT ON COLUMN public.stock_repository.r_name IS 'name of the stock';
+COMMENT ON COLUMN public.stock_repository.r_adress IS 'adress of the stock';
+COMMENT ON COLUMN public.stock_repository.r_country IS 'country of the stock';
+COMMENT ON COLUMN public.stock_repository.r_city IS 'City of the stock';
+COMMENT ON COLUMN public.stock_repository.r_phone IS 'Phone number';
+COMMENT ON TABLE public.tag_group IS 'Group of tags';
+COMMENT ON COLUMN public.tag_group.tg_name IS 'Nom du groupe';
+COMMENT ON TABLE public.tags IS 'Tags name';
+COMMENT ON COLUMN public.tags.t_actif IS 'Y if the tag is activate and can be
used ';
+COMMENT ON TABLE public.tmp_pcmn IS 'Plan comptable minimum normalisé';
+COMMENT ON COLUMN public.tmp_pcmn.id IS 'allow to identify the row, it is
unique and not null (pseudo pk)';
+COMMENT ON COLUMN public.tmp_pcmn.pcm_direct_use IS 'Value are N or Y , N
cannot be used directly , not even through a card';
+COMMENT ON TABLE public.todo_list IS 'Todo list';
+COMMENT ON COLUMN public.todo_list.is_public IS 'Flag for the public
parameter';
+COMMENT ON TABLE public.todo_list_shared IS 'Note of todo list shared with
other users';
+COMMENT ON COLUMN public.todo_list_shared.todo_list_id IS 'fk to todo_list';
+COMMENT ON COLUMN public.todo_list_shared.use_login IS 'user login';
+COMMENT ON TABLE public.tva_rate IS 'Rate of vat';
+COMMENT ON COLUMN public.tva_rate.tva_label IS 'Label';
+COMMENT ON COLUMN public.tva_rate.tva_rate IS 'Rate';
+COMMENT ON COLUMN public.tva_rate.tva_comment IS 'Description of VAT';
+COMMENT ON COLUMN public.tva_rate.tva_poste IS 'accounting';
+COMMENT ON COLUMN public.tva_rate.tva_both_side IS 'If set to 1 , the amount
VAT will be reversed (autoliquidation)';
+COMMENT ON COLUMN public.tva_rate.tva_payment_sale IS 'Check if the VAT on
Sale must be declared when at the date of payment (P) or the date of operation
(O)';
+COMMENT ON COLUMN public.tva_rate.tva_payment_purchase IS 'Check if the VAT on
Purchase must be declared when at the date of payment (P) or the date of
operation (O)';
+COMMENT ON TABLE public.user_active_security IS 'Security for user';
+COMMENT ON COLUMN public.user_active_security.us_login IS 'user''s login';
+COMMENT ON COLUMN public.user_active_security.us_ledger IS 'Flag Security for
ledger';
+COMMENT ON COLUMN public.user_active_security.us_action IS 'Security for
action';
+COMMENT ON TABLE public.user_filter IS 'Filter for the search';
+COMMENT ON COLUMN public.user_filter.operation_filter IS 'Status of the
operation : paid, unpaid or all operation';
+COMMENT ON COLUMN public.user_filter.uf_tag IS 'Tag list';
+COMMENT ON COLUMN public.user_filter.uf_tag_option IS '0 : all tags must be
present, 1: at least one';
+COMMENT ON COLUMN public.user_filter.uf_currency_code IS 'correspond to
currency.id';
+COMMENT ON COLUMN public.user_filter.tva_id_search IS 'VAT id ';
+COMMENT ON TABLE public.user_local_pref IS 'The user''s local parameter ';
+COMMENT ON COLUMN public.user_local_pref.user_id IS 'user''s login ';
+COMMENT ON COLUMN public.user_local_pref.parameter_type IS 'the type of
parameter ';
+COMMENT ON COLUMN public.user_local_pref.parameter_value IS 'the value of
parameter ';
+COMMENT ON TABLE public.user_sec_act IS 'Security on actions for user';
+COMMENT ON TABLE public.user_sec_action_profile IS 'Available profile for
user';
+COMMENT ON COLUMN public.user_sec_action_profile.ua_id IS 'pk';
+COMMENT ON COLUMN public.user_sec_action_profile.p_id IS 'fk to profile';
+COMMENT ON COLUMN public.user_sec_action_profile.ua_right IS 'Type of right :
R for readonly W for write';
+COMMENT ON TABLE public.user_sec_jrn IS 'Security on ledger for users';
+COMMENT ON VIEW public.vw_fiche_attr IS 'Some attribute for all cards';
+COMMENT ON VIEW public.v_menu_description IS 'Description des menus';
+COMMENT ON VIEW public.v_menu_profile IS 'Give the profile and the menu +
dependencies';
+COMMENT ON TABLE public.version IS 'DB version';
+COMMENT ON VIEW public.vw_fiche_def IS 'all the attributs for card family';
+COMMENT ON CONSTRAINT uniq_user_ledger ON public.user_sec_jrn IS 'Create an
unique combination user / ledger';
+COMMENT ON TRIGGER action_gestion_t_insert_update ON public.action_gestion IS
'Truncate the column ag_title to 70 char';
+COMMENT ON TRIGGER profile_user_ins_upd ON public.profile_user IS 'Force the
column user_name to lowercase';
+COMMENT ON TRIGGER t_jrnx_ins ON public.jrnx IS 'check that the qcode used by
the card exists and format it : uppercase and trim the space';
+COMMENT ON TRIGGER t_letter_del ON public.jrnx IS 'Delete the lettering for
this row';
+COMMENT ON TRIGGER todo_list_ins_upd ON public.todo_list IS 'Force the column
use_login to lowercase';
+COMMENT ON TRIGGER todo_list_shared_ins_upd ON public.todo_list_shared IS
'Force the column ua_login to lowercase';
+COMMENT ON TRIGGER user_sec_act_ins_upd ON public.user_sec_act IS 'Force the
column ua_login to lowercase';
+COMMENT ON TRIGGER user_sec_jrn_after_ins_upd ON public.user_sec_jrn IS 'Force
the column uj_login to lowercase';
diff --git a/include/sql/mod1/constraint.sql b/include/sql/mod1/constraint.sql
index baa89096e..48de71948 100644
--- a/include/sql/mod1/constraint.sql
+++ b/include/sql/mod1/constraint.sql
@@ -2,478 +2,644 @@
SET check_function_bodies = false;
SET client_min_messages = warning;
SET search_path = public, pg_catalog;
-ALTER TABLE ONLY action_detail ALTER COLUMN ad_id SET DEFAULT
nextval('action_detail_ad_id_seq'::regclass);
-ALTER TABLE ONLY action_gestion_comment ALTER COLUMN agc_id SET DEFAULT
nextval('action_gestion_comment_agc_id_seq'::regclass);
-ALTER TABLE ONLY action_gestion_operation ALTER COLUMN ago_id SET DEFAULT
nextval('action_gestion_operation_ago_id_seq'::regclass);
-ALTER TABLE ONLY action_gestion_related ALTER COLUMN aga_id SET DEFAULT
nextval('action_gestion_related_aga_id_seq'::regclass);
-ALTER TABLE ONLY action_person ALTER COLUMN ap_id SET DEFAULT
nextval('action_person_ap_id_seq'::regclass);
-ALTER TABLE ONLY action_tags ALTER COLUMN at_id SET DEFAULT
nextval('action_tags_at_id_seq'::regclass);
-ALTER TABLE ONLY bookmark ALTER COLUMN b_id SET DEFAULT
nextval('bookmark_b_id_seq'::regclass);
-ALTER TABLE ONLY del_action ALTER COLUMN del_id SET DEFAULT
nextval('del_action_del_id_seq'::regclass);
-ALTER TABLE ONLY del_jrn ALTER COLUMN dj_id SET DEFAULT
nextval('del_jrn_dj_id_seq'::regclass);
-ALTER TABLE ONLY del_jrnx ALTER COLUMN djx_id SET DEFAULT
nextval('del_jrnx_djx_id_seq'::regclass);
-ALTER TABLE ONLY extension ALTER COLUMN ex_id SET DEFAULT
nextval('extension_ex_id_seq'::regclass);
-ALTER TABLE ONLY forecast ALTER COLUMN f_id SET DEFAULT
nextval('forecast_f_id_seq'::regclass);
-ALTER TABLE ONLY forecast_cat ALTER COLUMN fc_id SET DEFAULT
nextval('forecast_cat_fc_id_seq'::regclass);
-ALTER TABLE ONLY forecast_item ALTER COLUMN fi_id SET DEFAULT
nextval('forecast_item_fi_id_seq'::regclass);
-ALTER TABLE ONLY jnt_letter ALTER COLUMN jl_id SET DEFAULT
nextval('jnt_letter_jl_id_seq'::regclass);
-ALTER TABLE ONLY jrn_info ALTER COLUMN ji_id SET DEFAULT
nextval('jrn_info_ji_id_seq'::regclass);
-ALTER TABLE ONLY jrn_note ALTER COLUMN n_id SET DEFAULT
nextval('jrn_note_n_id_seq'::regclass);
-ALTER TABLE ONLY key_distribution ALTER COLUMN kd_id SET DEFAULT
nextval('key_distribution_kd_id_seq'::regclass);
-ALTER TABLE ONLY key_distribution_activity ALTER COLUMN ka_id SET DEFAULT
nextval('key_distribution_activity_ka_id_seq'::regclass);
-ALTER TABLE ONLY key_distribution_detail ALTER COLUMN ke_id SET DEFAULT
nextval('key_distribution_detail_ke_id_seq'::regclass);
-ALTER TABLE ONLY key_distribution_ledger ALTER COLUMN kl_id SET DEFAULT
nextval('key_distribution_ledger_kl_id_seq'::regclass);
-ALTER TABLE ONLY letter_cred ALTER COLUMN lc_id SET DEFAULT
nextval('letter_cred_lc_id_seq'::regclass);
-ALTER TABLE ONLY letter_deb ALTER COLUMN ld_id SET DEFAULT
nextval('letter_deb_ld_id_seq'::regclass);
-ALTER TABLE ONLY link_action_type ALTER COLUMN l_id SET DEFAULT
nextval('link_action_type_l_id_seq'::regclass);
-ALTER TABLE ONLY menu_default ALTER COLUMN md_id SET DEFAULT
nextval('menu_default_md_id_seq'::regclass);
-ALTER TABLE ONLY mod_payment ALTER COLUMN mp_id SET DEFAULT
nextval('mod_payment_mp_id_seq'::regclass);
-ALTER TABLE ONLY profile ALTER COLUMN p_id SET DEFAULT
nextval('profile_p_id_seq'::regclass);
-ALTER TABLE ONLY profile_menu ALTER COLUMN pm_id SET DEFAULT
nextval('profile_menu_pm_id_seq'::regclass);
-ALTER TABLE ONLY profile_sec_repository ALTER COLUMN ur_id SET DEFAULT
nextval('profile_sec_repository_ur_id_seq'::regclass);
-ALTER TABLE ONLY profile_user ALTER COLUMN pu_id SET DEFAULT
nextval('profile_user_pu_id_seq'::regclass);
-ALTER TABLE ONLY quant_fin ALTER COLUMN qf_id SET DEFAULT
nextval('quant_fin_qf_id_seq'::regclass);
-ALTER TABLE ONLY stock_change ALTER COLUMN c_id SET DEFAULT
nextval('stock_change_c_id_seq'::regclass);
-ALTER TABLE ONLY stock_repository ALTER COLUMN r_id SET DEFAULT
nextval('stock_repository_r_id_seq'::regclass);
-ALTER TABLE ONLY tags ALTER COLUMN t_id SET DEFAULT
nextval('tags_t_id_seq'::regclass);
-ALTER TABLE ONLY tmp_stockgood ALTER COLUMN s_id SET DEFAULT
nextval('tmp_stockgood_s_id_seq'::regclass);
-ALTER TABLE ONLY tmp_stockgood_detail ALTER COLUMN d_id SET DEFAULT
nextval('tmp_stockgood_detail_d_id_seq'::regclass);
-ALTER TABLE ONLY todo_list_shared ALTER COLUMN id SET DEFAULT
nextval('todo_list_shared_id_seq'::regclass);
-ALTER TABLE ONLY user_active_security ALTER COLUMN id SET DEFAULT
nextval('user_active_security_id_seq'::regclass);
-ALTER TABLE ONLY user_filter ALTER COLUMN id SET DEFAULT
nextval('user_filter_id_seq'::regclass);
-ALTER TABLE ONLY user_sec_action_profile ALTER COLUMN ua_id SET DEFAULT
nextval('user_sec_action_profile_ua_id_seq'::regclass);
-ALTER TABLE ONLY action_gestion_operation
+ALTER TABLE public.action_comment_document ALTER COLUMN acd_id ADD GENERATED
BY DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.action_comment_document_acd_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE public.action_gestion_filter ALTER COLUMN af_id ADD GENERATED
ALWAYS AS IDENTITY (
+ SEQUENCE NAME public.action_gestion_filter_af_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE public.document_component ALTER COLUMN dc_id ADD GENERATED BY
DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.document_component_dc_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE public.jrn_tax ALTER COLUMN jt_id ADD GENERATED ALWAYS AS IDENTITY
(
+ SEQUENCE NAME public.jrn_tax_jt_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE public.operation_exercice_detail ALTER COLUMN oed_id ADD GENERATED
BY DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.operation_exercice_detail_oed_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE public.operation_exercice ALTER COLUMN oe_id ADD GENERATED BY
DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.operation_exercice_oe_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ALTER TABLE ONLY public.acc_other_tax ALTER COLUMN ac_id SET DEFAULT
nextval('public.acc_other_tax_ac_id_seq'::regclass);
+ALTER TABLE ONLY public.action_detail ALTER COLUMN ad_id SET DEFAULT
nextval('public.action_detail_ad_id_seq'::regclass);
+ALTER TABLE ONLY public.action_gestion_comment ALTER COLUMN agc_id SET DEFAULT
nextval('public.action_gestion_comment_agc_id_seq'::regclass);
+ALTER TABLE ONLY public.action_gestion_operation ALTER COLUMN ago_id SET
DEFAULT nextval('public.action_gestion_operation_ago_id_seq'::regclass);
+ALTER TABLE ONLY public.action_gestion_related ALTER COLUMN aga_id SET DEFAULT
nextval('public.action_gestion_related_aga_id_seq'::regclass);
+ALTER TABLE ONLY public.action_person ALTER COLUMN ap_id SET DEFAULT
nextval('public.action_person_ap_id_seq'::regclass);
+ALTER TABLE ONLY public.action_person_option ALTER COLUMN ap_id SET DEFAULT
nextval('public.action_person_option_ap_id_seq'::regclass);
+ALTER TABLE ONLY public.action_tags ALTER COLUMN at_id SET DEFAULT
nextval('public.action_tags_at_id_seq'::regclass);
+ALTER TABLE ONLY public.bookmark ALTER COLUMN b_id SET DEFAULT
nextval('public.bookmark_b_id_seq'::regclass);
+ALTER TABLE ONLY public.contact_option_ref ALTER COLUMN cor_id SET DEFAULT
nextval('public.contact_option_ref_cor_id_seq'::regclass);
+ALTER TABLE ONLY public.currency ALTER COLUMN id SET DEFAULT
nextval('public.currency_id_seq'::regclass);
+ALTER TABLE ONLY public.currency_history ALTER COLUMN id SET DEFAULT
nextval('public.currency_history_id_seq'::regclass);
+ALTER TABLE ONLY public.del_action ALTER COLUMN del_id SET DEFAULT
nextval('public.del_action_del_id_seq'::regclass);
+ALTER TABLE ONLY public.del_jrn ALTER COLUMN dj_id SET DEFAULT
nextval('public.del_jrn_dj_id_seq'::regclass);
+ALTER TABLE ONLY public.del_jrnx ALTER COLUMN djx_id SET DEFAULT
nextval('public.del_jrnx_djx_id_seq'::regclass);
+ALTER TABLE ONLY public.document_option ALTER COLUMN do_id SET DEFAULT
nextval('public.document_option_do_id_seq'::regclass);
+ALTER TABLE ONLY public.extension ALTER COLUMN ex_id SET DEFAULT
nextval('public.extension_ex_id_seq'::regclass);
+ALTER TABLE ONLY public.forecast ALTER COLUMN f_id SET DEFAULT
nextval('public.forecast_f_id_seq'::regclass);
+ALTER TABLE ONLY public.forecast_category ALTER COLUMN fc_id SET DEFAULT
nextval('public.forecast_cat_fc_id_seq'::regclass);
+ALTER TABLE ONLY public.forecast_item ALTER COLUMN fi_id SET DEFAULT
nextval('public.forecast_item_fi_id_seq'::regclass);
+ALTER TABLE ONLY public.jnt_document_option_contact ALTER COLUMN jdoc_id SET
DEFAULT nextval('public.jnt_document_option_contact_jdoc_id_seq'::regclass);
+ALTER TABLE ONLY public.jnt_letter ALTER COLUMN jl_id SET DEFAULT
nextval('public.jnt_letter_jl_id_seq'::regclass);
+ALTER TABLE ONLY public.jnt_tag_group_tag ALTER COLUMN jt_id SET DEFAULT
nextval('public.jnt_tag_group_tag_jt_id_seq'::regclass);
+ALTER TABLE ONLY public.jrn_info ALTER COLUMN ji_id SET DEFAULT
nextval('public.jrn_info_ji_id_seq'::regclass);
+ALTER TABLE ONLY public.jrn_note ALTER COLUMN n_id SET DEFAULT
nextval('public.jrn_note_n_id_seq'::regclass);
+ALTER TABLE ONLY public.key_distribution ALTER COLUMN kd_id SET DEFAULT
nextval('public.key_distribution_kd_id_seq'::regclass);
+ALTER TABLE ONLY public.key_distribution_activity ALTER COLUMN ka_id SET
DEFAULT nextval('public.key_distribution_activity_ka_id_seq'::regclass);
+ALTER TABLE ONLY public.key_distribution_detail ALTER COLUMN ke_id SET DEFAULT
nextval('public.key_distribution_detail_ke_id_seq'::regclass);
+ALTER TABLE ONLY public.key_distribution_ledger ALTER COLUMN kl_id SET DEFAULT
nextval('public.key_distribution_ledger_kl_id_seq'::regclass);
+ALTER TABLE ONLY public.letter_cred ALTER COLUMN lc_id SET DEFAULT
nextval('public.letter_cred_lc_id_seq'::regclass);
+ALTER TABLE ONLY public.letter_deb ALTER COLUMN ld_id SET DEFAULT
nextval('public.letter_deb_ld_id_seq'::regclass);
+ALTER TABLE ONLY public.link_action_type ALTER COLUMN l_id SET DEFAULT
nextval('public.link_action_type_l_id_seq'::regclass);
+ALTER TABLE ONLY public.menu_default ALTER COLUMN md_id SET DEFAULT
nextval('public.menu_default_md_id_seq'::regclass);
+ALTER TABLE ONLY public.operation_currency ALTER COLUMN id SET DEFAULT
nextval('public.operation_currency_id_seq'::regclass);
+ALTER TABLE ONLY public.operation_tag ALTER COLUMN opt_id SET DEFAULT
nextval('public.operation_tag_opt_id_seq'::regclass);
+ALTER TABLE ONLY public.parameter_extra ALTER COLUMN id SET DEFAULT
nextval('public.parameter_extra_id_seq'::regclass);
+ALTER TABLE ONLY public.payment_method ALTER COLUMN mp_id SET DEFAULT
nextval('public.mod_payment_mp_id_seq'::regclass);
+ALTER TABLE ONLY public.profile ALTER COLUMN p_id SET DEFAULT
nextval('public.profile_p_id_seq'::regclass);
+ALTER TABLE ONLY public.profile_menu ALTER COLUMN pm_id SET DEFAULT
nextval('public.profile_menu_pm_id_seq'::regclass);
+ALTER TABLE ONLY public.profile_mobile ALTER COLUMN pmo_id SET DEFAULT
nextval('public.profile_mobile_pmo_id_seq'::regclass);
+ALTER TABLE ONLY public.profile_sec_repository ALTER COLUMN ur_id SET DEFAULT
nextval('public.profile_sec_repository_ur_id_seq'::regclass);
+ALTER TABLE ONLY public.profile_user ALTER COLUMN pu_id SET DEFAULT
nextval('public.profile_user_pu_id_seq'::regclass);
+ALTER TABLE ONLY public.quant_fin ALTER COLUMN qf_id SET DEFAULT
nextval('public.quant_fin_qf_id_seq'::regclass);
+ALTER TABLE ONLY public.stock_change ALTER COLUMN c_id SET DEFAULT
nextval('public.stock_change_c_id_seq'::regclass);
+ALTER TABLE ONLY public.stock_repository ALTER COLUMN r_id SET DEFAULT
nextval('public.stock_repository_r_id_seq'::regclass);
+ALTER TABLE ONLY public.tag_group ALTER COLUMN tg_id SET DEFAULT
nextval('public.tag_group_tg_id_seq'::regclass);
+ALTER TABLE ONLY public.tags ALTER COLUMN t_id SET DEFAULT
nextval('public.tags_t_id_seq'::regclass);
+ALTER TABLE ONLY public.tmp_stockgood ALTER COLUMN s_id SET DEFAULT
nextval('public.tmp_stockgood_s_id_seq'::regclass);
+ALTER TABLE ONLY public.tmp_stockgood_detail ALTER COLUMN d_id SET DEFAULT
nextval('public.tmp_stockgood_detail_d_id_seq'::regclass);
+ALTER TABLE ONLY public.todo_list_shared ALTER COLUMN id SET DEFAULT
nextval('public.todo_list_shared_id_seq'::regclass);
+ALTER TABLE ONLY public.user_active_security ALTER COLUMN id SET DEFAULT
nextval('public.user_active_security_id_seq'::regclass);
+ALTER TABLE ONLY public.user_filter ALTER COLUMN id SET DEFAULT
nextval('public.user_filter_id_seq'::regclass);
+ALTER TABLE ONLY public.user_sec_action_profile ALTER COLUMN ua_id SET DEFAULT
nextval('public.user_sec_action_profile_ua_id_seq'::regclass);
+ALTER TABLE ONLY public.acc_other_tax
+ ADD CONSTRAINT acc_other_tax_pk PRIMARY KEY (ac_id);
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_pkey PRIMARY KEY (acd_id);
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_un UNIQUE (document_id,
action_gestion_comment_id);
+ALTER TABLE ONLY public.action_gestion_operation
ADD CONSTRAINT action_comment_operation_pkey PRIMARY KEY (ago_id);
-ALTER TABLE ONLY action_detail
+ALTER TABLE ONLY public.action_detail
ADD CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id);
-ALTER TABLE ONLY action_gestion_comment
+ALTER TABLE ONLY public.action_gestion_comment
ADD CONSTRAINT action_gestion_comment_pkey PRIMARY KEY (agc_id);
-ALTER TABLE ONLY action_gestion
+ALTER TABLE ONLY public.action_gestion
ADD CONSTRAINT action_gestion_pkey PRIMARY KEY (ag_id);
-ALTER TABLE ONLY action_gestion_related
+ALTER TABLE ONLY public.action_gestion_related
ADD CONSTRAINT action_gestion_related_pkey PRIMARY KEY (aga_id);
-ALTER TABLE ONLY action_person
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT action_person_option_pk PRIMARY KEY (ap_id);
+ALTER TABLE ONLY public.action_person
ADD CONSTRAINT action_person_pkey PRIMARY KEY (ap_id);
-ALTER TABLE ONLY action
+ALTER TABLE ONLY public.action
ADD CONSTRAINT action_pkey PRIMARY KEY (ac_id);
-ALTER TABLE ONLY action_tags
+ALTER TABLE ONLY public.action_tags
ADD CONSTRAINT action_tags_pkey PRIMARY KEY (at_id);
-ALTER TABLE ONLY attr_def
+ALTER TABLE ONLY public.attr_def
ADD CONSTRAINT attr_def_pkey PRIMARY KEY (ad_id);
-ALTER TABLE ONLY bilan
+ALTER TABLE ONLY public.bilan
ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name);
-ALTER TABLE ONLY bilan
+ALTER TABLE ONLY public.bilan
ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id);
-ALTER TABLE ONLY bookmark
+ALTER TABLE ONLY public.bookmark
ADD CONSTRAINT bookmark_pkey PRIMARY KEY (b_id);
-ALTER TABLE ONLY centralized
+ALTER TABLE ONLY public.centralized
ADD CONSTRAINT centralized_pkey PRIMARY KEY (c_id);
-ALTER TABLE ONLY del_action
+ALTER TABLE ONLY public.contact_option_ref
+ ADD CONSTRAINT contact_option_ref_pk PRIMARY KEY (cor_id);
+ALTER TABLE ONLY public.currency_history
+ ADD CONSTRAINT currency_history_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.currency
+ ADD CONSTRAINT currency_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.currency
+ ADD CONSTRAINT currency_un UNIQUE (cr_code_iso);
+ALTER TABLE ONLY public.del_action
ADD CONSTRAINT del_action_pkey PRIMARY KEY (del_id);
-ALTER TABLE ONLY del_jrn
+ALTER TABLE ONLY public.del_jrn
ADD CONSTRAINT dj_id PRIMARY KEY (dj_id);
-ALTER TABLE ONLY del_jrnx
+ALTER TABLE ONLY public.del_jrnx
ADD CONSTRAINT djx_id PRIMARY KEY (djx_id);
-ALTER TABLE ONLY document_modele
+ALTER TABLE ONLY public.document_component
+ ADD CONSTRAINT document_component_pk PRIMARY KEY (dc_id);
+ALTER TABLE ONLY public.document_component
+ ADD CONSTRAINT document_component_un UNIQUE (dc_code);
+ALTER TABLE ONLY public.document_modele
ADD CONSTRAINT document_modele_pkey PRIMARY KEY (md_id);
-ALTER TABLE ONLY document
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_ref_pk PRIMARY KEY (do_id);
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_un UNIQUE (do_code, document_type_id);
+ALTER TABLE ONLY public.document
ADD CONSTRAINT document_pkey PRIMARY KEY (d_id);
-ALTER TABLE ONLY document_state
+ALTER TABLE ONLY public.document_state
ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id);
-ALTER TABLE ONLY document_type
+ALTER TABLE ONLY public.document_type
ADD CONSTRAINT document_type_pkey PRIMARY KEY (dt_id);
-ALTER TABLE ONLY fiche_def
+ALTER TABLE ONLY public.fiche_def
ADD CONSTRAINT fiche_def_pkey PRIMARY KEY (fd_id);
-ALTER TABLE ONLY fiche_def_ref
+ALTER TABLE ONLY public.fiche_def_ref
ADD CONSTRAINT fiche_def_ref_pkey PRIMARY KEY (frd_id);
-ALTER TABLE ONLY fiche
+ALTER TABLE ONLY public.fiche
ADD CONSTRAINT fiche_pkey PRIMARY KEY (f_id);
-ALTER TABLE ONLY forecast_cat
+ALTER TABLE ONLY public.forecast_category
ADD CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id);
-ALTER TABLE ONLY forecast_item
+ALTER TABLE ONLY public.forecast_item
ADD CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id);
-ALTER TABLE ONLY forecast
+ALTER TABLE ONLY public.forecast
ADD CONSTRAINT forecast_pk PRIMARY KEY (f_id);
-ALTER TABLE ONLY form
+ALTER TABLE ONLY public.form_detail
ADD CONSTRAINT form_pkey PRIMARY KEY (fo_id);
-ALTER TABLE ONLY formdef
+ALTER TABLE ONLY public.form_definition
ADD CONSTRAINT formdef_pkey PRIMARY KEY (fr_id);
-ALTER TABLE ONLY attr_min
+ALTER TABLE ONLY public.attr_min
ADD CONSTRAINT frd_ad_attr_min_pk PRIMARY KEY (frd_id, ad_id);
-ALTER TABLE ONLY operation_analytique
+ALTER TABLE ONLY public.operation_analytique
ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id);
-ALTER TABLE ONLY tmp_pcmn
+ALTER TABLE ONLY public.tmp_pcmn
ADD CONSTRAINT id_ux UNIQUE (id);
-ALTER TABLE ONLY extension
+ALTER TABLE ONLY public.extension
ADD CONSTRAINT idx_ex_code UNIQUE (ex_code);
-ALTER TABLE ONLY info_def
+ALTER TABLE ONLY public.info_def
ADD CONSTRAINT info_def_pkey PRIMARY KEY (id_type);
-ALTER TABLE ONLY fiche_detail
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_pkey PRIMARY KEY (jdoc_id);
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_un UNIQUE (document_type_id,
contact_option_ref_id);
+ALTER TABLE ONLY public.fiche_detail
ADD CONSTRAINT jnt_fic_att_value_pkey PRIMARY KEY (jft_id);
-ALTER TABLE ONLY jnt_letter
+ALTER TABLE ONLY public.jnt_letter
ADD CONSTRAINT jnt_letter_pk PRIMARY KEY (jl_id);
-ALTER TABLE ONLY jrn_def
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_pkey PRIMARY KEY (jt_id);
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_un UNIQUE (tag_id, tag_group_id);
+ALTER TABLE ONLY public.jrn_def
ADD CONSTRAINT jrn_def_jrn_def_name_key UNIQUE (jrn_def_name);
-ALTER TABLE ONLY jrn_def
+ALTER TABLE ONLY public.jrn_def
ADD CONSTRAINT jrn_def_pkey PRIMARY KEY (jrn_def_id);
-ALTER TABLE ONLY jrn_info
+ALTER TABLE ONLY public.jrn_info
ADD CONSTRAINT jrn_info_pkey PRIMARY KEY (ji_id);
-ALTER TABLE ONLY jrn_periode
+ALTER TABLE ONLY public.jrn_periode
ADD CONSTRAINT jrn_periode_periode_ledger UNIQUE (jrn_def_id, p_id);
-ALTER TABLE ONLY jrn_periode
+ALTER TABLE ONLY public.jrn_periode
ADD CONSTRAINT jrn_periode_pk PRIMARY KEY (id);
-ALTER TABLE ONLY jrn
- ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id, jr_def_id);
-ALTER TABLE ONLY jrn_rapt
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id);
+ALTER TABLE ONLY public.jrn_rapt
ADD CONSTRAINT jrn_rapt_pkey PRIMARY KEY (jra_id);
-ALTER TABLE ONLY jrn_type
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_pk PRIMARY KEY (jt_id);
+ALTER TABLE ONLY public.jrn_type
ADD CONSTRAINT jrn_type_pkey PRIMARY KEY (jrn_type_id);
-ALTER TABLE ONLY jrn_note
+ALTER TABLE ONLY public.jrn_note
ADD CONSTRAINT jrnx_note_pkey PRIMARY KEY (n_id);
-ALTER TABLE ONLY jrnx
+ALTER TABLE ONLY public.jrnx
ADD CONSTRAINT jrnx_pkey PRIMARY KEY (j_id);
-ALTER TABLE ONLY key_distribution_activity
+ALTER TABLE ONLY public.key_distribution_activity
ADD CONSTRAINT key_distribution_activity_pkey PRIMARY KEY (ka_id);
-ALTER TABLE ONLY key_distribution_detail
+ALTER TABLE ONLY public.key_distribution_detail
ADD CONSTRAINT key_distribution_detail_pkey PRIMARY KEY (ke_id);
-ALTER TABLE ONLY key_distribution_ledger
+ALTER TABLE ONLY public.key_distribution_ledger
ADD CONSTRAINT key_distribution_ledger_pkey PRIMARY KEY (kl_id);
-ALTER TABLE ONLY key_distribution
+ALTER TABLE ONLY public.key_distribution
ADD CONSTRAINT key_distribution_pkey PRIMARY KEY (kd_id);
-ALTER TABLE ONLY letter_cred
+ALTER TABLE ONLY public.letter_cred
ADD CONSTRAINT letter_cred_j_id_key UNIQUE (j_id);
-ALTER TABLE ONLY letter_cred
+ALTER TABLE ONLY public.letter_cred
ADD CONSTRAINT letter_cred_pk PRIMARY KEY (lc_id);
-ALTER TABLE ONLY letter_deb
+ALTER TABLE ONLY public.letter_deb
ADD CONSTRAINT letter_deb_j_id_key UNIQUE (j_id);
-ALTER TABLE ONLY letter_deb
+ALTER TABLE ONLY public.letter_deb
ADD CONSTRAINT letter_deb_pk PRIMARY KEY (ld_id);
-ALTER TABLE ONLY link_action_type
+ALTER TABLE ONLY public.link_action_type
ADD CONSTRAINT link_action_type_pkey PRIMARY KEY (l_id);
-ALTER TABLE ONLY menu_default
+ALTER TABLE ONLY public.menu_default
ADD CONSTRAINT menu_default_md_code_key UNIQUE (md_code);
-ALTER TABLE ONLY menu_default
+ALTER TABLE ONLY public.menu_default
ADD CONSTRAINT menu_default_pkey PRIMARY KEY (md_id);
-ALTER TABLE ONLY menu_ref
+ALTER TABLE ONLY public.menu_ref
ADD CONSTRAINT menu_ref_pkey PRIMARY KEY (me_code);
-ALTER TABLE ONLY mod_payment
+ALTER TABLE ONLY public.payment_method
ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id);
-ALTER TABLE ONLY op_predef
+ALTER TABLE ONLY public.op_predef
ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name, jrn_def_id);
-ALTER TABLE ONLY op_predef
+ALTER TABLE ONLY public.op_predef
ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id);
-ALTER TABLE ONLY op_predef_detail
+ALTER TABLE ONLY public.op_predef_detail
ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id);
-ALTER TABLE ONLY parameter
+ALTER TABLE ONLY public.operation_currency
+ ADD CONSTRAINT operation_currency_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.operation_exercice_detail
+ ADD CONSTRAINT operation_exercice_detail_pkey PRIMARY KEY (oed_id);
+ALTER TABLE ONLY public.operation_exercice
+ ADD CONSTRAINT operation_exercice_pkey PRIMARY KEY (oe_id);
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT operation_tag_pkey PRIMARY KEY (opt_id);
+ALTER TABLE ONLY public.parameter_extra
+ ADD CONSTRAINT parameter_extra_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.parameter
ADD CONSTRAINT parameter_pkey PRIMARY KEY (pr_id);
-ALTER TABLE ONLY parm_code
+ALTER TABLE ONLY public.parm_appearance
+ ADD CONSTRAINT parm_appearance_pkey PRIMARY KEY (a_code);
+ALTER TABLE ONLY public.parm_code
ADD CONSTRAINT parm_code_pkey PRIMARY KEY (p_code);
-ALTER TABLE ONLY parm_money
+ALTER TABLE ONLY public.parm_money
ADD CONSTRAINT parm_money_pkey PRIMARY KEY (pm_code);
-ALTER TABLE ONLY parm_periode
+ALTER TABLE ONLY public.parm_periode
ADD CONSTRAINT parm_periode_pkey PRIMARY KEY (p_id);
-ALTER TABLE ONLY parm_poste
+ALTER TABLE ONLY public.parm_poste
ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value);
-ALTER TABLE ONLY extension
+ALTER TABLE ONLY public.parameter_extra
+ ADD CONSTRAINT pe_code_ux UNIQUE (pe_code);
+ALTER TABLE ONLY public.extension
ADD CONSTRAINT pk_extension PRIMARY KEY (ex_id);
-ALTER TABLE ONLY groupe_analytique
+ALTER TABLE ONLY public.groupe_analytique
ADD CONSTRAINT pk_ga_id PRIMARY KEY (ga_id);
-ALTER TABLE ONLY jnt_fic_attr
+ALTER TABLE ONLY public.jnt_fic_attr
ADD CONSTRAINT pk_jnt_fic_attr PRIMARY KEY (jnt_id);
-ALTER TABLE ONLY user_local_pref
+ALTER TABLE ONLY public.user_local_pref
ADD CONSTRAINT pk_user_local_pref PRIMARY KEY (user_id, parameter_type);
-ALTER TABLE ONLY plan_analytique
+ALTER TABLE ONLY public.plan_analytique
ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name);
-ALTER TABLE ONLY plan_analytique
+ALTER TABLE ONLY public.plan_analytique
ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id);
-ALTER TABLE ONLY poste_analytique
+ALTER TABLE ONLY public.poste_analytique
ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id);
-ALTER TABLE ONLY profile_menu
+ALTER TABLE ONLY public.profile_menu
ADD CONSTRAINT profile_menu_pkey PRIMARY KEY (pm_id);
-ALTER TABLE ONLY profile_menu_type
+ALTER TABLE ONLY public.profile_menu_type
ADD CONSTRAINT profile_menu_type_pkey PRIMARY KEY (pm_type);
-ALTER TABLE ONLY profile
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_code_uq UNIQUE (p_id, me_code);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_pkey PRIMARY KEY (pmo_id);
+ALTER TABLE ONLY public.profile
ADD CONSTRAINT profile_pkey PRIMARY KEY (p_id);
-ALTER TABLE ONLY profile_sec_repository
+ALTER TABLE ONLY public.profile_sec_repository
ADD CONSTRAINT profile_sec_repository_pkey PRIMARY KEY (ur_id);
-ALTER TABLE ONLY profile_sec_repository
+ALTER TABLE ONLY public.profile_sec_repository
ADD CONSTRAINT profile_sec_repository_r_id_p_id_u UNIQUE (r_id, p_id);
-ALTER TABLE ONLY profile_user
+ALTER TABLE ONLY public.profile_user
ADD CONSTRAINT profile_user_pkey PRIMARY KEY (pu_id);
-ALTER TABLE ONLY profile_user
+ALTER TABLE ONLY public.profile_user
ADD CONSTRAINT profile_user_user_name_key UNIQUE (user_name, p_id);
-ALTER TABLE ONLY quant_purchase
+ALTER TABLE ONLY public.quant_purchase
ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_id);
-ALTER TABLE ONLY quant_sold
+ALTER TABLE ONLY public.quant_sold
ADD CONSTRAINT qs_id_pk PRIMARY KEY (qs_id);
-ALTER TABLE ONLY quant_fin
+ALTER TABLE ONLY public.quant_fin
ADD CONSTRAINT quant_fin_pk PRIMARY KEY (qf_id);
-ALTER TABLE ONLY stock_change
+ALTER TABLE ONLY public.stock_change
ADD CONSTRAINT stock_change_pkey PRIMARY KEY (c_id);
-ALTER TABLE ONLY stock_goods
+ALTER TABLE ONLY public.stock_goods
ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id);
-ALTER TABLE ONLY stock_repository
+ALTER TABLE ONLY public.stock_repository
ADD CONSTRAINT stock_repository_pkey PRIMARY KEY (r_id);
-ALTER TABLE ONLY tags
+ALTER TABLE ONLY public.tag_group
+ ADD CONSTRAINT tag_group_pk PRIMARY KEY (tg_id);
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT tag_operation_uq UNIQUE (jrn_id, tag_id);
+ALTER TABLE ONLY public.tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (t_id);
-ALTER TABLE ONLY tmp_pcmn
+ALTER TABLE ONLY public.tmp_pcmn
ADD CONSTRAINT tmp_pcmn_pkey PRIMARY KEY (pcm_val);
-ALTER TABLE ONLY tmp_stockgood_detail
+ALTER TABLE ONLY public.tmp_stockgood_detail
ADD CONSTRAINT tmp_stockgood_detail_pkey PRIMARY KEY (d_id);
-ALTER TABLE ONLY tmp_stockgood
+ALTER TABLE ONLY public.tmp_stockgood
ADD CONSTRAINT tmp_stockgood_pkey PRIMARY KEY (s_id);
-ALTER TABLE ONLY todo_list
+ALTER TABLE ONLY public.todo_list
ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id);
-ALTER TABLE ONLY todo_list_shared
+ALTER TABLE ONLY public.todo_list_shared
ADD CONSTRAINT todo_list_shared_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY tool_uos
+ALTER TABLE ONLY public.tool_uos
ADD CONSTRAINT tool_uos_pkey PRIMARY KEY (uos_value);
-ALTER TABLE ONLY tva_rate
+ALTER TABLE ONLY public.tva_rate
+ ADD CONSTRAINT tva_code_unique UNIQUE (tva_code);
+ALTER TABLE ONLY public.tva_rate
ADD CONSTRAINT tva_id_pk PRIMARY KEY (tva_id);
-ALTER TABLE ONLY user_sec_jrn
+ALTER TABLE ONLY public.user_sec_jrn
ADD CONSTRAINT uniq_user_ledger UNIQUE (uj_login, uj_jrn_id);
-ALTER TABLE ONLY todo_list_shared
+ALTER TABLE ONLY public.todo_list_shared
ADD CONSTRAINT unique_todo_list_id_login UNIQUE (todo_list_id, use_login);
-ALTER TABLE ONLY user_active_security
+ALTER TABLE ONLY public.user_active_security
ADD CONSTRAINT user_active_security_pk PRIMARY KEY (id);
-ALTER TABLE ONLY user_filter
+ALTER TABLE ONLY public.user_filter
ADD CONSTRAINT user_filter_pkey PRIMARY KEY (id);
-ALTER TABLE ONLY user_sec_act
+ALTER TABLE ONLY public.user_sec_act
ADD CONSTRAINT user_sec_act_pkey PRIMARY KEY (ua_id);
-ALTER TABLE ONLY user_sec_action_profile
+ALTER TABLE ONLY public.user_sec_action_profile
ADD CONSTRAINT user_sec_action_profile_p_id_p_granted_u UNIQUE (p_id,
p_granted);
-ALTER TABLE ONLY user_sec_action_profile
+ALTER TABLE ONLY public.user_sec_action_profile
ADD CONSTRAINT user_sec_action_profile_pkey PRIMARY KEY (ua_id);
-ALTER TABLE ONLY user_sec_jrn
+ALTER TABLE ONLY public.user_sec_jrn
ADD CONSTRAINT user_sec_jrn_pkey PRIMARY KEY (uj_id);
-ALTER TABLE ONLY action_gestion_related
+ALTER TABLE ONLY public.action_gestion_related
ADD CONSTRAINT ux_aga_least_aga_greatest UNIQUE (aga_least, aga_greatest);
-ALTER TABLE ONLY jrn
+ALTER TABLE ONLY public.jrn
ADD CONSTRAINT ux_internal UNIQUE (jr_internal);
-ALTER TABLE ONLY version
+ALTER TABLE ONLY public.version
ADD CONSTRAINT version_pkey PRIMARY KEY (val);
-ALTER TABLE ONLY centralized
- ADD CONSTRAINT "$1" FOREIGN KEY (c_jrn_def) REFERENCES jrn_def(jrn_def_id);
-ALTER TABLE ONLY user_sec_act
- ADD CONSTRAINT "$1" FOREIGN KEY (ua_act_id) REFERENCES action(ac_id);
-ALTER TABLE ONLY fiche_def
- ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id);
-ALTER TABLE ONLY attr_min
- ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id);
-ALTER TABLE ONLY fiche
- ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id);
-ALTER TABLE ONLY fiche_detail
- ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES fiche(f_id);
-ALTER TABLE ONLY jnt_fic_attr
- ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id);
-ALTER TABLE ONLY jrn
- ADD CONSTRAINT "$1" FOREIGN KEY (jr_def_id) REFERENCES jrn_def(jrn_def_id);
-ALTER TABLE ONLY jrn_def
- ADD CONSTRAINT "$1" FOREIGN KEY (jrn_def_type) REFERENCES
jrn_type(jrn_type_id);
-ALTER TABLE ONLY jrnx
- ADD CONSTRAINT "$2" FOREIGN KEY (j_jrn_def) REFERENCES jrn_def(jrn_def_id);
-ALTER TABLE ONLY attr_min
- ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id);
-ALTER TABLE ONLY action_gestion_operation
- ADD CONSTRAINT action_comment_operation_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_gestion_operation
- ADD CONSTRAINT action_comment_operation_jr_id_fkey FOREIGN KEY (jr_id)
REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_detail
- ADD CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_person
- ADD CONSTRAINT action_gestion_ag_id_fk2 FOREIGN KEY (ag_id) REFERENCES
action_gestion(ag_id);
-ALTER TABLE ONLY action_gestion_comment
- ADD CONSTRAINT action_gestion_comment_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_gestion_related
- ADD CONSTRAINT action_gestion_related_aga_greatest_fkey FOREIGN KEY
(aga_greatest) REFERENCES action_gestion(ag_id) ON UPDATE CASCADE ON DELETE
CASCADE;
-ALTER TABLE ONLY action_gestion_related
- ADD CONSTRAINT action_gestion_related_aga_least_fkey FOREIGN KEY
(aga_least) REFERENCES action_gestion(ag_id) ON UPDATE CASCADE ON DELETE
CASCADE;
-ALTER TABLE ONLY action_gestion_related
- ADD CONSTRAINT action_gestion_related_aga_type_fkey FOREIGN KEY (aga_type)
REFERENCES link_action_type(l_id);
-ALTER TABLE ONLY action_person
- ADD CONSTRAINT action_person_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_person
- ADD CONSTRAINT action_person_f_id_fkey FOREIGN KEY (f_id) REFERENCES
fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_tags
- ADD CONSTRAINT action_tags_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_tags
- ADD CONSTRAINT action_tags_t_id_fkey FOREIGN KEY (t_id) REFERENCES
tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY forecast_item
- ADD CONSTRAINT card FOREIGN KEY (fi_card) REFERENCES fiche(f_id) ON UPDATE
CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY fiche_detail
- ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_person
- ADD CONSTRAINT fiche_f_id_fk2 FOREIGN KEY (f_id) REFERENCES fiche(f_id);
-ALTER TABLE ONLY action_gestion
- ADD CONSTRAINT fiche_f_id_fk3 FOREIGN KEY (f_id_dest) REFERENCES
fiche(f_id);
-ALTER TABLE ONLY action_gestion
- ADD CONSTRAINT fk_action_gestion_document_type FOREIGN KEY (ag_type)
REFERENCES document_type(dt_id);
-ALTER TABLE ONLY quant_fin
- ADD CONSTRAINT fk_card FOREIGN KEY (qf_bank) REFERENCES fiche(f_id) ON
UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY quant_fin
- ADD CONSTRAINT fk_card_other FOREIGN KEY (qf_other) REFERENCES fiche(f_id)
ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY forecast_item
- ADD CONSTRAINT fk_forecast FOREIGN KEY (fc_id) REFERENCES
forecast_cat(fc_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_info
- ADD CONSTRAINT fk_info_def FOREIGN KEY (id_type) REFERENCES
info_def(id_type) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_info
- ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE
CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY quant_fin
- ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE
CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY groupe_analytique
- ADD CONSTRAINT fk_pa_id FOREIGN KEY (pa_id) REFERENCES
plan_analytique(pa_id) ON DELETE CASCADE;
-ALTER TABLE ONLY jrnx
- ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (j_poste) REFERENCES
tmp_pcmn(pcm_val);
-ALTER TABLE ONLY centralized
- ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (c_poste) REFERENCES
tmp_pcmn(pcm_val);
-ALTER TABLE ONLY stock_goods
- ADD CONSTRAINT fk_stock_good_f_id FOREIGN KEY (f_id) REFERENCES
fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY todo_list_shared
- ADD CONSTRAINT fk_todo_list_shared_todo_list FOREIGN KEY (todo_list_id)
REFERENCES todo_list(tl_id);
-ALTER TABLE ONLY forecast_cat
- ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES forecast(f_id)
ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY forecast
- ADD CONSTRAINT forecast_f_end_date_fkey FOREIGN KEY (f_end_date)
REFERENCES parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
-ALTER TABLE ONLY forecast
- ADD CONSTRAINT forecast_f_start_date_fkey FOREIGN KEY (f_start_date)
REFERENCES parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
-ALTER TABLE ONLY form
- ADD CONSTRAINT formdef_fk FOREIGN KEY (fo_fr_id) REFERENCES formdef(fr_id)
ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY letter_cred
- ADD CONSTRAINT jnt_cred_fk FOREIGN KEY (jl_id) REFERENCES
jnt_letter(jl_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY letter_deb
- ADD CONSTRAINT jnt_deb_fk FOREIGN KEY (jl_id) REFERENCES jnt_letter(jl_id)
ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jnt_fic_attr
- ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY op_predef
- ADD CONSTRAINT jrn_def_id_fk FOREIGN KEY (jrn_def_id) REFERENCES
jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_periode
- ADD CONSTRAINT jrn_per_jrn_def_id FOREIGN KEY (jrn_def_id) REFERENCES
jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_periode
- ADD CONSTRAINT jrn_periode_p_id FOREIGN KEY (p_id) REFERENCES
parm_periode(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_rapt
- ADD CONSTRAINT jrn_rapt_jr_id_fkey FOREIGN KEY (jr_id) REFERENCES
jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrn_rapt
- ADD CONSTRAINT jrn_rapt_jra_concerned_fkey FOREIGN KEY (jra_concerned)
REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY jrnx
- ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche(f_id) ON
UPDATE CASCADE;
-ALTER TABLE ONLY jrn_note
- ADD CONSTRAINT jrnx_note_j_id_fkey FOREIGN KEY (jr_id) REFERENCES
jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_activity
- ADD CONSTRAINT key_distribution_activity_ke_id_fkey FOREIGN KEY (ke_id)
REFERENCES key_distribution_detail(ke_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_activity
- ADD CONSTRAINT key_distribution_activity_pa_id_fkey FOREIGN KEY (pa_id)
REFERENCES plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_activity
- ADD CONSTRAINT key_distribution_activity_po_id_fkey FOREIGN KEY (po_id)
REFERENCES poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_detail
- ADD CONSTRAINT key_distribution_detail_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_ledger
- ADD CONSTRAINT key_distribution_ledger_jrn_def_id_fkey FOREIGN KEY
(jrn_def_id) REFERENCES jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY key_distribution_ledger
- ADD CONSTRAINT key_distribution_ledger_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY letter_cred
- ADD CONSTRAINT letter_cred_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON
UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY letter_deb
- ADD CONSTRAINT letter_deb_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON
UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY document_modele
- ADD CONSTRAINT md_type FOREIGN KEY (md_type) REFERENCES
document_type(dt_id);
-ALTER TABLE ONLY mod_payment
- ADD CONSTRAINT mod_payment_jrn_def_id_fk FOREIGN KEY (jrn_def_id)
REFERENCES jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY mod_payment
- ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES
fiche_def(fd_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY mod_payment
- ADD CONSTRAINT mod_payment_mp_jrn_def_id_fkey FOREIGN KEY (mp_jrn_def_id)
REFERENCES jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY operation_analytique
- ADD CONSTRAINT operation_analytique_fiche_id_fk FOREIGN KEY (f_id)
REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY operation_analytique
- ADD CONSTRAINT operation_analytique_j_id_fkey FOREIGN KEY (j_id)
REFERENCES jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY operation_analytique
- ADD CONSTRAINT operation_analytique_po_id_fkey FOREIGN KEY (po_id)
REFERENCES poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY poste_analytique
- ADD CONSTRAINT poste_analytique_pa_id_fkey FOREIGN KEY (pa_id) REFERENCES
plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY action_gestion
- ADD CONSTRAINT profile_fkey FOREIGN KEY (ag_dest) REFERENCES profile(p_id)
ON UPDATE SET NULL ON DELETE SET NULL;
-ALTER TABLE ONLY profile_menu
- ADD CONSTRAINT profile_menu_me_code_fkey FOREIGN KEY (me_code) REFERENCES
menu_ref(me_code) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY profile_menu
- ADD CONSTRAINT profile_menu_p_id_fkey FOREIGN KEY (p_id) REFERENCES
profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY profile_menu
- ADD CONSTRAINT profile_menu_type_fkey FOREIGN KEY (p_type_display)
REFERENCES profile_menu_type(pm_type);
-ALTER TABLE ONLY profile_sec_repository
- ADD CONSTRAINT profile_sec_repository_p_id_fkey FOREIGN KEY (p_id)
REFERENCES profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY profile_sec_repository
- ADD CONSTRAINT profile_sec_repository_r_id_fkey FOREIGN KEY (r_id)
REFERENCES stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY profile_user
- ADD CONSTRAINT profile_user_p_id_fkey FOREIGN KEY (p_id) REFERENCES
profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY quant_purchase
- ADD CONSTRAINT qp_vat_code_fk FOREIGN KEY (qp_vat_code) REFERENCES
tva_rate(tva_id);
-ALTER TABLE ONLY quant_sold
- ADD CONSTRAINT qs_vat_code_fk FOREIGN KEY (qs_vat_code) REFERENCES
tva_rate(tva_id);
-ALTER TABLE ONLY quant_purchase
- ADD CONSTRAINT quant_purchase_j_id_fkey FOREIGN KEY (j_id) REFERENCES
jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY quant_purchase
- ADD CONSTRAINT quant_purchase_qp_internal_fkey FOREIGN KEY (qp_internal)
REFERENCES jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE
INITIALLY DEFERRED;
-ALTER TABLE ONLY quant_sold
- ADD CONSTRAINT quant_sold_j_id_fkey FOREIGN KEY (j_id) REFERENCES
jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY quant_sold
- ADD CONSTRAINT quant_sold_qs_internal_fkey FOREIGN KEY (qs_internal)
REFERENCES jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE
INITIALLY DEFERRED;
-ALTER TABLE ONLY stock_change
- ADD CONSTRAINT stock_change_r_id_fkey FOREIGN KEY (r_id) REFERENCES
stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY stock_goods
- ADD CONSTRAINT stock_goods_c_id_fkey FOREIGN KEY (c_id) REFERENCES
stock_change(c_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY stock_goods
- ADD CONSTRAINT stock_goods_j_id_fkey FOREIGN KEY (j_id) REFERENCES
jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY tmp_stockgood_detail
- ADD CONSTRAINT tmp_stockgood_detail_s_id_fkey FOREIGN KEY (s_id)
REFERENCES tmp_stockgood(s_id) ON DELETE CASCADE;
-ALTER TABLE ONLY user_sec_jrn
- ADD CONSTRAINT uj_priv_id_fkey FOREIGN KEY (uj_jrn_id) REFERENCES
jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY user_sec_action_profile
- ADD CONSTRAINT user_sec_action_profile_p_granted_fkey FOREIGN KEY
(p_granted) REFERENCES profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-ALTER TABLE ONLY user_sec_action_profile
- ADD CONSTRAINT user_sec_action_profile_p_id_fkey FOREIGN KEY (p_id)
REFERENCES profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
-CREATE TRIGGER action_gestion_t_insert_update BEFORE INSERT OR UPDATE ON
action_gestion FOR EACH ROW EXECUTE PROCEDURE
comptaproc.action_gestion_ins_upd();
-CREATE TRIGGER document_modele_validate BEFORE INSERT OR UPDATE ON
document_modele FOR EACH ROW EXECUTE PROCEDURE
comptaproc.t_document_modele_validate();
-CREATE TRIGGER document_validate BEFORE INSERT OR UPDATE ON document FOR EACH
ROW EXECUTE PROCEDURE comptaproc.t_document_validate();
-CREATE TRIGGER fiche_def_ins_upd BEFORE INSERT OR UPDATE ON fiche_def FOR EACH
ROW EXECUTE PROCEDURE comptaproc.fiche_def_ins_upd();
-CREATE TRIGGER fiche_detail_upd_trg AFTER UPDATE ON fiche_detail FOR EACH ROW
EXECUTE PROCEDURE comptaproc.fiche_detail_qcode_upd();
-CREATE TRIGGER info_def_ins_upd_t BEFORE INSERT OR UPDATE ON info_def FOR EACH
ROW EXECUTE PROCEDURE comptaproc.info_def_ins_upd();
-CREATE TRIGGER jrn_def_description_ins_upd BEFORE INSERT OR UPDATE ON jrn_def
FOR EACH ROW EXECUTE PROCEDURE comptaproc.t_jrn_def_description();
-CREATE TRIGGER opd_limit_description BEFORE INSERT OR UPDATE ON op_predef FOR
EACH ROW EXECUTE PROCEDURE comptaproc.opd_limit_description();
-CREATE TRIGGER parm_periode_check_periode_trg BEFORE INSERT OR UPDATE ON
parm_periode FOR EACH ROW EXECUTE PROCEDURE comptaproc.check_periode();
-CREATE TRIGGER profile_user_ins_upd BEFORE INSERT OR UPDATE ON profile_user
FOR EACH ROW EXECUTE PROCEDURE comptaproc.trg_profile_user_ins_upd();
-CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON quant_purchase
FOR EACH ROW EXECUTE PROCEDURE comptaproc.quant_purchase_ins_upd();
-CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON quant_sold FOR
EACH ROW EXECUTE PROCEDURE comptaproc.quant_sold_ins_upd();
-CREATE TRIGGER remove_action_gestion AFTER DELETE ON fiche FOR EACH ROW
EXECUTE PROCEDURE comptaproc.card_after_delete();
-CREATE TRIGGER t_check_balance AFTER INSERT OR UPDATE ON jrn FOR EACH ROW
EXECUTE PROCEDURE comptaproc.proc_check_balance();
-CREATE TRIGGER t_check_jrn BEFORE INSERT OR DELETE OR UPDATE ON jrn FOR EACH
ROW EXECUTE PROCEDURE comptaproc.jrn_check_periode();
-CREATE TRIGGER t_group_analytic_del BEFORE DELETE ON groupe_analytique FOR
EACH ROW EXECUTE PROCEDURE comptaproc.group_analytique_del();
-CREATE TRIGGER t_group_analytic_ins_upd BEFORE INSERT OR UPDATE ON
groupe_analytique FOR EACH ROW EXECUTE PROCEDURE
comptaproc.group_analytic_ins_upd();
-CREATE TRIGGER t_jnt_fic_attr_ins AFTER INSERT ON jnt_fic_attr FOR EACH ROW
EXECUTE PROCEDURE comptaproc.jnt_fic_attr_ins();
-CREATE TRIGGER t_jrn_def_add_periode AFTER INSERT ON jrn_def FOR EACH ROW
EXECUTE PROCEDURE comptaproc.jrn_def_add();
-CREATE TRIGGER t_jrn_def_delete BEFORE DELETE ON jrn_def FOR EACH ROW EXECUTE
PROCEDURE comptaproc.jrn_def_delete();
-CREATE TRIGGER t_jrn_del BEFORE DELETE ON jrn FOR EACH ROW EXECUTE PROCEDURE
comptaproc.jrn_del();
-CREATE TRIGGER t_jrnx_del BEFORE DELETE ON jrnx FOR EACH ROW EXECUTE PROCEDURE
comptaproc.jrnx_del();
-CREATE TRIGGER t_jrnx_ins BEFORE INSERT ON jrnx FOR EACH ROW EXECUTE PROCEDURE
comptaproc.jrnx_ins();
-CREATE TRIGGER t_jrnx_upd BEFORE UPDATE ON jrnx FOR EACH ROW EXECUTE PROCEDURE
comptaproc.jrnx_ins();
-CREATE TRIGGER t_letter_del AFTER DELETE ON jrnx FOR EACH ROW EXECUTE
PROCEDURE comptaproc.jrnx_letter_del();
-CREATE TRIGGER t_plan_analytique_ins_upd BEFORE INSERT OR UPDATE ON
plan_analytique FOR EACH ROW EXECUTE PROCEDURE
comptaproc.plan_analytic_ins_upd();
-CREATE TRIGGER t_poste_analytique_ins_upd BEFORE INSERT OR UPDATE ON
poste_analytique FOR EACH ROW EXECUTE PROCEDURE
comptaproc.poste_analytique_ins_upd();
-CREATE TRIGGER t_tmp_pcm_alphanum_ins_upd BEFORE INSERT OR UPDATE ON tmp_pcmn
FOR EACH ROW EXECUTE PROCEDURE comptaproc.tmp_pcmn_alphanum_ins_upd();
-CREATE TRIGGER t_tmp_pcmn_ins BEFORE INSERT ON tmp_pcmn FOR EACH ROW EXECUTE
PROCEDURE comptaproc.tmp_pcmn_ins();
-CREATE TRIGGER todo_list_ins_upd BEFORE INSERT OR UPDATE ON todo_list FOR EACH
ROW EXECUTE PROCEDURE comptaproc.trg_todo_list_ins_upd();
-CREATE TRIGGER todo_list_shared_ins_upd BEFORE INSERT OR UPDATE ON
todo_list_shared FOR EACH ROW EXECUTE PROCEDURE
comptaproc.trg_todo_list_shared_ins_upd();
-CREATE TRIGGER trg_action_gestion_related BEFORE INSERT OR UPDATE ON
action_gestion_related FOR EACH ROW EXECUTE PROCEDURE
comptaproc.action_gestion_related_ins_up();
-CREATE TRIGGER trg_category_card_before_delete BEFORE DELETE ON fiche_def FOR
EACH ROW EXECUTE PROCEDURE comptaproc.category_card_before_delete();
-CREATE TRIGGER trg_extension_ins_upd BEFORE INSERT OR UPDATE ON extension FOR
EACH ROW EXECUTE PROCEDURE comptaproc.extension_ins_upd();
-CREATE TRIGGER trigger_document_type_i AFTER INSERT ON document_type FOR EACH
ROW EXECUTE PROCEDURE comptaproc.t_document_type_insert();
-CREATE TRIGGER trigger_jrn_def_sequence_i AFTER INSERT ON jrn_def FOR EACH ROW
EXECUTE PROCEDURE comptaproc.t_jrn_def_sequence();
-CREATE TRIGGER user_sec_act_ins_upd BEFORE INSERT OR UPDATE ON user_sec_act
FOR EACH ROW EXECUTE PROCEDURE comptaproc.trg_user_sec_act_ins_upd();
-CREATE TRIGGER user_sec_jrn_after_ins_upd BEFORE INSERT OR UPDATE ON
user_sec_jrn FOR EACH ROW EXECUTE PROCEDURE
comptaproc.trg_user_sec_jrn_ins_upd();
-COMMENT ON CONSTRAINT uniq_user_ledger ON user_sec_jrn IS 'Create an unique
combination user / ledger';
-COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS
'Truncate the column ag_title to 70 char';
-COMMENT ON TRIGGER profile_user_ins_upd ON profile_user IS 'Force the column
user_name to lowercase';
-COMMENT ON TRIGGER t_jrnx_ins ON jrnx IS 'check that the qcode used by the
card exists and format it : uppercase and trim the space';
-COMMENT ON TRIGGER t_letter_del ON jrnx IS 'Delete the lettering for this row';
-COMMENT ON TRIGGER todo_list_ins_upd ON todo_list IS 'Force the column
use_login to lowercase';
-COMMENT ON TRIGGER todo_list_shared_ins_upd ON todo_list_shared IS 'Force the
column ua_login to lowercase';
-COMMENT ON TRIGGER user_sec_act_ins_upd ON user_sec_act IS 'Force the column
ua_login to lowercase';
-COMMENT ON TRIGGER user_sec_jrn_after_ins_upd ON user_sec_jrn IS 'Force the
column uj_login to lowercase';
+ALTER TABLE ONLY public.centralized
+ ADD CONSTRAINT "$1" FOREIGN KEY (c_jrn_def) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.user_sec_act
+ ADD CONSTRAINT "$1" FOREIGN KEY (ua_act_id) REFERENCES
public.action(ac_id);
+ALTER TABLE ONLY public.fiche_def
+ ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES
public.fiche_def_ref(frd_id);
+ALTER TABLE ONLY public.attr_min
+ ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES
public.fiche_def_ref(frd_id);
+ALTER TABLE ONLY public.fiche
+ ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES public.fiche_def(fd_id);
+ALTER TABLE ONLY public.fiche_detail
+ ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES public.fiche(f_id);
+ALTER TABLE ONLY public.jnt_fic_attr
+ ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES public.fiche_def(fd_id);
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT "$1" FOREIGN KEY (jr_def_id) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT "$1" FOREIGN KEY (jrn_def_type) REFERENCES
public.jrn_type(jrn_type_id);
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT "$2" FOREIGN KEY (j_jrn_def) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.attr_min
+ ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES public.attr_def(ad_id);
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_action_gestion_comment_id_fkey
FOREIGN KEY (action_gestion_comment_id) REFERENCES
public.action_gestion_comment(agc_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_document_id_fkey FOREIGN KEY
(document_id) REFERENCES public.document(d_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.action_gestion_operation
+ ADD CONSTRAINT action_comment_operation_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_operation
+ ADD CONSTRAINT action_comment_operation_jr_id_fkey FOREIGN KEY (jr_id)
REFERENCES public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_detail
+ ADD CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_gestion_ag_id_fk2 FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_comment
+ ADD CONSTRAINT action_gestion_comment_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_greatest_fkey FOREIGN KEY
(aga_greatest) REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON
DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_least_fkey FOREIGN KEY
(aga_least) REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_type_fkey FOREIGN KEY (aga_type)
REFERENCES public.link_action_type(l_id);
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_person_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_person_f_id_fkey FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT action_person_option_fk FOREIGN KEY (action_person_id)
REFERENCES public.action_person(ap_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_tags
+ ADD CONSTRAINT action_tags_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_tags
+ ADD CONSTRAINT action_tags_t_id_fkey FOREIGN KEY (t_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT contact_option_ref_fk FOREIGN KEY (contact_option_ref_id)
REFERENCES public.contact_option_ref(cor_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.currency_history
+ ADD CONSTRAINT currency_history_currency_fk FOREIGN KEY (currency_id)
REFERENCES public.currency(id) ON UPDATE CASCADE ON DELETE RESTRICT;
+ALTER TABLE ONLY public.document_modele
+ ADD CONSTRAINT document_modele_fk FOREIGN KEY (md_affect) REFERENCES
public.document_component(dc_code) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_ref_fk FOREIGN KEY (document_type_id)
REFERENCES public.document_type(dt_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.fiche_detail
+ ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
public.attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT fiche_f_id_fk2 FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id);
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT fiche_f_id_fk3 FOREIGN KEY (f_id_dest) REFERENCES
public.fiche(f_id);
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT fk_action_gestion_document_type FOREIGN KEY (ag_type)
REFERENCES public.document_type(dt_id);
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_card FOREIGN KEY (qf_bank) REFERENCES public.fiche(f_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_card_other FOREIGN KEY (qf_other) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.forecast_item
+ ADD CONSTRAINT fk_forecast FOREIGN KEY (fc_id) REFERENCES
public.forecast_category(fc_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_info
+ ADD CONSTRAINT fk_info_def FOREIGN KEY (id_type) REFERENCES
public.info_def(id_type) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_info
+ ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES public.jrn(jr_id) ON
UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES public.jrn(jr_id) ON
UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.groupe_analytique
+ ADD CONSTRAINT fk_pa_id FOREIGN KEY (pa_id) REFERENCES
public.plan_analytique(pa_id) ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (j_poste) REFERENCES
public.tmp_pcmn(pcm_val);
+ALTER TABLE ONLY public.centralized
+ ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (c_poste) REFERENCES
public.tmp_pcmn(pcm_val);
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT fk_stock_good_f_id FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.todo_list_shared
+ ADD CONSTRAINT fk_todo_list_shared_todo_list FOREIGN KEY (todo_list_id)
REFERENCES public.todo_list(tl_id);
+ALTER TABLE ONLY public.forecast_category
+ ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES
public.forecast(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.forecast
+ ADD CONSTRAINT forecast_f_end_date_fkey FOREIGN KEY (f_end_date)
REFERENCES public.parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.forecast
+ ADD CONSTRAINT forecast_f_start_date_fkey FOREIGN KEY (f_start_date)
REFERENCES public.parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.form_detail
+ ADD CONSTRAINT formdef_fk FOREIGN KEY (fo_fr_id) REFERENCES
public.form_definition(fr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT jnt_cred_fk FOREIGN KEY (jl_id) REFERENCES
public.jnt_letter(jl_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT jnt_deb_fk FOREIGN KEY (jl_id) REFERENCES
public.jnt_letter(jl_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_contact_option_ref_id_fkey
FOREIGN KEY (contact_option_ref_id) REFERENCES
public.contact_option_ref(cor_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_document_type_id_fkey FOREIGN
KEY (document_type_id) REFERENCES public.document_type(dt_id) ON UPDATE CASCADE
ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_fic_attr
+ ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
public.attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_fk FOREIGN KEY (tag_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_fk_1 FOREIGN KEY (tag_group_id)
REFERENCES public.tag_group(tg_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT jrn_currency_fk FOREIGN KEY (currency_id) REFERENCES
public.currency(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT jrn_def_currency_fk FOREIGN KEY (currency_id) REFERENCES
public.currency(id);
+ALTER TABLE ONLY public.op_predef
+ ADD CONSTRAINT jrn_def_id_fk FOREIGN KEY (jrn_def_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_per_jrn_def_id FOREIGN KEY (jrn_def_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_periode_p_id FOREIGN KEY (p_id) REFERENCES
public.parm_periode(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_rapt
+ ADD CONSTRAINT jrn_rapt_jr_id_fkey FOREIGN KEY (jr_id) REFERENCES
public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_rapt
+ ADD CONSTRAINT jrn_rapt_jra_concerned_fkey FOREIGN KEY (jra_concerned)
REFERENCES public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_acc_other_tax_fk FOREIGN KEY (ac_id) REFERENCES
public.acc_other_tax(ac_id);
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_fk FOREIGN KEY (j_id) REFERENCES public.jrnx(j_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT jrnx_j_id_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_note
+ ADD CONSTRAINT jrnx_note_j_id_fkey FOREIGN KEY (jr_id) REFERENCES
public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_ke_id_fkey FOREIGN KEY (ke_id)
REFERENCES public.key_distribution_detail(ke_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_pa_id_fkey FOREIGN KEY (pa_id)
REFERENCES public.plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_po_id_fkey FOREIGN KEY (po_id)
REFERENCES public.poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_detail
+ ADD CONSTRAINT key_distribution_detail_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES public.key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_ledger
+ ADD CONSTRAINT key_distribution_ledger_jrn_def_id_fkey FOREIGN KEY
(jrn_def_id) REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.key_distribution_ledger
+ ADD CONSTRAINT key_distribution_ledger_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES public.key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT letter_cred_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT letter_deb_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.document_modele
+ ADD CONSTRAINT md_type FOREIGN KEY (md_type) REFERENCES
public.document_type(dt_id);
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_jrn_def_id_fk FOREIGN KEY (jrn_def_id)
REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES
public.fiche_def(fd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_mp_jrn_def_id_fkey FOREIGN KEY (mp_jrn_def_id)
REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_fiche_id_fk FOREIGN KEY (f_id)
REFERENCES public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_j_id_fkey FOREIGN KEY (j_id)
REFERENCES public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_po_id_fkey FOREIGN KEY (po_id)
REFERENCES public.poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_currency
+ ADD CONSTRAINT operation_currency_jrnx_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_exercice_detail
+ ADD CONSTRAINT operation_exercice_detail_oe_id_fkey FOREIGN KEY (oe_id)
REFERENCES public.operation_exercice(oe_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT opt_jrnx FOREIGN KEY (jrn_id) REFERENCES public.jrn(jr_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT opt_tag_id FOREIGN KEY (tag_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.poste_analytique
+ ADD CONSTRAINT poste_analytique_pa_id_fkey FOREIGN KEY (pa_id) REFERENCES
public.plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT profile_fkey FOREIGN KEY (ag_dest) REFERENCES
public.profile(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_me_code_fkey FOREIGN KEY (me_code) REFERENCES
public.menu_ref(me_code) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_p_id_fkey FOREIGN KEY (p_id) REFERENCES
public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_type_fkey FOREIGN KEY (p_type_display)
REFERENCES public.profile_menu_type(pm_type);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_menu_ref_fk FOREIGN KEY (me_code) REFERENCES
public.menu_ref(me_code);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_profile_fk FOREIGN KEY (p_id) REFERENCES
public.profile(p_id);
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_p_id_fkey FOREIGN KEY (p_id)
REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_r_id_fkey FOREIGN KEY (r_id)
REFERENCES public.stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_user
+ ADD CONSTRAINT profile_user_p_id_fkey FOREIGN KEY (p_id) REFERENCES
public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT qp_vat_code_fk FOREIGN KEY (qp_vat_code) REFERENCES
public.tva_rate(tva_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT qs_vat_code_fk FOREIGN KEY (qs_vat_code) REFERENCES
public.tva_rate(tva_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT quant_purchase_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT quant_purchase_qp_internal_fkey FOREIGN KEY (qp_internal)
REFERENCES public.jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE
DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT quant_sold_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT quant_sold_qs_internal_fkey FOREIGN KEY (qs_internal)
REFERENCES public.jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE
DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE ONLY public.stock_change
+ ADD CONSTRAINT stock_change_r_id_fkey FOREIGN KEY (r_id) REFERENCES
public.stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT stock_goods_c_id_fkey FOREIGN KEY (c_id) REFERENCES
public.stock_change(c_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT stock_goods_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.tmp_stockgood_detail
+ ADD CONSTRAINT tmp_stockgood_detail_s_id_fkey FOREIGN KEY (s_id)
REFERENCES public.tmp_stockgood(s_id) ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_jrn
+ ADD CONSTRAINT uj_priv_id_fkey FOREIGN KEY (uj_jrn_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_p_granted_fkey FOREIGN KEY
(p_granted) REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_p_id_fkey FOREIGN KEY (p_id)
REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+CREATE TRIGGER action_gestion_t_insert_update BEFORE INSERT OR UPDATE ON
public.action_gestion FOR EACH ROW EXECUTE FUNCTION
comptaproc.action_gestion_ins_upd();
+CREATE TRIGGER document_modele_validate BEFORE INSERT OR UPDATE ON
public.document_modele FOR EACH ROW EXECUTE FUNCTION
comptaproc.t_document_modele_validate();
+CREATE TRIGGER document_validate BEFORE INSERT OR UPDATE ON public.document
FOR EACH ROW EXECUTE FUNCTION comptaproc.t_document_validate();
+CREATE TRIGGER fiche_def_ins_upd BEFORE INSERT OR UPDATE ON public.fiche_def
FOR EACH ROW EXECUTE FUNCTION comptaproc.fiche_def_ins_upd();
+CREATE TRIGGER fiche_detail_check_qcode_trg BEFORE INSERT OR UPDATE ON
public.fiche_detail FOR EACH ROW EXECUTE FUNCTION
comptaproc.fiche_detail_check_qcode();
+CREATE TRIGGER fiche_detail_check_trg BEFORE INSERT OR UPDATE ON
public.fiche_detail FOR EACH ROW EXECUTE FUNCTION
comptaproc.fiche_detail_check();
+CREATE TRIGGER info_def_ins_upd_t BEFORE INSERT OR UPDATE ON public.info_def
FOR EACH ROW EXECUTE FUNCTION comptaproc.info_def_ins_upd();
+CREATE TRIGGER jrn_def_description_ins_upd BEFORE INSERT OR UPDATE ON
public.jrn_def FOR EACH ROW EXECUTE FUNCTION comptaproc.t_jrn_def_description();
+CREATE TRIGGER opd_limit_description BEFORE INSERT OR UPDATE ON
public.op_predef FOR EACH ROW EXECUTE FUNCTION
comptaproc.opd_limit_description();
+CREATE TRIGGER parm_periode_check_periode_trg BEFORE INSERT OR UPDATE ON
public.parm_periode FOR EACH ROW EXECUTE FUNCTION comptaproc.check_periode();
+CREATE TRIGGER profile_user_ins_upd BEFORE INSERT OR UPDATE ON
public.profile_user FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_profile_user_ins_upd();
+CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON
public.quant_purchase FOR EACH ROW EXECUTE FUNCTION
comptaproc.quant_purchase_ins_upd();
+CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON
public.quant_sold FOR EACH ROW EXECUTE FUNCTION comptaproc.quant_sold_ins_upd();
+CREATE TRIGGER remove_action_gestion AFTER DELETE ON public.fiche FOR EACH ROW
EXECUTE FUNCTION comptaproc.card_after_delete();
+CREATE TRIGGER t_check_balance AFTER INSERT OR UPDATE ON public.jrn FOR EACH
ROW EXECUTE FUNCTION comptaproc.proc_check_balance();
+CREATE TRIGGER t_check_jrn BEFORE INSERT OR DELETE OR UPDATE ON public.jrn FOR
EACH ROW EXECUTE FUNCTION comptaproc.jrn_check_periode();
+CREATE TRIGGER t_code BEFORE INSERT OR UPDATE ON public.document_component FOR
EACH ROW EXECUTE FUNCTION comptaproc.four_upper_letter();
+CREATE TRIGGER t_group_analytic_del BEFORE DELETE ON public.groupe_analytique
FOR EACH ROW EXECUTE FUNCTION comptaproc.group_analytique_del();
+CREATE TRIGGER t_group_analytic_ins_upd BEFORE INSERT OR UPDATE ON
public.groupe_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.group_analytic_ins_upd();
+CREATE TRIGGER t_jnt_fic_attr_ins AFTER INSERT ON public.jnt_fic_attr FOR EACH
ROW EXECUTE FUNCTION comptaproc.jnt_fic_attr_ins();
+CREATE TRIGGER t_jrn_currency BEFORE INSERT OR UPDATE ON public.jrn FOR EACH
ROW EXECUTE FUNCTION comptaproc.jrn_currency();
+CREATE TRIGGER t_jrn_def_add_periode AFTER INSERT ON public.jrn_def FOR EACH
ROW EXECUTE FUNCTION comptaproc.jrn_def_add();
+CREATE TRIGGER t_jrn_def_delete BEFORE DELETE ON public.jrn_def FOR EACH ROW
EXECUTE FUNCTION comptaproc.jrn_def_delete();
+CREATE TRIGGER t_jrn_del BEFORE DELETE ON public.jrn FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrn_del();
+CREATE TRIGGER t_jrnx_del BEFORE DELETE ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_del();
+CREATE TRIGGER t_jrnx_ins BEFORE INSERT ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_ins();
+CREATE TRIGGER t_letter_del AFTER DELETE ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_letter_del();
+CREATE TRIGGER t_plan_analytique_ins_upd BEFORE INSERT OR UPDATE ON
public.plan_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.plan_analytic_ins_upd();
+CREATE TRIGGER t_poste_analytique_ins_upd BEFORE INSERT OR UPDATE ON
public.poste_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.poste_analytique_ins_upd();
+CREATE TRIGGER t_remove_script_tag BEFORE INSERT OR UPDATE ON
public.action_gestion_comment FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_remove_script_tag();
+CREATE TRIGGER t_tmp_pcm_alphanum_ins_upd BEFORE INSERT OR UPDATE ON
public.tmp_pcmn FOR EACH ROW EXECUTE FUNCTION
comptaproc.tmp_pcmn_alphanum_ins_upd();
+CREATE TRIGGER t_tmp_pcmn_ins BEFORE INSERT ON public.tmp_pcmn FOR EACH ROW
EXECUTE FUNCTION comptaproc.tmp_pcmn_ins();
+CREATE TRIGGER todo_list_ins_upd BEFORE INSERT OR UPDATE ON public.todo_list
FOR EACH ROW EXECUTE FUNCTION comptaproc.trg_todo_list_ins_upd();
+CREATE TRIGGER todo_list_shared_ins_upd BEFORE INSERT OR UPDATE ON
public.todo_list_shared FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_todo_list_shared_ins_upd();
+CREATE TRIGGER trg_action_gestion_related BEFORE INSERT OR UPDATE ON
public.action_gestion_related FOR EACH ROW EXECUTE FUNCTION
comptaproc.action_gestion_related_ins_up();
+CREATE TRIGGER trg_category_card_before_delete BEFORE DELETE ON
public.fiche_def FOR EACH ROW EXECUTE FUNCTION
comptaproc.category_card_before_delete();
+CREATE TRIGGER trg_extension_ins_upd BEFORE INSERT OR UPDATE ON
public.extension FOR EACH ROW EXECUTE FUNCTION comptaproc.extension_ins_upd();
+CREATE TRIGGER trg_set_tech_user BEFORE INSERT OR UPDATE ON
public.operation_exercice FOR EACH ROW EXECUTE FUNCTION
comptaproc.set_tech_user();
+CREATE TRIGGER trigger_document_type_i AFTER INSERT ON public.document_type
FOR EACH ROW EXECUTE FUNCTION comptaproc.t_document_type_insert();
+CREATE TRIGGER trigger_jrn_def_sequence_i AFTER INSERT ON public.jrn_def FOR
EACH ROW EXECUTE FUNCTION comptaproc.t_jrn_def_sequence();
+CREATE TRIGGER trigger_parameter_extra_format_code_biu BEFORE INSERT OR UPDATE
ON public.parameter_extra FOR EACH ROW EXECUTE FUNCTION
comptaproc.t_parameter_extra_code();
+CREATE TRIGGER user_sec_act_ins_upd BEFORE INSERT OR UPDATE ON
public.user_sec_act FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_user_sec_act_ins_upd();
+CREATE TRIGGER user_sec_jrn_after_ins_upd BEFORE INSERT OR UPDATE ON
public.user_sec_jrn FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_user_sec_jrn_ins_upd();
+COMMENT ON CONSTRAINT uniq_user_ledger ON public.user_sec_jrn IS 'Create an
unique combination user / ledger';
+COMMENT ON TRIGGER action_gestion_t_insert_update ON public.action_gestion IS
'Truncate the column ag_title to 70 char';
+COMMENT ON TRIGGER profile_user_ins_upd ON public.profile_user IS 'Force the
column user_name to lowercase';
+COMMENT ON TRIGGER t_jrnx_ins ON public.jrnx IS 'check that the qcode used by
the card exists and format it : uppercase and trim the space';
+COMMENT ON TRIGGER t_letter_del ON public.jrnx IS 'Delete the lettering for
this row';
+COMMENT ON TRIGGER todo_list_ins_upd ON public.todo_list IS 'Force the column
use_login to lowercase';
+COMMENT ON TRIGGER todo_list_shared_ins_upd ON public.todo_list_shared IS
'Force the column ua_login to lowercase';
+COMMENT ON TRIGGER user_sec_act_ins_upd ON public.user_sec_act IS 'Force the
column ua_login to lowercase';
+COMMENT ON TRIGGER user_sec_jrn_after_ins_upd ON public.user_sec_jrn IS 'Force
the column uj_login to lowercase';
diff --git a/include/sql/mod1/data.sql b/include/sql/mod1/data.sql
index e0f4cda6d..31400f3c4 100644
--- a/include/sql/mod1/data.sql
+++ b/include/sql/mod1/data.sql
@@ -1,82 +1,91 @@
set search_path = public,comptaproc,pg_catalog ;
+
SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
+SET xmloption = content;
SET client_min_messages = warning;
+SET row_security = off;
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (800,
'Ajout de fiche', 'fiche', 'FICADD');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (805,
'Création, modification et effacement de fiche', 'fiche', 'FIC');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (910,
'création, modification et effacement de catégorie de fiche', 'fiche',
'FICCAT');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1020,
'Effacer les documents du suivi', 'followup', 'RMDOC');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1010,
'Voir les documents du suivi', 'followup', 'VIEWDOC');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1050,
'Modifier le type de document', 'followup', 'PARCATDOC');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1110,
'Enlever une pièce justificative', 'compta', 'RMRECEIPT');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1120,
'Effacer une opération ', 'compta', 'RMOPER');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1210,
'Partager une note', 'note', 'SHARENOTE');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1220,
'Créer une note publique', 'note', 'SHARENOTEPUBLIC');
-INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1230,
'Effacer une note publique', 'note', 'SHARENOTEREMOVE');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(800, 'Ajout de fiche', 'fiche', 'FICADD');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(805, 'Création, modification et effacement de fiche', 'fiche', 'FIC');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(910, 'création, modification et effacement de catégorie de fiche', 'fiche',
'FICCAT');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1020, 'Effacer les documents du suivi', 'followup', 'RMDOC');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1010, 'Voir les documents du suivi', 'followup', 'VIEWDOC');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1050, 'Modifier le type de document', 'followup', 'PARCATDOC');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1110, 'Enlever une pièce justificative', 'compta', 'RMRECEIPT');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1120, 'Effacer une opération ', 'compta', 'RMOPER');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1210, 'Partager une note', 'note', 'SHARENOTE');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1220, 'Créer une note publique', 'note', 'SHARENOTEPUBLIC');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1230, 'Effacer une note publique', 'note', 'SHARENOTEREMOVE');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1025, 'Ajout d''étiquette', 'followup', 'TAGADD');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1130, 'Modifier le numéro de pièce', 'compta', 'UPDRECEIPT');
+INSERT INTO public.action (ac_id, ac_description, ac_module, ac_code) VALUES
(1140, 'Modifier la date d''une operation', 'compta', 'UPDDATE');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (1, 'Document
Interne', 'DOCUME1');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (2, 'Bons de
commande client', 'BONSDE2');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (3, 'Bon de
commande Fournisseur', 'BONDEC3');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (4, 'Facture',
'FACTUR4');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (5, 'Lettre de
rappel', 'LETTRE5');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (6, 'Courrier',
'COURRI6');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (7,
'Proposition', 'PROPOS7');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (8, 'Email',
'EMAIL8');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (9, 'Divers',
'DIVERS9');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (10, 'Note de
frais', 'NOTEDE10');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (20, 'Réception
commande Fournisseur', 'RÉCEPT20');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (21, 'Réception
commande Client', 'RÉCEPT21');
-INSERT INTO document_type (dt_id, dt_value, dt_prefix) VALUES (22, 'Réception
magazine', 'RÉCEPT22');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (1,
'Document Interne', 'DOCUME1');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (2, 'Bons
de commande client', 'BONSDE2');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (3, 'Bon
de commande Fournisseur', 'BONDEC3');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (4,
'Facture', 'FACTUR4');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (5,
'Lettre de rappel', 'LETTRE5');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (6,
'Courrier', 'COURRI6');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (7,
'Proposition', 'PROPOS7');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (8,
'Email', 'EMAIL8');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (9,
'Divers', 'DIVERS9');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (10,
'Note de frais', 'NOTEDE10');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (20,
'Réception commande Fournisseur', 'RÉCEPT20');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (21,
'Réception commande Client', 'RÉCEPT21');
+INSERT INTO public.document_type (dt_id, dt_value, dt_prefix) VALUES (22,
'Réception magazine', 'RÉCEPT22');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (1, 'Vente
Service', '700');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (2, 'Achat
Marchandises', '604');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (3, 'Achat
Service et biens divers', '61');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (5, 'Prêt
> a un an', '17');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (6, 'Prêt
< a un an', '430');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (8,
'Fournisseurs', '440');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (9,
'Clients', '400');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (10,
'Salaire Administrateur', '6200');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (11,
'Salaire Ouvrier', '6203');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (12,
'Salaire Employé', '6202');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (13,
'Dépenses non admises', '674');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (14,
'Administration des Finances', NULL);
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (15,
'Autres fiches', NULL);
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (7,
'Matériel à amortir', '2400');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (16,
'Contact', NULL);
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (25,
'Compte Salarié / Administrateur', NULL);
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (4,
'Trésorerie', '5500');
-INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (26,
'Projet', NULL);
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (1,
'Vente Service', '700');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (2,
'Achat Marchandises', '604');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (3,
'Achat Service et biens divers', '61');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (5,
'Prêt > a un an', '17');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (6,
'Prêt < a un an', '430');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (8,
'Fournisseurs', '440');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (9,
'Clients', '400');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(10, 'Salaire Administrateur', '6200');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(11, 'Salaire Ouvrier', '6203');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(12, 'Salaire Employé', '6202');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(13, 'Dépenses non admises', '674');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(14, 'Administration des Finances', NULL);
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(15, 'Autres fiches', NULL);
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (7,
'Matériel à amortir', '2400');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(16, 'Contact', NULL);
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(25, 'Compte Salarié / Administrateur', NULL);
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (4,
'Trésorerie', '5500');
+INSERT INTO public.fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES
(26, 'Projet', NULL);
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (500000, NULL, 'Stock', false, 15, NULL);
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (1, '604', 'Marchandises', true, 2, 'Achats de
marchandises');
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (2, '400', 'Client', true, 9, 'Catégorie qui
contient la liste des clients');
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (3, '5500', 'Banque', true, 4, 'Catégorie qui
contient la liste des comptes financiers: banque, caisse,...');
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (4, '440', 'Fournisseur', true, 8, 'Catégorie
qui contient la liste des fournisseurs');
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (5, '61', 'Services & Biens Divers', true, 3,
'Catégorie qui contient la liste des charges diverses');
-INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account,
frd_id, fd_description) VALUES (6, '700', 'Vente', true, 1, 'Catégorie qui
contient la liste des prestations, marchandises... que l''on vend ');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (500000, NULL, 'Stock',
false, 15, NULL);
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (1, '604', 'Marchandises',
true, 2, 'Achats de marchandises');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (2, '400', 'Client', true, 9,
'Catégorie qui contient la liste des clients');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (3, '5500', 'Banque', true,
4, 'Catégorie qui contient la liste des comptes financiers: banque,
caisse,...');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (4, '440', 'Fournisseur',
true, 8, 'Catégorie qui contient la liste des fournisseurs');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (5, '61', 'Services & Biens
Divers', true, 3, 'Catégorie qui contient la liste des charges diverses');
+INSERT INTO public.fiche_def (fd_id, fd_class_base, fd_label,
fd_create_account, frd_id, fd_description) VALUES (6, '700', 'Vente', true, 1,
'Catégorie qui contient la liste des prestations, marchandises... que l''on
vend ');
-INSERT INTO profile (p_name, p_id, p_desc, with_calc, with_direct_form) VALUES
('Administrateur', 1, 'Profil par défaut pour les adminstrateurs', true, true);
-INSERT INTO profile (p_name, p_id, p_desc, with_calc, with_direct_form) VALUES
('Utilisateur', 2, 'Profil par défaut pour les utilisateurs', true, true);
-INSERT INTO profile (p_name, p_id, p_desc, with_calc, with_direct_form) VALUES
('Public', -1, 'faux groupe', NULL, NULL);
+INSERT INTO public.profile (p_name, p_id, p_desc, with_calc, with_direct_form,
with_search_card) VALUES ('Administrateur', 1, 'Profil par défaut pour les
adminstrateurs', true, true, 1);
+INSERT INTO public.profile (p_name, p_id, p_desc, with_calc, with_direct_form,
with_search_card) VALUES ('Utilisateur', 2, 'Profil par défaut pour les
utilisateurs', true, true, 1);
+INSERT INTO public.profile (p_name, p_id, p_desc, with_calc, with_direct_form,
with_search_card) VALUES ('Public', -1, 'faux groupe', NULL, NULL, 1);
@@ -84,42 +93,39 @@ INSERT INTO profile (p_name, p_id, p_desc, with_calc,
with_direct_form) VALUES (
-SELECT pg_catalog.setval('action_detail_ad_id_seq', 1, false);
-SELECT pg_catalog.setval('action_gestion_ag_id_seq', 1, false);
-SELECT pg_catalog.setval('action_gestion_comment_agc_id_seq', 1, false);
-INSERT INTO jrn_type (jrn_type_id, jrn_desc) VALUES ('FIN', 'Financier');
-INSERT INTO jrn_type (jrn_type_id, jrn_desc) VALUES ('VEN', 'Vente');
-INSERT INTO jrn_type (jrn_type_id, jrn_desc) VALUES ('ACH', 'Achat');
-INSERT INTO jrn_type (jrn_type_id, jrn_desc) VALUES ('ODS', 'Opérations
Diverses');
+INSERT INTO public.currency (id, cr_code_iso, cr_name) VALUES (0, 'EUR',
'EUR');
-INSERT INTO jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable)
VALUES (3, 'Achat', '6*', '4*', '5', '4', 1, 3, true, 'échéance', 'ACH', 'A01',
'ACH', NULL, NULL, 'Concerne tous les achats, factures reçues, notes de crédit
reçues et notes de frais', 1);
-INSERT INTO jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable)
VALUES (1, 'Financier', '5* ', '5*', '3,2,4', '3,2,4', 5, 5, false, NULL,
'FIN', 'F01', 'FIN', NULL, NULL, 'Concerne tous les mouvements financiers
(comptes en banque, caisses, visa...)', 1);
-INSERT INTO jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable)
VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5, 5, false, NULL,
'ODS', 'O01', 'ODS', NULL, NULL, 'Concerne toutes les opérations comme les
amortissements, les comptes TVA, ...', 1);
-INSERT INTO jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable)
VALUES (2, 'Vente', '4*', '7*', '2', '6', 2, 1, true, 'échéance', 'VEN', 'V01',
'VEN', NULL, NULL, 'Concerne toutes les ventes, notes de crédit envoyées', 1);
+INSERT INTO public.jrn_type (jrn_type_id, jrn_desc) VALUES ('FIN',
'Financier');
+INSERT INTO public.jrn_type (jrn_type_id, jrn_desc) VALUES ('VEN', 'Vente');
+INSERT INTO public.jrn_type (jrn_type_id, jrn_desc) VALUES ('ACH', 'Achat');
+INSERT INTO public.jrn_type (jrn_type_id, jrn_desc) VALUES ('ODS', 'Opérations
Diverses');
+INSERT INTO public.jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable,
currency_id, jrn_def_negative_amount, jrn_def_negative_warning,
jrn_def_quantity) VALUES (3, 'Achat', '6*', '4*', '5', '4', 1, 3, true,
'échéance', 'ACH', 'A01', 'ACH', NULL, NULL, 'Con [...]
+INSERT INTO public.jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable,
currency_id, jrn_def_negative_amount, jrn_def_negative_warning,
jrn_def_quantity) VALUES (1, 'Financier', '5* ', '5*', '3,2,4', '3,2,4', 5, 5,
false, NULL, 'FIN', 'F01', 'FIN', NULL, NU [...]
+INSERT INTO public.jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable,
currency_id, jrn_def_negative_amount, jrn_def_negative_warning,
jrn_def_quantity) VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5,
5, false, NULL, 'ODS', 'O01', 'ODS', NULL, [...]
+INSERT INTO public.jrn_def (jrn_def_id, jrn_def_name, jrn_def_class_deb,
jrn_def_class_cred, jrn_def_fiche_deb, jrn_def_fiche_cred, jrn_deb_max_line,
jrn_cred_max_line, jrn_def_ech, jrn_def_ech_lib, jrn_def_type, jrn_def_code,
jrn_def_pj_pref, jrn_def_bank, jrn_def_num_op, jrn_def_description, jrn_enable,
currency_id, jrn_def_negative_amount, jrn_def_negative_warning,
jrn_def_quantity) VALUES (2, 'Vente', '4*', '7*', '2', '6', 2, 1, true,
'échéance', 'VEN', 'V01', 'VEN', NULL, NULL, 'Con [...]
-SELECT pg_catalog.setval('action_gestion_operation_ago_id_seq', 1, false);
@@ -129,14 +135,12 @@ SELECT
pg_catalog.setval('action_gestion_operation_ago_id_seq', 1, false);
-SELECT pg_catalog.setval('action_gestion_related_aga_id_seq', 1, false);
-SELECT pg_catalog.setval('action_person_ap_id_seq', 1, false);
@@ -146,780 +150,899 @@ SELECT pg_catalog.setval('action_person_ap_id_seq', 1,
false);
-SELECT pg_catalog.setval('action_tags_at_id_seq', 1, false);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (1, 'Nom', 'text', '22', NULL, 1,
10);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (32, 'Prénom', 'text', '22', NULL,
1, 20);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (9, 'Description', 'text', '22',
NULL, 1, 30);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (34, 'Site Web', 'text', '22',
NULL, 1, 40);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (30, 'Numero de client', 'text',
'22', NULL, 1, 50);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (12, 'Personne de contact ',
'text', '22', NULL, 1, 60);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (25, 'Société', 'card', '22',
'[sql] fd_id in (select fd_id from fiche_def where frd_id in (4,8,9,14))', 1,
70);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (13, 'numéro de tva ', 'text',
'22', NULL, 1, 80);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (18, 'email ', 'text', '22', NULL,
1, 90);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (27, 'Tél. Portable', 'text',
'22', NULL, 1, 100);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (17, 'téléphone ', 'text', '22',
NULL, 1, 110);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (26, 'Fax', 'text', '22', NULL, 1,
120);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (14, 'Adresse ', 'text', '22',
NULL, 1, 130);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (15, 'code postal', 'text', '22',
NULL, 1, 140);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (16, 'pays ', 'text', '22', NULL,
1, 150);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (24, 'Ville', 'text', '22', NULL,
1, 160);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (4, 'Nom de la banque', 'text',
'22', NULL, 1, 170);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (3, 'Compte bancaire', 'text',
'22', NULL, 1, 180);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (5, 'Poste Comptable', 'poste',
'17', NULL, 1, 190);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (6, 'Prix vente', 'numeric', '6',
'4', 1, 200);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (7, 'Prix achat', 'numeric', '6',
'4', 1, 210);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (2, 'Taux TVA', 'text', '22',
NULL, 1, 220);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (8, 'Durée Amortissement',
'numeric', '6', '2', 1, 230);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (11, 'Montant initial', 'numeric',
'6', '2', 1, 240);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (10, 'Date début', 'date', '8',
NULL, 1, 250);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (33, 'Date Fin', 'date', '8',
NULL, 1, 260);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (19, 'Gestion stock', 'card',
'22', '[sql] fd_id = 500000 ', 1, 270);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (20, 'Partie fiscalement non
déductible', 'numeric', '6', '2', 1, 280);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (53, 'Contrepartie pour dépense
fiscal. non déd.', 'poste', '17', NULL, 1, 290);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (21, 'TVA non déductible',
'numeric', '6', '2', 1, 300);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (51, 'Contrepartie pour TVA non
Ded.', 'poste', '17', NULL, 1, 310);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (22, 'TVA non déductible
récupérable par l''impôt', 'numeric', '6', '2', 1, 320);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (50, 'Contrepartie pour TVA récup
par impot', 'poste', '17', NULL, 1, 330);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (52, 'Contrepartie pour dépense à
charge du gérant', 'poste', '17', NULL, 1, 340);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (31, 'Dépense charge du grant
(partie privé) ', 'numeric', '6', '4', 1, 350);
+INSERT INTO public.attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra,
ad_search_followup, ad_default_order) VALUES (23, 'Quick Code', 'text', '22',
NULL, 1, 9999);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (8,
'Durée Amortissement', 'numeric', '6', '2');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (11,
'Montant initial', 'numeric', '6', '2');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (21,
'TVA non déductible', 'numeric', '6', '2');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (22,
'TVA non déductible récupérable par l''impôt', 'numeric', '6', '2');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (20,
'Partie fiscalement non déductible', 'numeric', '6', '2');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (31,
'Dépense charge du grant (partie privé) ', 'numeric', '6', '4');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (3,
'Compte bancaire', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (6,
'Prix vente', 'numeric', '6', '4');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (7,
'Prix achat', 'numeric', '6', '4');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (10,
'Date début', 'date', '8', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (1,
'Nom', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (2,
'Taux TVA', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (4,
'Nom de la banque', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (9,
'Description', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (12,
'Personne de contact ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (13,
'numéro de tva ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (14,
'Adresse ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (16,
'pays ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (17,
'téléphone ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (18,
'email ', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (23,
'Quick Code', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (24,
'Ville', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (26,
'Fax', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (27,
'GSM', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (15,
'code postal', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (30,
'Numero de client', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (32,
'Prénom', 'text', '22', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (50,
'Contrepartie pour TVA récup par impot', 'poste', '17', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (51,
'Contrepartie pour TVA non Ded.', 'poste', '17', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (52,
'Contrepartie pour dépense à charge du gérant', 'poste', '17', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (53,
'Contrepartie pour dépense fiscal. non déd.', 'poste', '17', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (5,
'Poste Comptable', 'poste', '17', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (33,
'Date Fin', 'date', '8', NULL);
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (19,
'Gestion stock', 'card', '22', '[sql] fd_id = 500000 ');
-INSERT INTO attr_def (ad_id, ad_text, ad_type, ad_size, ad_extra) VALUES (25,
'Société', 'card', '22', '[sql] frd_id in (4,8,9,14)');
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 2);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 2);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (3, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (3, 2);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 3);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 13);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 14);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 15);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 16);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 17);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 18);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 13);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 14);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 15);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 16);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 17);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 18);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 13);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 14);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 16);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 17);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 18);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 6);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 7);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 6);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 7);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (3, 7);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 19);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 19);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (14, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 4);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 10);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 4);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 10);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (10, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (11, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (11, 12);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (12, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (13, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (13, 9);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (7, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (7, 8);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (7, 9);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (7, 10);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 11);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 11);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 15);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (15, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (15, 9);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (3, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (5, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (6, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (10, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (11, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (12, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (13, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (14, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (15, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (7, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 24);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 24);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (14, 24);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 17);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 18);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 25);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 26);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 27);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 4);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 3);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 15);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 16);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 24);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (25, 23);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (26, 1);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (26, 9);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (16, 32);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (2, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (3, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (13, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 26);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (1, 5);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (8, 34);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (9, 34);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (14, 34);
+INSERT INTO public.attr_min (frd_id, ad_id) VALUES (4, 34);
+
+
+
+INSERT INTO public.bilan (b_id, b_name, b_file_template, b_file_form, b_type)
VALUES (1, 'Bilan Belge complet', 'document/fr_be/bnb.rtf',
'document/fr_be/bnb.form', 'RTF');
+INSERT INTO public.bilan (b_id, b_name, b_file_template, b_file_form, b_type)
VALUES (9, 'ASBL', 'document/fr_be/bnb-asbl.rtf',
'document/fr_be/bnb-asbl.form', 'RTF');
+
+
+
+
+
+
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('550', 'Banque 1', '55', 'ACT', 715, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('440', 'Fournisseurs', '44', 'PAS', 813, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('539', 'Réductions de valeur actées', '53', 'ACT', 518,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('794', 'Intervention d''associés (ou du propriétaire)
dans la perte', '79', 'PRO', 519, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000001', 'Client 1', '400', 'ACT', 527, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000002', 'Client 2', '400', 'ACT', 528, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000003', 'Client 3', '400', 'ACT', 529, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040001', 'Electricité', '604', 'CHA', 530, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040002', 'Loyer', '604', 'CHA', 531, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000002', 'Banque 1', '5500', 'ACT', 532, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000003', 'Banque 2', '5500', 'ACT', 533, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400001', 'Fournisseur 1', '440', 'PAS', 534, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400002', 'Fournisseur 2', '440', 'PAS', 535, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400003', 'Fournisseur 4', '440', 'PAS', 536, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610001', 'Electricité', '61', 'CHA', 537, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610002', 'Loyer', '61', 'CHA', 538, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610003', 'Assurance', '61', 'CHA', 539, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610004', 'Matériel bureau', '61', 'CHA', 540, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000002', 'Marchandise A', '700', 'PRO', 541, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000001', 'Prestation', '700', 'PRO', 542, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000003', 'Déplacement', '700', 'PRO', 543, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('101', 'Capital non appelé', '10', 'PASINV', 544, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6190', 'TVA récupérable par l''impôt', '61', 'CHA',
545, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6740', 'Dépense non admise', '67', 'CHA', 546, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('100', 'Capital souscrit', '10', 'PAS', 548, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1311', 'Autres réserves indisponibles', '131', 'PAS',
549, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('132', ' Réserves immunisées', '13', 'PAS', 550, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6711', 'Suppléments d''impôts estimés', '671', 'CHA',
551, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6712', 'Provisions fiscales constituées', '671',
'CHA', 552, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('672', 'Impôts étrangers sur le résultat de
l''exercice', '67', 'CHA', 553, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('673', 'Impôts étrangers sur le résultat d''exercice
antérieures', '67', 'CHA', 554, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('690', 'Perte reportée de l''exercice précédent', '69',
'CHA', 557, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('691', 'Dotation à la réserve légale', '69', 'CHA',
558, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('692', 'Dotation aux autres réserves', '69', 'CHA',
559, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('693', 'Bénéfice à reporter', '69', 'CHA', 560, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('694', 'Rémunération du capital', '69', 'CHA', 561,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('695', 'Administrateurs ou gérants', '69', 'CHA', 562,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('696', 'Autres allocataires', '69', 'CHA', 563, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('700', 'Ventes et prestations de services', '70',
'PRO', 565, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('701', 'Ventes et prestations de services', '70',
'PRO', 566, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('702', 'Ventes et prestations de services', '70',
'PRO', 567, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('703', 'Ventes et prestations de services', '70',
'PRO', 568, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('704', 'Ventes et prestations de services', '70',
'PRO', 569, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('706', 'Ventes et prestations de services', '70',
'PRO', 570, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('707', 'Ventes et prestations de services', '70',
'PRO', 571, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('709', 'Remises, ristournes et rabais accordés(-)',
'70', 'PROINV', 572, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('712', 'des en-cours de fabrication', '71', 'PRO', 574,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('713', 'des produits finis', '71', 'PRO', 575, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('715', 'des immeubles construits destinés à la vente',
'71', 'PRO', 576, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('717', ' des commandes en cours d''éxécution', '71',
'PRO', 577, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7170', 'Valeur d''acquisition', '717', 'PRO', 578,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7171', 'Bénéfice pris en compte', '717', 'PRO', 579,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('740', 'Subsides d'' exploitation et montants
compensatoires', '74', 'PRO', 582, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('741', 'Plus-values sur réalisation courantes d''
immobilisations corporelles', '74', 'PRO', 583, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('742', 'Plus-values sur réalisations de créances
commerciales', '74', 'PRO', 584, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('743', 'Produits d''exploitations divers', '74', 'PRO',
585, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('744', 'Produits d''exploitations divers', '74', 'PRO',
586, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('745', 'Produits d''exploitations divers', '74', 'PRO',
587, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('746', 'Produits d''exploitations divers', '74', 'PRO',
588, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('747', 'Produits d''exploitations divers', '74', 'PRO',
589, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('748', 'Produits d''exploitations divers', '74', 'PRO',
590, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('750', 'Produits sur immobilisations financières',
'75', 'PRO', 592, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('751', 'Produits des actifs circulants', '75', 'PRO',
593, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('752', 'Plus-value sur réalisations d''actis
circulants', '75', 'PRO', 594, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('753', 'Subsides en capital et intérêts', '75', 'PRO',
595, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('754', 'Différences de change', '75', 'PRO', 596, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('755', 'Ecarts de conversion des devises', '75', 'PRO',
597, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('221', 'Construction', '22', 'ACT', 598, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('756', 'Produits financiers divers', '75', 'PRO', 599,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('757', 'Produits financiers divers', '75', 'PRO', 600,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('758', 'Produits financiers divers', '75', 'PRO', 601,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('759', 'Produits financiers divers', '75', 'PRO', 602,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('760', 'Reprise d''amortissements et de réductions de
valeur', '76', 'PRO', 604, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7601', 'sur immobilisations corporelles', '760',
'PRO', 605, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7602', 'sur immobilisations incorporelles', '760',
'PRO', 606, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('761', 'Reprises de réductions de valeur sur
immobilisations financières', '76', 'PRO', 607, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('762', 'Reprises de provisions pour risques et charges
exceptionnels', '76', 'PRO', 608, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('763', 'Plus-value sur réalisation d''actifs
immobilisé', '76', 'PRO', 609, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('764', 'Autres produits exceptionnels', '76', 'PRO',
610, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('765', 'Autres produits exceptionnels', '76', 'PRO',
611, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('766', 'Autres produits exceptionnels', '76', 'PRO',
612, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('767', 'Autres produits exceptionnels', '76', 'PRO',
613, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('768', 'Autres produits exceptionnels', '76', 'PRO',
614, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('769', 'Autres produits exceptionnels', '76', 'PRO',
615, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('771', 'impôts belges sur le résultat', '77', 'PRO',
617, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7710', 'Régularisations d''impôts dus ou versé',
'771', 'PRO', 618, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7711', 'Régularisations d''impôts estimés', '771',
'PRO', 619, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7712', 'Reprises de provisions fiscales', '771',
'PRO', 620, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('773', 'Impôts étrangers sur le résultats', '77',
'PRO', 621, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('790', 'Bénéfice reporté de l''exercice précédent',
'79', 'PRO', 623, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('791', 'Prélévement sur le capital et les primes
d''émission', '79', 'PRO', 624, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('792', 'Prélévement sur les réserves', '79', 'PRO',
625, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('793', 'Perte à reporter', '79', 'PRO', 626, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6301', 'Dotations aux amortissements sur
immobilisations incorporelles', '630', 'CHA', 627, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6302', 'Dotations aux amortissements sur
immobilisations corporelles', '630', 'CHA', 628, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6308', 'Dotations aux réductions de valeur sur
immobilisations incorporelles', '630', 'CHA', 629, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6309', 'Dotations aux réductions de valeur sur
immobilisations corporelles', '630', 'CHA', 630, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('631', 'Réductions de valeur sur stocks', '63', 'CHA',
631, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6310', 'Dotations', '631', 'CHA', 632, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6311', 'Reprises(-)', '631', 'CHAINV', 633, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('632', 'Réductions de valeur sur commande en cours
d''éxécution', '63', 'CHA', 634, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6320', 'Dotations', '632', 'CHA', 635, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6321', 'Reprises(-)', '632', 'CHAINV', 636, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('633', 'Réductions de valeurs sur créances commerciales
à plus d''un an', '63', 'CHA', 637, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6330', 'Dotations', '633', 'CHA', 638, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6331', 'Reprises(-)', '633', 'CHAINV', 639, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('634', 'Réductions de valeur sur créances commerciales
à un an au plus', '63', 'CHA', 640, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6340', 'Dotations', '634', 'CHA', 641, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6341', 'Reprise', '634', 'CHAINV', 642, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('635', 'Provisions pour pensions et obligations
similaires', '63', 'CHA', 643, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6350', 'Dotations', '635', 'CHA', 644, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6351', 'Utilisation et reprises', '635', 'CHAINV',
645, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('636', 'Provisions pour grosses réparations et gros
entretien', '63', 'CHA', 646, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6360', 'Dotations', '636', 'CHA', 647, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6361', 'Reprises(-)', '636', 'CHAINV', 648, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('637', 'Provisions pour autres risques et charges',
'63', 'CHA', 649, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6370', 'Dotations', '637', 'CHA', 650, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6371', 'Reprises(-)', '637', 'CHAINV', 651, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('640', 'Charges fiscales d''exploitation', '64', 'CHA',
653, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('641', 'Moins-values sur réalisations courantes
d''immobilisations corporelles', '64', 'CHA', 654, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('642', 'Moins-value sur réalisation de créances
commerciales', '64', 'CHA', 655, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('643', 'Charges d''exploitations', '64', 'CHA', 656,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('644', 'Charges d''exploitations', '64', 'CHA', 657,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('645', 'Charges d''exploitations', '64', 'CHA', 658,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('646', 'Charges d''exploitations', '64', 'CHA', 659,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('647', 'Charges d''exploitations', '64', 'CHA', 660,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('648', 'Charges d''exploitations', '64', 'CHA', 661,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('649', 'Charges d''exploitation portées à l''actif au
titre de frais de restructuration(-)', '64', 'CHAINV', 662, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('650', 'Charges des dettes', '65', 'CHA', 664, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6500', 'Intérêts, commmissions et frais afférents aux
dettes', '650', 'CHA', 665, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6501', 'Amortissements des frais d''émissions
d''emrunts et des primes de remboursement', '650', 'CHA', 666, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6502', 'Autres charges des dettes', '650', 'CHA', 667,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6503', 'Intérêts intercalaires portés à l''actif(-)',
'650', 'CHA', 668, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('651', 'Réductions de valeur sur actifs circulants',
'65', 'CHA', 669, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6510', 'Dotations', '651', 'CHA', 670, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6511', 'Reprises(-)', '651', 'CHAINV', 671, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('652', 'Moins-value sur réalisation d''actifs
circulants', '65', 'CHA', 672, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('653', 'Charges d''escompte de créances', '65', 'CHA',
673, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('654', 'Différences de changes', '65', 'CHA', 674, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('655', 'Ecarts de conversion des devises', '65', 'CHA',
675, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('656', 'Charges financières diverses', '65', 'CHA',
676, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('657', 'Charges financières diverses', '65', 'CHA',
677, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('658', 'Charges financières diverses', '65', 'CHA',
678, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('659', 'Charges financières diverses', '65', 'CHA',
679, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('660', 'Amortissements et réductions de valeur
exceptionnels (dotations)', '66', 'CHA', 681, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6600', 'sur frais d''établissement', '660', 'CHA',
682, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6601', 'sur immobilisations incorporelles', '660',
'CHA', 683, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6602', 'sur immobilisations corporelles', '660',
'CHA', 684, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('661', 'Réductions de valeur sur immobilisations
financières (dotations)', '66', 'CHA', 685, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('662', 'Provisions pour risques et charges
exceptionnels', '66', 'CHA', 686, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('663', 'Moins-values sur réalisations d''actifs
immobilisés', '66', 'CHA', 687, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('664', 'Autres charges exceptionnelles', '66', 'CHA',
688, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('665', 'Autres charges exceptionnelles', '66', 'CHA',
689, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('666', 'Autres charges exceptionnelles', '66', 'CHA',
690, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('667', 'Autres charges exceptionnelles', '66', 'CHA',
691, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('668', 'Autres charges exceptionnelles', '66', 'CHA',
692, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('669', ' Charges exceptionnelles portées à l''actif au
titre de frais de restructuration', '66', 'CHA', 693, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('670', 'Impôts belge sur le résultat de l''exercice',
'67', 'CHA', 695, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6700', 'Impôts et précomptes dus ou versés', '670',
'CHA', 696, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6701', 'Excédents de versement d''impôts et de
précomptes portés à l''actifs (-)', '670', 'CHAINV', 697, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6702', 'Charges fiscales estimées', '670', 'CHA', 698,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('671', 'Impôts belges sur le résultats d''exercices
antérieures', '67', 'CHA', 699, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6710', 'Suppléments d''impôt dus ou versés', '671',
'CHA', 700, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('510', 'Valeur d''acquisition', '51', 'ACT', 703, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('511', 'Montant non appelés', '51', 'ACT', 704, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('519', 'Réductions de valeur actées', '51', 'ACT', 705,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('520', 'Valeur d''acquisition', '52', 'ACT', 707, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('529', 'Réductions de valeur actées', '52', 'ACT', 708,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('530', 'de plus d''un an', '53', 'ACT', 710, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('531', 'de plus d''un mois et d''un an au plus', '53',
'ACT', 711, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('532', 'd''un mois au plus', '53', 'ACT', 712, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5500', 'Comptes courants', '550', 'ACT', 716, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5501', 'Chèques émis (-)', '550', 'ACTINV', 717, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5509', 'Réduction de valeur actée', '550', 'ACT', 718,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5510', 'Comptes courants', '551', 'ACT', 719, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5511', 'Chèques émis (-)', '551', 'ACTINV', 720, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5519', 'Réduction de valeur actée', '551', 'ACT', 721,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5520', 'Comptes courants', '552', 'ACT', 722, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5521', 'Chèques émis (-)', '552', 'ACTINV', 723, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5529', 'Réduction de valeur actée', '552', 'ACT', 724,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5530', 'Comptes courants', '553', 'ACT', 725, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5531', 'Chèques émis (-)', '553', 'ACTINV', 726, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5539', 'Réduction de valeur actée', '553', 'ACT', 727,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5540', 'Comptes courants', '554', 'ACT', 728, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5541', 'Chèques émis (-)', '554', 'ACTINV', 729, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5549', 'Réduction de valeur actée', '554', 'ACT', 730,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5550', 'Comptes courants', '555', 'ACT', 731, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5551', 'Chèques émis (-)', '555', 'ACTINV', 732, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5559', 'Réduction de valeur actée', '555', 'ACT', 733,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5560', 'Comptes courants', '556', 'ACT', 734, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5561', 'Chèques émis (-)', '556', 'ACTINV', 735, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5569', 'Réduction de valeur actée', '556', 'ACT', 736,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5570', 'Comptes courants', '557', 'ACT', 737, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5571', 'Chèques émis (-)', '557', 'ACTINV', 738, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5579', 'Réduction de valeur actée', '557', 'ACT', 739,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5580', 'Comptes courants', '558', 'ACT', 740, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5581', 'Chèques émis (-)', '558', 'ACTINV', 741, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5589', 'Réduction de valeur actée', '558', 'ACT', 742,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5590', 'Comptes courants', '559', 'ACT', 743, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5591', 'Chèques émis (-)', '559', 'ACTINV', 744, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5599', 'Réduction de valeur actée', '559', 'ACT', 745,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('560', 'Compte courant', '56', 'ACT', 747, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('561', 'Chèques émis', '56', 'ACT', 748, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('578', 'Caisse timbre', '57', 'ACT', 749, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('600', 'Achats de matières premières', '60', 'CHA',
752, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('601', 'Achats de fournitures', '60', 'CHA', 753, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('602', 'Achats de services, travaux et études', '60',
'CHA', 754, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('603', 'Sous-traitances générales', '60', 'CHA', 755,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('604', 'Achats de marchandises', '60', 'CHA', 756, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('605', 'Achats d''immeubles destinés à la vente', '60',
'CHA', 757, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('608', 'Remises, ristournes et rabais obtenus(-)',
'60', 'CHAINV', 758, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('609', 'Variation de stock', '60', 'CHA', 759, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6090', 'de matières premières', '609', 'CHA', 760,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6091', 'de fournitures', '609', 'CHA', 761, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6094', 'de marchandises', '609', 'CHA', 762, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6095', 'immeubles achetés destinés à la vente', '609',
'CHA', 763, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('620', 'Rémunérations et avantages sociaux directs',
'62', 'CHA', 766, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6200', 'Administrateurs ou gérants', '620', 'CHA',
767, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6201', 'Personnel de directions', '620', 'CHA', 768,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6203', 'Ouvriers', '620', 'CHA', 769, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6204', 'Autres membres du personnel', '620', 'CHA',
770, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('621', 'Cotisations patronales d''assurances sociales',
'62', 'CHA', 771, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('622', 'Primes partonales pour assurances
extra-légales', '62', 'CHA', 772, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('623', 'Autres frais de personnel', '62', 'CHA', 773,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('624', 'Pensions de retraite et de survie', '62',
'CHA', 774, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6240', 'Administrateurs ou gérants', '624', 'CHA',
775, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6241', 'Personnel', '624', 'CHA', 776, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('630', 'Dotations aux amortissements et réduction de
valeurs sur immobilisations', '63', 'CHA', 778, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6300', ' Dotations aux amortissements sur frais
d''établissement', '630', 'CHA', 779, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('705', 'Ventes et prestations de services', '70',
'PRO', 780, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('414', 'Produits à recevoir', '41', 'ACT', 781, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('416', 'Créances diverses', '41', 'ACT', 782, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4160', 'Comptes de l''exploitant', '416', 'ACT', 783,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('417', 'Créances douteuses', '41', 'ACT', 784, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('418', 'Cautionnements versés en numéraires', '41',
'ACT', 785, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('419', 'Réductions de valeur actées', '41', 'ACT', 786,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('420', 'Emprunts subordonnés', '42', 'PAS', 788, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4200', 'convertibles', '420', 'PAS', 789, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4201', 'non convertibles', '420', 'PAS', 790, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('421', 'Emprunts subordonnés', '42', 'PAS', 791, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4210', 'convertibles', '420', 'PAS', 792, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4211', 'non convertibles', '420', 'PAS', 793, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('422', ' Dettes de locations financement', '42', 'PAS',
794, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('423', ' Etablissement de crédit', '42', 'PAS', 795,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4230', 'Dettes en comptes', '423', 'PAS', 796, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4231', 'Promesses', '423', 'PAS', 797, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4232', 'Crédits d''acceptation', '423', 'PAS', 798,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('424', 'Autres emprunts', '42', 'PAS', 799, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('425', 'Dettes commerciales', '42', 'PAS', 800, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4250', 'Fournisseurs', '425', 'PAS', 801, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4251', 'Effets à payer', '425', 'PAS', 802, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('426', 'Acomptes reçus sur commandes', '42', 'PAS',
803, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('428', 'Cautionnement reçus en numéraires', '42',
'PAS', 804, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('429', 'Dettes diverses', '42', 'PAS', 805, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('430', 'Etablissements de crédit - Emprunts à compte à
terme fixe', '43', 'PAS', 807, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('431', 'Etablissements de crédit - Promesses', '43',
'PAS', 808, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('432', ' Etablissements de crédit - Crédits
d''acceptation', '43', 'PAS', 809, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('433', 'Etablissements de crédit -Dettes en comptes
courant', '43', 'PAS', 810, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('439', 'Autres emprunts', '43', 'PAS', 811, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('441', 'Effets à payer', '44', 'PAS', 814, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('444', 'Factures à recevoir', '44', 'PAS', 815, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('450', 'Dettes fiscales estimées', '45', 'PAS', 817,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4500', 'Impôts belges sur le résultat', '450', 'PAS',
818, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4501', 'Impôts belges sur le résultat', '450', 'PAS',
819, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4502', 'Impôts belges sur le résultat', '450', 'PAS',
820, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4503', 'Impôts belges sur le résultat', '450', 'PAS',
821, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4504', 'Impôts belges sur le résultat', '450', 'PAS',
822, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4505', 'Autres impôts et taxes belges', '450', 'PAS',
823, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4506', 'Autres impôts et taxes belges', '450', 'PAS',
824, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4507', 'Autres impôts et taxes belges', '450', 'PAS',
825, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4508', 'Impôts et taxes étrangers', '450', 'PAS', 826,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('451', 'TVA à payer', '45', 'PAS', 827, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4511', 'TVA à payer 21%', '451', 'PAS', 828, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4512', 'TVA à payer 12%', '451', 'PAS', 829, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4513', 'TVA à payer 6%', '451', 'PAS', 830, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4514', 'TVA à payer 0%', '451', 'PAS', 831, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('452', 'Impôts et taxes à payer', '45', 'PAS', 832,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4520', 'Impôts belges sur le résultat', '452', 'PAS',
833, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4521', 'Impôts belges sur le résultat', '452', 'PAS',
834, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4522', 'Impôts belges sur le résultat', '452', 'PAS',
835, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4523', 'Impôts belges sur le résultat', '452', 'PAS',
836, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4524', 'Impôts belges sur le résultat', '452', 'PAS',
837, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4525', 'Autres impôts et taxes belges', '452', 'PAS',
838, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4526', 'Autres impôts et taxes belges', '452', 'PAS',
839, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4527', 'Autres impôts et taxes belges', '452', 'PAS',
840, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4528', 'Impôts et taxes étrangers', '452', 'PAS', 841,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('453', 'Précomptes retenus', '45', 'PAS', 842, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('454', 'Office National de la Sécurité Sociales', '45',
'PAS', 843, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('455', 'Rémunérations', '45', 'PAS', 844, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('456', 'Pécules de vacances', '45', 'PAS', 845, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('459', 'Autres dettes sociales', '45', 'PAS', 846, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('470', 'Dividendes et tantièmes d''exercices
antérieurs', '47', 'PAS', 849, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('471', 'Dividendes de l''exercice', '47', 'PAS', 850,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('472', 'Tantièmes de l''exercice', '47', 'PAS', 851,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('473', 'Autres allocataires', '47', 'PAS', 852, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('480', 'Obligations et coupons échus', '48', 'PAS',
854, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('488', 'Cautionnements reçus en numéraires', '48',
'PAS', 855, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('489', 'Autres dettes diverses', '48', 'PAS', 856, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4890', 'Compte de l''exploitant', '489', 'PAS', 857,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('490', 'Charges à reporter', '49', 'ACT', 859, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('491', 'Produits acquis', '49', 'ACT', 860, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('492', 'Charges à imputer', '49', 'PAS', 861, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('493', 'Produits à reporter', '49', 'PAS', 862, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('499', 'Comptes d''attentes', '49', 'ACT', 863, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2821', 'Montants non-appelés(-)', '282', 'ACT', 864,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2828', 'Plus-values actées', '282', 'ACT', 865, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2829', 'Réductions de valeurs actées', '282', 'ACT',
866, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('283', 'Créances sur des entreprises avec lesquelles
existe un lien de participation', '28', 'ACT', 867, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2830', 'Créance en compte', '283', 'ACT', 868, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2831', 'Effets à recevoir', '283', 'ACT', 869, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2832', 'Titre à revenu fixe', '283', 'ACT', 871, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2837', 'Créances douteuses', '283', 'ACT', 872, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2839', 'Réduction de valeurs actées', '283', 'ACT',
873, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('284', 'Autres actions et parts', '28', 'ACT', 874,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2840', 'Valeur d''acquisition', '284', 'ACT', 875,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2841', 'Montants non-appelés(-)', '284', 'ACT', 876,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2848', 'Plus-values actées', '284', 'ACT', 877, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2849', 'Réductions de valeurs actées', '284', 'ACT',
878, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('285', 'Autres créances', '28', 'ACT', 879, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2850', 'Créance en compte', '285', 'ACT', 880, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2851', 'Effets à recevoir', '285', 'ACT', 881, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2852', 'Titre à revenu fixe', '285', 'ACT', 882, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2857', 'Créances douteuses', '285', 'ACT', 883, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2859', 'Réductions de valeurs actées', '285', 'ACT',
884, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('288', 'Cautionnements versés en numéraires', '28',
'ACT', 885, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('290', 'Créances commerciales', '29', 'ACT', 887, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2900', 'Clients', '290', 'ACT', 888, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2901', 'Effets à recevoir', '290', 'ACT', 889, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2906', 'Acomptes versés', '290', 'ACT', 890, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2907', 'Créances douteuses', '290', 'ACT', 891, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2909', 'Réductions de valeurs actées', '290', 'ACT',
892, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('291', 'Autres créances', '29', 'ACT', 893, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2910', 'Créances en comptes', '291', 'ACT', 894, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2911', 'Effets à recevoir', '291', 'ACT', 895, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2917', 'Créances douteuses', '291', 'ACT', 896, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2919', 'Réductions de valeurs actées(-)', '291',
'ACT', 897, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('300', 'Valeur d''acquisition', '30', 'ACT', 899, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('309', 'Réductions de valeur actées', '30', 'ACT', 900,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('310', 'Valeur d''acquisition', '31', 'ACT', 902, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('319', 'Réductions de valeurs actées(-)', '31', 'ACT',
903, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('320', 'Valeurs d''acquisition', '32', 'ACT', 905, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('329', 'Réductions de valeur actées', '32', 'ACT', 906,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('330', 'Valeur d''acquisition', '33', 'ACT', 908, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('339', 'Réductions de valeur actées', '33', 'ACT', 909,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('340', 'Valeur d''acquisition', '34', 'ACT', 911, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('349', 'Réductions de valeur actées', '34', 'ACT', 912,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('350', 'Valeur d''acquisition', '35', 'ACT', 914, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('359', 'Réductions de valeur actées', '35', 'ACT', 915,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('360', 'Valeur d''acquisition', '36', 'ACT', 917, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('369', 'Réductions de valeur actées', '36', 'ACT', 918,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('370', 'Valeur d''acquisition', '37', 'ACT', 920, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('371', 'Bénéfice pris en compte ', '37', 'ACT', 921,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('379', 'Réductions de valeur actées', '37', 'ACT', 922,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('400', 'Clients', '40', 'ACT', 924, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('401', 'Effets à recevoir', '40', 'ACT', 925, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('404', 'Produits à recevoir', '40', 'ACT', 926, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('406', 'Acomptes versés', '40', 'ACT', 927, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('407', 'Créances douteuses', '40', 'ACT', 928, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('409', 'Réductions de valeur actées', '40', 'ACT', 929,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('410', 'Capital appelé non versé', '41', 'ACT', 931,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('411', 'TVA à récupérer', '41', 'ACT', 932, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4111', 'TVA à récupérer 21%', '411', 'ACT', 933, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4112', 'TVA à récupérer 12%', '411', 'ACT', 934, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4113', 'TVA à récupérer 6% ', '411', 'ACT', 935, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4114', 'TVA à récupérer 0%', '411', 'ACT', 936, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('412', 'Impôts et précomptes à récupérer', '41', 'ACT',
937, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4120', 'Impôt belge sur le résultat', '412', 'ACT',
938, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4121', 'Impôt belge sur le résultat', '412', 'ACT',
939, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4122', 'Impôt belge sur le résultat', '412', 'ACT',
940, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4123', 'Impôt belge sur le résultat', '412', 'ACT',
941, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4124', 'Impôt belge sur le résultat', '412', 'ACT',
942, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4125', 'Autres impôts et taxes belges', '412', 'ACT',
943, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4126', 'Autres impôts et taxes belges', '412', 'ACT',
944, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4127', 'Autres impôts et taxes belges', '412', 'ACT',
945, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4128', 'Impôts et taxes étrangers', '412', 'ACT', 946,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040003', 'Petit matériel', '604', 'CHA', 948, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('130', 'Réserve légale', '13', 'PAS', 952, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('131', 'Réserve indisponible', '13', 'PAS', 953, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1310', 'Réserve pour actions propres', '131', 'PAS',
954, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040004', 'Assurance', '604', 'CHA', 955, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000001', 'Caisse', '5500', 'ACT', 956, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('133', 'Réserves disponibles', '13', 'PAS', 957, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('140', 'Bénéfice reporté', '14', 'PAS', 959, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('141', 'Perte reportée', '14', 'PASINV', 960, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('160', 'Provisions pour pensions et obligations
similaires', '16', 'PAS', 963, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('161', 'Provisions pour charges fiscales', '16', 'PAS',
964, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('749', 'Produits d''exploitations divers', '74', 'PRO',
965, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('162', 'Provisions pour grosses réparation et gros
entretien', '16', 'PAS', 966, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('170', 'Emprunts subordonnés', '17', 'PAS', 968, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1700', 'convertibles', '170', 'PAS', 969, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1701', 'non convertibles', '170', 'PAS', 970, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('171', 'Emprunts subordonnés', '17', 'PAS', 971, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1710', 'convertibles', '170', 'PAS', 972, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1711', 'non convertibles', '170', 'PAS', 973, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('172', ' Dettes de locations financement', '17', 'PAS',
974, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('173', ' Etablissement de crédit', '17', 'PAS', 975,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1730', 'Dettes en comptes', '173', 'PAS', 976, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1731', 'Promesses', '173', 'PAS', 977, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1732', 'Crédits d''acceptation', '173', 'PAS', 978,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('174', 'Autres emprunts', '17', 'PAS', 979, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('175', 'Dettes commerciales', '17', 'PAS', 980, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1750', 'Fournisseurs', '175', 'PAS', 981, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1751', 'Effets à payer', '175', 'PAS', 982, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('176', 'Acomptes reçus sur commandes', '17', 'PAS',
983, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('178', 'Cautionnement reçus en numéraires', '17',
'PAS', 984, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('179', 'Dettes diverses', '17', 'PAS', 985, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('200', 'Frais de constitution et d''augmentation de
capital', '20', 'ACT', 987, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('201', ' Frais d''émission d''emprunts et primes de
remboursement', '20', 'ACT', 988, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('202', 'Autres frais d''établissement', '20', 'ACT',
989, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('204', 'Frais de restructuration', '20', 'ACT', 990,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('210', 'Frais de recherche et de développement', '21',
'ACT', 992, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('211', 'Concessions, brevet, licence savoir faire,
marque et droit similaires', '21', 'ACT', 993, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('212', 'Goodwill', '21', 'ACT', 994, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('213', 'Acomptes versés', '21', 'ACT', 995, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('220', 'Terrains', '22', 'ACT', 997, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('222', 'Terrains bâtis', '22', 'ACT', 998, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('223', 'Autres droits réels sur des immeubles', '22',
'ACT', 999, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('250', 'Terrains', '25', 'ACT', 1003, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('251', 'Construction', '25', 'ACT', 1004, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('252', 'Terrains bâtis', '25', 'ACT', 1005, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('253', 'Mobilier et matériels roulants', '25', 'ACT',
1006, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('280', 'Participation dans des entreprises liées',
'28', 'ACT', 1010, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2800', 'Valeur d''acquisition', '280', 'ACT', 1011,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2801', 'Montants non-appelés(-)', '280', 'ACT', 1012,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2808', 'Plus-values actées', '280', 'ACT', 1013, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2809', 'Réductions de valeurs actées', '280', 'ACT',
1014, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('281', 'Créance sur des entreprises liées', '28',
'ACT', 1015, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2810', 'Créance en compte', '281', 'ACT', 1016, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2811', 'Effets à recevoir', '281', 'ACT', 1017, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2812', 'Titre à reveny fixe', '281', 'ACT', 1018, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2817', 'Créances douteuses', '281', 'ACT', 1019, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2819', 'Réduction de valeurs actées', '281', 'ACT',
1020, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('282', 'Participations dans des entreprises avec
lesquelles il existe un lien de participation', '28', 'ACT', 1021, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2820', 'Valeur d''acquisition', '282', 'ACT', 1022,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4516', 'Tva Export 0%', '451', 'PAS', 1023, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4115', 'Tva Intracomm 0%', '411', 'ACT', 1024, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4116', 'Tva Export 0%', '411', 'ACT', 1025, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41141', 'TVA pour l\''export', '4114', 'ACT', 1026,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41142', 'TVA sur les opérations intracommunautaires',
'4114', 'ACT', 1027, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45141', 'TVA pour l\''export', '451', 'PAS', 1028,
'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45142', 'TVA sur les opérations intracommunautaires',
'4514', 'PAS', 1029, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41143', 'TVA sur les opérations avec des assujettis
art 44 Code TVA', '4114', 'ACT', 1030, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45143', 'TVA sur les opérations avec des assujettis
art 44 Code TVA', '4514', 'PAS', 1031, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41144', 'TVA sur les opérations avec des
cocontractants', '4114', 'ACT', 1032, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45144', 'TVA sur les opérations avec des
cocontractants', '4514', 'PAS', 1033, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6202', 'Employés,620', '62', 'CHA', 1034, 'Y');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('57', 'Caisse', '5', 'ACT', 870, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1', 'Fonds propres, provisions pour risques et charges
à plus d''un an', '0', 'PAS', 520, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2', 'Frais d''établissement, actifs immobilisés et
créances à plus d''un an', '0', 'ACT', 521, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('3', 'Stocks et commandes en cours d''éxécution', '0',
'ACT', 522, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4', 'Créances et dettes à un an au plus', '0', 'ACT',
523, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5', 'Placements de trésorerie et valeurs disponibles',
'0', 'ACT', 524, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6', 'Charges', '0', 'CHA', 525, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7', 'Produits', '0', 'PRO', 526, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('34', 'Marchandises', '3', 'ACT', 910, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('9', 'Comptes hors Compta', '0', 'CON', 547, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('68', 'Transferts aux réserves immunisées', '6', 'CHA',
555, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('69', 'Affectations et prélévements', '6', 'CHA', 556,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('70', 'Chiffre d''affaire', '7', 'PRO', 564, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('71', 'Variations des stocks et commandes en cours
d''éxécution', '7', 'PRO', 573, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('72', 'Production immobilisée', '7', 'PRO', 580, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('74', 'Autres produits d''exploitation', '7', 'PRO',
581, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('75', 'Produits financiers', '7', 'PRO', 591, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('76', 'Produits exceptionnels', '7', 'PRO', 603, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('77', 'Régularisations d''impôts et reprises de
provisions fiscales', '7', 'PRO', 616, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('79', 'Affectations et prélévements', '7', 'PRO', 622,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('64', 'Autres charges d''exploitation', '6', 'CHA',
652, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('65', 'Charges financières', '6', 'CHA', 663, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('66', 'Charges exceptionnelles', '6', 'CHA', 680, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('67', 'impôts sur le résultat', '6', 'CHA', 694, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('50', 'Actions propres', '5', 'ACT', 701, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('51', 'Actions et parts', '5', 'ACT', 702, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('52', 'Titres à revenu fixe', '5', 'ACT', 706, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('53', 'Dépôts à terme', '5', 'ACT', 709, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('54', 'Valeurs échues à l''encaissement', '5', 'ACT',
713, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55', 'Etablissement de crédit', '5', 'ACT', 714, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('56', 'Office des chèques postaux', '5', 'ACT', 746,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('58', 'Virement interne', '5', 'ACT', 750, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('60', 'Approvisionnement et marchandises', '6', 'CHA',
751, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('61', 'Services et biens divers', '6', 'CHA', 764, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('62', 'Rémunérations, charges sociales et pensions',
'6', 'CHA', 765, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('63', 'Amortissements, réductions de valeurs et
provisions pour risques et charges', '6', 'CHA', 777, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('42', 'Dettes à plus dun an échéant dans l''année',
'4', 'PAS', 787, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('43', 'Dettes financières', '4', 'PAS', 806, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('44', 'Dettes commerciales', '4', 'PAS', 812, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45', 'Dettes fiscales, salariales et sociales', '4',
'PAS', 816, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('46', 'Acomptes reçus sur commandes', '4', 'PAS', 847,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('47', 'Dettes découlant de l''affectation du résultat',
'4', 'PAS', 848, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('48', 'Dettes diverses', '4', 'PAS', 853, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('49', 'Comptes de régularisation', '4', 'ACT', 858,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('29', 'Créances à plus d''un an', '2', 'ACT', 886, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('30', 'Approvisionements - Matières premières', '3',
'ACT', 898, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('31', 'Approvisionnements - fournitures', '3', 'ACT',
901, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('32', 'En-cours de fabrication', '3', 'ACT', 904, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('33', 'Produits finis', '3', 'ACT', 907, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('35', 'Immeubles destinés à la vente', '3', 'ACT', 913,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('36', 'Acomptes versés sur achats pour stocks', '3',
'ACT', 916, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('37', 'Commandes en cours éxécution', '3', 'ACT', 919,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('40', 'Créances commerciales', '4', 'ACT', 923, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41', 'Autres créances', '4', 'ACT', 930, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('10', 'Capital ', '1', 'PAS', 947, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('11', 'Prime d''émission ', '1', 'PAS', 949, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('12', 'Plus Value de réévaluation ', '1', 'PAS', 950,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('13', 'Réserve ', '1', 'PAS', 951, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('14', 'Bénéfice ou perte reportée', '1', 'PAS', 958,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('15', 'Subside en capital', '1', 'PAS', 961, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('16', 'Provisions pour risques et charges', '1', 'PAS',
962, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('17', ' Dettes à plus d''un an', '1', 'PAS', 967, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('20', 'Frais d''établissement', '2', 'ACT', 986, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('21', 'Immobilisations incorporelles', '2', 'ACT', 991,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('22', 'Terrains et construction', '2', 'ACT', 996, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('23', ' Installations, machines et outillages', '2',
'ACT', 1000, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('24', 'Mobilier et Matériel roulant', '2', 'ACT', 1001,
'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('25', 'Immobilisations détenus en location-financement
et droits similaires', '2', 'ACT', 1002, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('26', 'Autres immobilisations corporelles', '2', 'ACT',
1007, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('27', 'Immobilisations corporelles en cours et acomptes
versés', '2', 'ACT', 1008, 'N');
+INSERT INTO public.tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('28', 'Immobilisations financières', '2', 'ACT', 1009,
'N');
+
+
+
+
+
+
+INSERT INTO public.currency_history (id, ch_value, ch_from, currency_id)
VALUES (1, 1.00000000, '2000-01-01', 0);
+
+
+
+
+
+
+
+
+
+
+
+
+INSERT INTO public.document_component (dc_id, dc_code, dc_comment) VALUES (1,
'ACH', 'Journaux achat');
+INSERT INTO public.document_component (dc_id, dc_code, dc_comment) VALUES (2,
'VEN', 'Journaux vente');
+INSERT INTO public.document_component (dc_id, dc_code, dc_comment) VALUES (3,
'GES', 'Gestion');
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 2);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 2);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (3, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (3, 2);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 3);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 4);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 13);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 14);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 15);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 16);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 17);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 18);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 13);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 14);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 15);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 16);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 17);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 18);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 13);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 14);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 16);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 17);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 18);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 6);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 7);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 6);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 7);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (3, 7);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 19);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 19);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (14, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 4);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 10);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 4);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 10);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (10, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (10, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (11, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (11, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (12, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (12, 12);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (13, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (13, 9);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (7, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (7, 8);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (7, 9);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (7, 10);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 11);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 11);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 15);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 15);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (15, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (15, 9);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (1, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (3, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (4, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (5, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (6, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (10, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (11, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (12, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (13, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (14, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (15, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (7, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (9, 24);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (8, 24);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (14, 24);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 17);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 18);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 25);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 26);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 27);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (16, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 4);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 3);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 5);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 15);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 16);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 24);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (25, 23);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (2, 30);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (26, 1);
-INSERT INTO attr_min (frd_id, ad_id) VALUES (26, 9);
-
-
-
-INSERT INTO bilan (b_id, b_name, b_file_template, b_file_form, b_type) VALUES
(1, 'Bilan Belge complet', 'document/fr_be/bnb.rtf', 'document/fr_be/bnb.form',
'RTF');
-INSERT INTO bilan (b_id, b_name, b_file_template, b_file_form, b_type) VALUES
(9, 'ASBL', 'document/fr_be/bnb-asbl.rtf', 'document/fr_be/bnb-asbl.form',
'RTF');
-
-
-
-SELECT pg_catalog.setval('bilan_b_id_seq', 9, true);
-
-
-
-
-
-
-SELECT pg_catalog.setval('bookmark_b_id_seq', 1, false);
-
-
-
-SELECT pg_catalog.setval('bud_card_bc_id_seq', 1, false);
-
-
-
-SELECT pg_catalog.setval('bud_detail_bd_id_seq', 1, false);
-
-
-
-SELECT pg_catalog.setval('bud_detail_periode_bdp_id_seq', 1, false);
-
-
-
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('550', 'Banque 1', '55', 'ACT', 715, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('440', 'Fournisseurs', '44', 'PAS', 813, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('539', 'Réductions de valeur actées', '53', 'ACT', 518,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('794', 'Intervention d''associés (ou du propriétaire)
dans la perte', '79', 'PRO', 519, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000001', 'Client 1', '400', 'ACT', 527, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000002', 'Client 2', '400', 'ACT', 528, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4000003', 'Client 3', '400', 'ACT', 529, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040001', 'Electricité', '604', 'CHA', 530, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040002', 'Loyer', '604', 'CHA', 531, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000002', 'Banque 1', '5500', 'ACT', 532, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000003', 'Banque 2', '5500', 'ACT', 533, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400001', 'Fournisseur 1', '440', 'PAS', 534, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400002', 'Fournisseur 2', '440', 'PAS', 535, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4400003', 'Fournisseur 4', '440', 'PAS', 536, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610001', 'Electricité', '61', 'CHA', 537, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610002', 'Loyer', '61', 'CHA', 538, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610003', 'Assurance', '61', 'CHA', 539, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('610004', 'Matériel bureau', '61', 'CHA', 540, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000002', 'Marchandise A', '700', 'PRO', 541, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000001', 'Prestation', '700', 'PRO', 542, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7000003', 'Déplacement', '700', 'PRO', 543, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('101', 'Capital non appelé', '10', 'PASINV', 544, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6190', 'TVA récupérable par l''impôt', '61', 'CHA',
545, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6740', 'Dépense non admise', '67', 'CHA', 546, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('100', 'Capital souscrit', '10', 'PAS', 548, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1311', 'Autres réserves indisponibles', '131', 'PAS',
549, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('132', ' Réserves immunisées', '13', 'PAS', 550, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6711', 'Suppléments d''impôts estimés', '671', 'CHA',
551, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6712', 'Provisions fiscales constituées', '671',
'CHA', 552, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('672', 'Impôts étrangers sur le résultat de
l''exercice', '67', 'CHA', 553, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('673', 'Impôts étrangers sur le résultat d''exercice
antérieures', '67', 'CHA', 554, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('690', 'Perte reportée de l''exercice précédent', '69',
'CHA', 557, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('691', 'Dotation à la réserve légale', '69', 'CHA',
558, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('692', 'Dotation aux autres réserves', '69', 'CHA',
559, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('693', 'Bénéfice à reporter', '69', 'CHA', 560, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('694', 'Rémunération du capital', '69', 'CHA', 561,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('695', 'Administrateurs ou gérants', '69', 'CHA', 562,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('696', 'Autres allocataires', '69', 'CHA', 563, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('700', 'Ventes et prestations de services', '70',
'PRO', 565, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('701', 'Ventes et prestations de services', '70',
'PRO', 566, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('702', 'Ventes et prestations de services', '70',
'PRO', 567, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('703', 'Ventes et prestations de services', '70',
'PRO', 568, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('704', 'Ventes et prestations de services', '70',
'PRO', 569, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('706', 'Ventes et prestations de services', '70',
'PRO', 570, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('707', 'Ventes et prestations de services', '70',
'PRO', 571, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('709', 'Remises, ristournes et rabais accordés(-)',
'70', 'PROINV', 572, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('712', 'des en-cours de fabrication', '71', 'PRO', 574,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('713', 'des produits finis', '71', 'PRO', 575, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('715', 'des immeubles construits destinés à la vente',
'71', 'PRO', 576, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('717', ' des commandes en cours d''éxécution', '71',
'PRO', 577, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7170', 'Valeur d''acquisition', '717', 'PRO', 578,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7171', 'Bénéfice pris en compte', '717', 'PRO', 579,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('740', 'Subsides d'' exploitation et montants
compensatoires', '74', 'PRO', 582, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('741', 'Plus-values sur réalisation courantes d''
immobilisations corporelles', '74', 'PRO', 583, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('742', 'Plus-values sur réalisations de créances
commerciales', '74', 'PRO', 584, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('743', 'Produits d''exploitations divers', '74', 'PRO',
585, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('744', 'Produits d''exploitations divers', '74', 'PRO',
586, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('745', 'Produits d''exploitations divers', '74', 'PRO',
587, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('746', 'Produits d''exploitations divers', '74', 'PRO',
588, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('747', 'Produits d''exploitations divers', '74', 'PRO',
589, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('748', 'Produits d''exploitations divers', '74', 'PRO',
590, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('750', 'Produits sur immobilisations financières',
'75', 'PRO', 592, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('751', 'Produits des actifs circulants', '75', 'PRO',
593, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('752', 'Plus-value sur réalisations d''actis
circulants', '75', 'PRO', 594, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('753', 'Subsides en capital et intérêts', '75', 'PRO',
595, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('754', 'Différences de change', '75', 'PRO', 596, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('755', 'Ecarts de conversion des devises', '75', 'PRO',
597, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('221', 'Construction', '22', 'ACT', 598, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('756', 'Produits financiers divers', '75', 'PRO', 599,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('757', 'Produits financiers divers', '75', 'PRO', 600,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('758', 'Produits financiers divers', '75', 'PRO', 601,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('759', 'Produits financiers divers', '75', 'PRO', 602,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('760', 'Reprise d''amortissements et de réductions de
valeur', '76', 'PRO', 604, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7601', 'sur immobilisations corporelles', '760',
'PRO', 605, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7602', 'sur immobilisations incorporelles', '760',
'PRO', 606, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('761', 'Reprises de réductions de valeur sur
immobilisations financières', '76', 'PRO', 607, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('762', 'Reprises de provisions pour risques et charges
exceptionnels', '76', 'PRO', 608, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('763', 'Plus-value sur réalisation d''actifs
immobilisé', '76', 'PRO', 609, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('764', 'Autres produits exceptionnels', '76', 'PRO',
610, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('765', 'Autres produits exceptionnels', '76', 'PRO',
611, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('766', 'Autres produits exceptionnels', '76', 'PRO',
612, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('767', 'Autres produits exceptionnels', '76', 'PRO',
613, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('768', 'Autres produits exceptionnels', '76', 'PRO',
614, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('769', 'Autres produits exceptionnels', '76', 'PRO',
615, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('771', 'impôts belges sur le résultat', '77', 'PRO',
617, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7710', 'Régularisations d''impôts dus ou versé',
'771', 'PRO', 618, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7711', 'Régularisations d''impôts estimés', '771',
'PRO', 619, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7712', 'Reprises de provisions fiscales', '771',
'PRO', 620, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('773', 'Impôts étrangers sur le résultats', '77',
'PRO', 621, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('790', 'Bénéfice reporté de l''exercice précédent',
'79', 'PRO', 623, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('791', 'Prélévement sur le capital et les primes
d''émission', '79', 'PRO', 624, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('792', 'Prélévement sur les réserves', '79', 'PRO',
625, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('793', 'Perte à reporter', '79', 'PRO', 626, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6301', 'Dotations aux amortissements sur
immobilisations incorporelles', '630', 'CHA', 627, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6302', 'Dotations aux amortissements sur
immobilisations corporelles', '630', 'CHA', 628, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6308', 'Dotations aux réductions de valeur sur
immobilisations incorporelles', '630', 'CHA', 629, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6309', 'Dotations aux réductions de valeur sur
immobilisations corporelles', '630', 'CHA', 630, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('631', 'Réductions de valeur sur stocks', '63', 'CHA',
631, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6310', 'Dotations', '631', 'CHA', 632, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6311', 'Reprises(-)', '631', 'CHAINV', 633, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('632', 'Réductions de valeur sur commande en cours
d''éxécution', '63', 'CHA', 634, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6320', 'Dotations', '632', 'CHA', 635, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6321', 'Reprises(-)', '632', 'CHAINV', 636, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('633', 'Réductions de valeurs sur créances commerciales
à plus d''un an', '63', 'CHA', 637, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6330', 'Dotations', '633', 'CHA', 638, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6331', 'Reprises(-)', '633', 'CHAINV', 639, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('634', 'Réductions de valeur sur créances commerciales
à un an au plus', '63', 'CHA', 640, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6340', 'Dotations', '634', 'CHA', 641, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6341', 'Reprise', '634', 'CHAINV', 642, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('635', 'Provisions pour pensions et obligations
similaires', '63', 'CHA', 643, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6350', 'Dotations', '635', 'CHA', 644, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6351', 'Utilisation et reprises', '635', 'CHAINV',
645, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('636', 'Provisions pour grosses réparations et gros
entretien', '63', 'CHA', 646, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6360', 'Dotations', '636', 'CHA', 647, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6361', 'Reprises(-)', '636', 'CHAINV', 648, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('637', 'Provisions pour autres risques et charges',
'63', 'CHA', 649, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6370', 'Dotations', '637', 'CHA', 650, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6371', 'Reprises(-)', '637', 'CHAINV', 651, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('640', 'Charges fiscales d''exploitation', '64', 'CHA',
653, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('641', 'Moins-values sur réalisations courantes
d''immobilisations corporelles', '64', 'CHA', 654, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('642', 'Moins-value sur réalisation de créances
commerciales', '64', 'CHA', 655, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('643', 'Charges d''exploitations', '64', 'CHA', 656,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('644', 'Charges d''exploitations', '64', 'CHA', 657,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('645', 'Charges d''exploitations', '64', 'CHA', 658,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('646', 'Charges d''exploitations', '64', 'CHA', 659,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('647', 'Charges d''exploitations', '64', 'CHA', 660,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('648', 'Charges d''exploitations', '64', 'CHA', 661,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('649', 'Charges d''exploitation portées à l''actif au
titre de frais de restructuration(-)', '64', 'CHAINV', 662, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('650', 'Charges des dettes', '65', 'CHA', 664, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6500', 'Intérêts, commmissions et frais afférents aux
dettes', '650', 'CHA', 665, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6501', 'Amortissements des frais d''émissions
d''emrunts et des primes de remboursement', '650', 'CHA', 666, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6502', 'Autres charges des dettes', '650', 'CHA', 667,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6503', 'Intérêts intercalaires portés à l''actif(-)',
'650', 'CHA', 668, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('651', 'Réductions de valeur sur actifs circulants',
'65', 'CHA', 669, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6510', 'Dotations', '651', 'CHA', 670, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6511', 'Reprises(-)', '651', 'CHAINV', 671, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('652', 'Moins-value sur réalisation d''actifs
circulants', '65', 'CHA', 672, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('653', 'Charges d''escompte de créances', '65', 'CHA',
673, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('654', 'Différences de changes', '65', 'CHA', 674, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('655', 'Ecarts de conversion des devises', '65', 'CHA',
675, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('656', 'Charges financières diverses', '65', 'CHA',
676, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('657', 'Charges financières diverses', '65', 'CHA',
677, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('658', 'Charges financières diverses', '65', 'CHA',
678, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('659', 'Charges financières diverses', '65', 'CHA',
679, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('660', 'Amortissements et réductions de valeur
exceptionnels (dotations)', '66', 'CHA', 681, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6600', 'sur frais d''établissement', '660', 'CHA',
682, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6601', 'sur immobilisations incorporelles', '660',
'CHA', 683, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6602', 'sur immobilisations corporelles', '660',
'CHA', 684, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('661', 'Réductions de valeur sur immobilisations
financières (dotations)', '66', 'CHA', 685, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('662', 'Provisions pour risques et charges
exceptionnels', '66', 'CHA', 686, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('663', 'Moins-values sur réalisations d''actifs
immobilisés', '66', 'CHA', 687, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('664', 'Autres charges exceptionnelles', '66', 'CHA',
688, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('665', 'Autres charges exceptionnelles', '66', 'CHA',
689, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('666', 'Autres charges exceptionnelles', '66', 'CHA',
690, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('667', 'Autres charges exceptionnelles', '66', 'CHA',
691, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('668', 'Autres charges exceptionnelles', '66', 'CHA',
692, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('669', ' Charges exceptionnelles portées à l''actif au
titre de frais de restructuration', '66', 'CHA', 693, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('670', 'Impôts belge sur le résultat de l''exercice',
'67', 'CHA', 695, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6700', 'Impôts et précomptes dus ou versés', '670',
'CHA', 696, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6701', 'Excédents de versement d''impôts et de
précomptes portés à l''actifs (-)', '670', 'CHAINV', 697, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6702', 'Charges fiscales estimées', '670', 'CHA', 698,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('671', 'Impôts belges sur le résultats d''exercices
antérieures', '67', 'CHA', 699, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6710', 'Suppléments d''impôt dus ou versés', '671',
'CHA', 700, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('510', 'Valeur d''acquisition', '51', 'ACT', 703, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('511', 'Montant non appelés', '51', 'ACT', 704, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('519', 'Réductions de valeur actées', '51', 'ACT', 705,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('520', 'Valeur d''acquisition', '52', 'ACT', 707, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('529', 'Réductions de valeur actées', '52', 'ACT', 708,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('530', 'de plus d''un an', '53', 'ACT', 710, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('531', 'de plus d''un mois et d''un an au plus', '53',
'ACT', 711, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('532', 'd''un mois au plus', '53', 'ACT', 712, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5500', 'Comptes courants', '550', 'ACT', 716, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5501', 'Chèques émis (-)', '550', 'ACTINV', 717, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5509', 'Réduction de valeur actée', '550', 'ACT', 718,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5510', 'Comptes courants', '551', 'ACT', 719, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5511', 'Chèques émis (-)', '551', 'ACTINV', 720, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5519', 'Réduction de valeur actée', '551', 'ACT', 721,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5520', 'Comptes courants', '552', 'ACT', 722, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5521', 'Chèques émis (-)', '552', 'ACTINV', 723, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5529', 'Réduction de valeur actée', '552', 'ACT', 724,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5530', 'Comptes courants', '553', 'ACT', 725, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5531', 'Chèques émis (-)', '553', 'ACTINV', 726, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5539', 'Réduction de valeur actée', '553', 'ACT', 727,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5540', 'Comptes courants', '554', 'ACT', 728, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5541', 'Chèques émis (-)', '554', 'ACTINV', 729, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5549', 'Réduction de valeur actée', '554', 'ACT', 730,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5550', 'Comptes courants', '555', 'ACT', 731, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5551', 'Chèques émis (-)', '555', 'ACTINV', 732, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5559', 'Réduction de valeur actée', '555', 'ACT', 733,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5560', 'Comptes courants', '556', 'ACT', 734, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5561', 'Chèques émis (-)', '556', 'ACTINV', 735, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5569', 'Réduction de valeur actée', '556', 'ACT', 736,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5570', 'Comptes courants', '557', 'ACT', 737, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5571', 'Chèques émis (-)', '557', 'ACTINV', 738, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5579', 'Réduction de valeur actée', '557', 'ACT', 739,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5580', 'Comptes courants', '558', 'ACT', 740, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5581', 'Chèques émis (-)', '558', 'ACTINV', 741, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5589', 'Réduction de valeur actée', '558', 'ACT', 742,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5590', 'Comptes courants', '559', 'ACT', 743, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5591', 'Chèques émis (-)', '559', 'ACTINV', 744, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5599', 'Réduction de valeur actée', '559', 'ACT', 745,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('560', 'Compte courant', '56', 'ACT', 747, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('561', 'Chèques émis', '56', 'ACT', 748, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('578', 'Caisse timbre', '57', 'ACT', 749, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('600', 'Achats de matières premières', '60', 'CHA',
752, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('601', 'Achats de fournitures', '60', 'CHA', 753, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('602', 'Achats de services, travaux et études', '60',
'CHA', 754, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('603', 'Sous-traitances générales', '60', 'CHA', 755,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('604', 'Achats de marchandises', '60', 'CHA', 756, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('605', 'Achats d''immeubles destinés à la vente', '60',
'CHA', 757, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('608', 'Remises, ristournes et rabais obtenus(-)',
'60', 'CHAINV', 758, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('609', 'Variation de stock', '60', 'CHA', 759, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6090', 'de matières premières', '609', 'CHA', 760,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6091', 'de fournitures', '609', 'CHA', 761, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6094', 'de marchandises', '609', 'CHA', 762, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6095', 'immeubles achetés destinés à la vente', '609',
'CHA', 763, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('620', 'Rémunérations et avantages sociaux directs',
'62', 'CHA', 766, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6200', 'Administrateurs ou gérants', '620', 'CHA',
767, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6201', 'Personnel de directions', '620', 'CHA', 768,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6203', 'Ouvriers', '620', 'CHA', 769, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6204', 'Autres membres du personnel', '620', 'CHA',
770, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('621', 'Cotisations patronales d''assurances sociales',
'62', 'CHA', 771, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('622', 'Primes partonales pour assurances
extra-légales', '62', 'CHA', 772, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('623', 'Autres frais de personnel', '62', 'CHA', 773,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('624', 'Pensions de retraite et de survie', '62',
'CHA', 774, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6240', 'Administrateurs ou gérants', '624', 'CHA',
775, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6241', 'Personnel', '624', 'CHA', 776, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('630', 'Dotations aux amortissements et réduction de
valeurs sur immobilisations', '63', 'CHA', 778, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6300', ' Dotations aux amortissements sur frais
d''établissement', '630', 'CHA', 779, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('705', 'Ventes et prestations de services', '70',
'PRO', 780, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('414', 'Produits à recevoir', '41', 'ACT', 781, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('416', 'Créances diverses', '41', 'ACT', 782, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4160', 'Comptes de l''exploitant', '416', 'ACT', 783,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('417', 'Créances douteuses', '41', 'ACT', 784, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('418', 'Cautionnements versés en numéraires', '41',
'ACT', 785, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('419', 'Réductions de valeur actées', '41', 'ACT', 786,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('420', 'Emprunts subordonnés', '42', 'PAS', 788, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4200', 'convertibles', '420', 'PAS', 789, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4201', 'non convertibles', '420', 'PAS', 790, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('421', 'Emprunts subordonnés', '42', 'PAS', 791, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4210', 'convertibles', '420', 'PAS', 792, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4211', 'non convertibles', '420', 'PAS', 793, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('422', ' Dettes de locations financement', '42', 'PAS',
794, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('423', ' Etablissement de crédit', '42', 'PAS', 795,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4230', 'Dettes en comptes', '423', 'PAS', 796, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4231', 'Promesses', '423', 'PAS', 797, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4232', 'Crédits d''acceptation', '423', 'PAS', 798,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('424', 'Autres emprunts', '42', 'PAS', 799, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('425', 'Dettes commerciales', '42', 'PAS', 800, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4250', 'Fournisseurs', '425', 'PAS', 801, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4251', 'Effets à payer', '425', 'PAS', 802, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('426', 'Acomptes reçus sur commandes', '42', 'PAS',
803, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('428', 'Cautionnement reçus en numéraires', '42',
'PAS', 804, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('429', 'Dettes diverses', '42', 'PAS', 805, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('430', 'Etablissements de crédit - Emprunts à compte à
terme fixe', '43', 'PAS', 807, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('431', 'Etablissements de crédit - Promesses', '43',
'PAS', 808, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('432', ' Etablissements de crédit - Crédits
d''acceptation', '43', 'PAS', 809, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('433', 'Etablissements de crédit -Dettes en comptes
courant', '43', 'PAS', 810, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('439', 'Autres emprunts', '43', 'PAS', 811, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('441', 'Effets à payer', '44', 'PAS', 814, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('444', 'Factures à recevoir', '44', 'PAS', 815, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('450', 'Dettes fiscales estimées', '45', 'PAS', 817,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4500', 'Impôts belges sur le résultat', '450', 'PAS',
818, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4501', 'Impôts belges sur le résultat', '450', 'PAS',
819, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4502', 'Impôts belges sur le résultat', '450', 'PAS',
820, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4503', 'Impôts belges sur le résultat', '450', 'PAS',
821, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4504', 'Impôts belges sur le résultat', '450', 'PAS',
822, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4505', 'Autres impôts et taxes belges', '450', 'PAS',
823, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4506', 'Autres impôts et taxes belges', '450', 'PAS',
824, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4507', 'Autres impôts et taxes belges', '450', 'PAS',
825, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4508', 'Impôts et taxes étrangers', '450', 'PAS', 826,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('451', 'TVA à payer', '45', 'PAS', 827, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4511', 'TVA à payer 21%', '451', 'PAS', 828, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4512', 'TVA à payer 12%', '451', 'PAS', 829, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4513', 'TVA à payer 6%', '451', 'PAS', 830, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4514', 'TVA à payer 0%', '451', 'PAS', 831, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('452', 'Impôts et taxes à payer', '45', 'PAS', 832,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4520', 'Impôts belges sur le résultat', '452', 'PAS',
833, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4521', 'Impôts belges sur le résultat', '452', 'PAS',
834, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4522', 'Impôts belges sur le résultat', '452', 'PAS',
835, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4523', 'Impôts belges sur le résultat', '452', 'PAS',
836, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4524', 'Impôts belges sur le résultat', '452', 'PAS',
837, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4525', 'Autres impôts et taxes belges', '452', 'PAS',
838, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4526', 'Autres impôts et taxes belges', '452', 'PAS',
839, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4527', 'Autres impôts et taxes belges', '452', 'PAS',
840, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4528', 'Impôts et taxes étrangers', '452', 'PAS', 841,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('453', 'Précomptes retenus', '45', 'PAS', 842, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('454', 'Office National de la Sécurité Sociales', '45',
'PAS', 843, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('455', 'Rémunérations', '45', 'PAS', 844, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('456', 'Pécules de vacances', '45', 'PAS', 845, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('459', 'Autres dettes sociales', '45', 'PAS', 846, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('470', 'Dividendes et tantièmes d''exercices
antérieurs', '47', 'PAS', 849, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('471', 'Dividendes de l''exercice', '47', 'PAS', 850,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('472', 'Tantièmes de l''exercice', '47', 'PAS', 851,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('473', 'Autres allocataires', '47', 'PAS', 852, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('480', 'Obligations et coupons échus', '48', 'PAS',
854, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('488', 'Cautionnements reçus en numéraires', '48',
'PAS', 855, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('489', 'Autres dettes diverses', '48', 'PAS', 856, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4890', 'Compte de l''exploitant', '489', 'PAS', 857,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('490', 'Charges à reporter', '49', 'ACT', 859, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('491', 'Produits acquis', '49', 'ACT', 860, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('492', 'Charges à imputer', '49', 'PAS', 861, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('493', 'Produits à reporter', '49', 'PAS', 862, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('499', 'Comptes d''attentes', '49', 'ACT', 863, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2821', 'Montants non-appelés(-)', '282', 'ACT', 864,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2828', 'Plus-values actées', '282', 'ACT', 865, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2829', 'Réductions de valeurs actées', '282', 'ACT',
866, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('283', 'Créances sur des entreprises avec lesquelles
existe un lien de participation', '28', 'ACT', 867, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2830', 'Créance en compte', '283', 'ACT', 868, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2831', 'Effets à recevoir', '283', 'ACT', 869, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2832', 'Titre à revenu fixe', '283', 'ACT', 871, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2837', 'Créances douteuses', '283', 'ACT', 872, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2839', 'Réduction de valeurs actées', '283', 'ACT',
873, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('284', 'Autres actions et parts', '28', 'ACT', 874,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2840', 'Valeur d''acquisition', '284', 'ACT', 875,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2841', 'Montants non-appelés(-)', '284', 'ACT', 876,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2848', 'Plus-values actées', '284', 'ACT', 877, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2849', 'Réductions de valeurs actées', '284', 'ACT',
878, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('285', 'Autres créances', '28', 'ACT', 879, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2850', 'Créance en compte', '285', 'ACT', 880, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2851', 'Effets à recevoir', '285', 'ACT', 881, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2852', 'Titre à revenu fixe', '285', 'ACT', 882, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2857', 'Créances douteuses', '285', 'ACT', 883, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2859', 'Réductions de valeurs actées', '285', 'ACT',
884, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('288', 'Cautionnements versés en numéraires', '28',
'ACT', 885, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('290', 'Créances commerciales', '29', 'ACT', 887, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2900', 'Clients', '290', 'ACT', 888, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2901', 'Effets à recevoir', '290', 'ACT', 889, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2906', 'Acomptes versés', '290', 'ACT', 890, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2907', 'Créances douteuses', '290', 'ACT', 891, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2909', 'Réductions de valeurs actées', '290', 'ACT',
892, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('291', 'Autres créances', '29', 'ACT', 893, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2910', 'Créances en comptes', '291', 'ACT', 894, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2911', 'Effets à recevoir', '291', 'ACT', 895, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2917', 'Créances douteuses', '291', 'ACT', 896, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2919', 'Réductions de valeurs actées(-)', '291',
'ACT', 897, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('300', 'Valeur d''acquisition', '30', 'ACT', 899, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('309', 'Réductions de valeur actées', '30', 'ACT', 900,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('310', 'Valeur d''acquisition', '31', 'ACT', 902, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('319', 'Réductions de valeurs actées(-)', '31', 'ACT',
903, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('320', 'Valeurs d''acquisition', '32', 'ACT', 905, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('329', 'Réductions de valeur actées', '32', 'ACT', 906,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('330', 'Valeur d''acquisition', '33', 'ACT', 908, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('339', 'Réductions de valeur actées', '33', 'ACT', 909,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('340', 'Valeur d''acquisition', '34', 'ACT', 911, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('349', 'Réductions de valeur actées', '34', 'ACT', 912,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('350', 'Valeur d''acquisition', '35', 'ACT', 914, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('359', 'Réductions de valeur actées', '35', 'ACT', 915,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('360', 'Valeur d''acquisition', '36', 'ACT', 917, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('369', 'Réductions de valeur actées', '36', 'ACT', 918,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('370', 'Valeur d''acquisition', '37', 'ACT', 920, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('371', 'Bénéfice pris en compte ', '37', 'ACT', 921,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('379', 'Réductions de valeur actées', '37', 'ACT', 922,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('400', 'Clients', '40', 'ACT', 924, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('401', 'Effets à recevoir', '40', 'ACT', 925, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('404', 'Produits à recevoir', '40', 'ACT', 926, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('406', 'Acomptes versés', '40', 'ACT', 927, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('407', 'Créances douteuses', '40', 'ACT', 928, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('409', 'Réductions de valeur actées', '40', 'ACT', 929,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('410', 'Capital appelé non versé', '41', 'ACT', 931,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('411', 'TVA à récupérer', '41', 'ACT', 932, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4111', 'TVA à récupérer 21%', '411', 'ACT', 933, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4112', 'TVA à récupérer 12%', '411', 'ACT', 934, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4113', 'TVA à récupérer 6% ', '411', 'ACT', 935, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4114', 'TVA à récupérer 0%', '411', 'ACT', 936, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('412', 'Impôts et précomptes à récupérer', '41', 'ACT',
937, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4120', 'Impôt belge sur le résultat', '412', 'ACT',
938, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4121', 'Impôt belge sur le résultat', '412', 'ACT',
939, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4122', 'Impôt belge sur le résultat', '412', 'ACT',
940, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4123', 'Impôt belge sur le résultat', '412', 'ACT',
941, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4124', 'Impôt belge sur le résultat', '412', 'ACT',
942, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4125', 'Autres impôts et taxes belges', '412', 'ACT',
943, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4126', 'Autres impôts et taxes belges', '412', 'ACT',
944, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4127', 'Autres impôts et taxes belges', '412', 'ACT',
945, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4128', 'Impôts et taxes étrangers', '412', 'ACT', 946,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040003', 'Petit matériel', '604', 'CHA', 948, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('130', 'Réserve légale', '13', 'PAS', 952, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('131', 'Réserve indisponible', '13', 'PAS', 953, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1310', 'Réserve pour actions propres', '131', 'PAS',
954, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6040004', 'Assurance', '604', 'CHA', 955, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55000001', 'Caisse', '5500', 'ACT', 956, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('133', 'Réserves disponibles', '13', 'PAS', 957, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('140', 'Bénéfice reporté', '14', 'PAS', 959, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('141', 'Perte reportée', '14', 'PASINV', 960, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('160', 'Provisions pour pensions et obligations
similaires', '16', 'PAS', 963, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('161', 'Provisions pour charges fiscales', '16', 'PAS',
964, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('749', 'Produits d''exploitations divers', '74', 'PRO',
965, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('162', 'Provisions pour grosses réparation et gros
entretien', '16', 'PAS', 966, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('170', 'Emprunts subordonnés', '17', 'PAS', 968, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1700', 'convertibles', '170', 'PAS', 969, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1701', 'non convertibles', '170', 'PAS', 970, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('171', 'Emprunts subordonnés', '17', 'PAS', 971, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1710', 'convertibles', '170', 'PAS', 972, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1711', 'non convertibles', '170', 'PAS', 973, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('172', ' Dettes de locations financement', '17', 'PAS',
974, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('173', ' Etablissement de crédit', '17', 'PAS', 975,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1730', 'Dettes en comptes', '173', 'PAS', 976, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1731', 'Promesses', '173', 'PAS', 977, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1732', 'Crédits d''acceptation', '173', 'PAS', 978,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('174', 'Autres emprunts', '17', 'PAS', 979, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('175', 'Dettes commerciales', '17', 'PAS', 980, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1750', 'Fournisseurs', '175', 'PAS', 981, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1751', 'Effets à payer', '175', 'PAS', 982, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('176', 'Acomptes reçus sur commandes', '17', 'PAS',
983, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('178', 'Cautionnement reçus en numéraires', '17',
'PAS', 984, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('179', 'Dettes diverses', '17', 'PAS', 985, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('200', 'Frais de constitution et d''augmentation de
capital', '20', 'ACT', 987, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('201', ' Frais d''émission d''emprunts et primes de
remboursement', '20', 'ACT', 988, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('202', 'Autres frais d''établissement', '20', 'ACT',
989, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('204', 'Frais de restructuration', '20', 'ACT', 990,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('210', 'Frais de recherche et de développement', '21',
'ACT', 992, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('211', 'Concessions, brevet, licence savoir faire,
marque et droit similaires', '21', 'ACT', 993, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('212', 'Goodwill', '21', 'ACT', 994, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('213', 'Acomptes versés', '21', 'ACT', 995, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('220', 'Terrains', '22', 'ACT', 997, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('222', 'Terrains bâtis', '22', 'ACT', 998, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('223', 'Autres droits réels sur des immeubles', '22',
'ACT', 999, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('250', 'Terrains', '25', 'ACT', 1003, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('251', 'Construction', '25', 'ACT', 1004, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('252', 'Terrains bâtis', '25', 'ACT', 1005, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('253', 'Mobilier et matériels roulants', '25', 'ACT',
1006, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('280', 'Participation dans des entreprises liées',
'28', 'ACT', 1010, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2800', 'Valeur d''acquisition', '280', 'ACT', 1011,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2801', 'Montants non-appelés(-)', '280', 'ACT', 1012,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2808', 'Plus-values actées', '280', 'ACT', 1013, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2809', 'Réductions de valeurs actées', '280', 'ACT',
1014, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('281', 'Créance sur des entreprises liées', '28',
'ACT', 1015, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2810', 'Créance en compte', '281', 'ACT', 1016, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2811', 'Effets à recevoir', '281', 'ACT', 1017, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2812', 'Titre à reveny fixe', '281', 'ACT', 1018, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2817', 'Créances douteuses', '281', 'ACT', 1019, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2819', 'Réduction de valeurs actées', '281', 'ACT',
1020, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('282', 'Participations dans des entreprises avec
lesquelles il existe un lien de participation', '28', 'ACT', 1021, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2820', 'Valeur d''acquisition', '282', 'ACT', 1022,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4516', 'Tva Export 0%', '451', 'PAS', 1023, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4115', 'Tva Intracomm 0%', '411', 'ACT', 1024, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4116', 'Tva Export 0%', '411', 'ACT', 1025, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41141', 'TVA pour l\''export', '4114', 'ACT', 1026,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41142', 'TVA sur les opérations intracommunautaires',
'4114', 'ACT', 1027, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45141', 'TVA pour l\''export', '451', 'PAS', 1028,
'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45142', 'TVA sur les opérations intracommunautaires',
'4514', 'PAS', 1029, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41143', 'TVA sur les opérations avec des assujettis
art 44 Code TVA', '4114', 'ACT', 1030, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45143', 'TVA sur les opérations avec des assujettis
art 44 Code TVA', '4514', 'PAS', 1031, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41144', 'TVA sur les opérations avec des
cocontractants', '4114', 'ACT', 1032, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45144', 'TVA sur les opérations avec des
cocontractants', '4514', 'PAS', 1033, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6202', 'Employés,620', '62', 'CHA', 1034, 'Y');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('57', 'Caisse', '5', 'ACT', 870, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('1', 'Fonds propres, provisions pour risques et charges
à plus d''un an', '0', 'PAS', 520, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('2', 'Frais d''établissement, actifs immobilisés et
créances à plus d''un an', '0', 'ACT', 521, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('3', 'Stocks et commandes en cours d''éxécution', '0',
'ACT', 522, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('4', 'Créances et dettes à un an au plus', '0', 'ACT',
523, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('5', 'Placements de trésorerie et valeurs disponibles',
'0', 'ACT', 524, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('6', 'Charges', '0', 'CHA', 525, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('7', 'Produits', '0', 'PRO', 526, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('34', 'Marchandises', '3', 'ACT', 910, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('9', 'Comptes hors Compta', '0', 'CON', 547, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('68', 'Transferts aux réserves immunisées', '6', 'CHA',
555, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('69', 'Affectations et prélévements', '6', 'CHA', 556,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('70', 'Chiffre d''affaire', '7', 'PRO', 564, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('71', 'Variations des stocks et commandes en cours
d''éxécution', '7', 'PRO', 573, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('72', 'Production immobilisée', '7', 'PRO', 580, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('74', 'Autres produits d''exploitation', '7', 'PRO',
581, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('75', 'Produits financiers', '7', 'PRO', 591, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('76', 'Produits exceptionnels', '7', 'PRO', 603, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('77', 'Régularisations d''impôts et reprises de
provisions fiscales', '7', 'PRO', 616, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('79', 'Affectations et prélévements', '7', 'PRO', 622,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('64', 'Autres charges d''exploitation', '6', 'CHA',
652, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('65', 'Charges financières', '6', 'CHA', 663, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('66', 'Charges exceptionnelles', '6', 'CHA', 680, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('67', 'impôts sur le résultat', '6', 'CHA', 694, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('50', 'Actions propres', '5', 'ACT', 701, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('51', 'Actions et parts', '5', 'ACT', 702, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('52', 'Titres à revenu fixe', '5', 'ACT', 706, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('53', 'Dépôts à terme', '5', 'ACT', 709, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('54', 'Valeurs échues à l''encaissement', '5', 'ACT',
713, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('55', 'Etablissement de crédit', '5', 'ACT', 714, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('56', 'Office des chèques postaux', '5', 'ACT', 746,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('58', 'Virement interne', '5', 'ACT', 750, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('60', 'Approvisionnement et marchandises', '6', 'CHA',
751, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('61', 'Services et biens divers', '6', 'CHA', 764, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('62', 'Rémunérations, charges sociales et pensions',
'6', 'CHA', 765, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('63', 'Amortissements, réductions de valeurs et
provisions pour risques et charges', '6', 'CHA', 777, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('42', 'Dettes à plus dun an échéant dans l''année',
'4', 'PAS', 787, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('43', 'Dettes financières', '4', 'PAS', 806, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('44', 'Dettes commerciales', '4', 'PAS', 812, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('45', 'Dettes fiscales, salariales et sociales', '4',
'PAS', 816, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('46', 'Acomptes reçus sur commandes', '4', 'PAS', 847,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('47', 'Dettes découlant de l''affectation du résultat',
'4', 'PAS', 848, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('48', 'Dettes diverses', '4', 'PAS', 853, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('49', 'Comptes de régularisation', '4', 'ACT', 858,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('29', 'Créances à plus d''un an', '2', 'ACT', 886, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('30', 'Approvisionements - Matières premières', '3',
'ACT', 898, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('31', 'Approvisionnements - fournitures', '3', 'ACT',
901, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('32', 'En-cours de fabrication', '3', 'ACT', 904, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('33', 'Produits finis', '3', 'ACT', 907, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('35', 'Immeubles destinés à la vente', '3', 'ACT', 913,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('36', 'Acomptes versés sur achats pour stocks', '3',
'ACT', 916, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('37', 'Commandes en cours éxécution', '3', 'ACT', 919,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('40', 'Créances commerciales', '4', 'ACT', 923, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('41', 'Autres créances', '4', 'ACT', 930, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('10', 'Capital ', '1', 'PAS', 947, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('11', 'Prime d''émission ', '1', 'PAS', 949, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('12', 'Plus Value de réévaluation ', '1', 'PAS', 950,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('13', 'Réserve ', '1', 'PAS', 951, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('14', 'Bénéfice ou perte reportée', '1', 'PAS', 958,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('15', 'Subside en capital', '1', 'PAS', 961, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('16', 'Provisions pour risques et charges', '1', 'PAS',
962, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('17', ' Dettes à plus d''un an', '1', 'PAS', 967, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('20', 'Frais d''établissement', '2', 'ACT', 986, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('21', 'Immobilisations incorporelles', '2', 'ACT', 991,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('22', 'Terrains et construction', '2', 'ACT', 996, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('23', ' Installations, machines et outillages', '2',
'ACT', 1000, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('24', 'Mobilier et Matériel roulant', '2', 'ACT', 1001,
'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('25', 'Immobilisations détenus en location-financement
et droits similaires', '2', 'ACT', 1002, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('26', 'Autres immobilisations corporelles', '2', 'ACT',
1007, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('27', 'Immobilisations corporelles en cours et acomptes
versés', '2', 'ACT', 1008, 'N');
-INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type, id,
pcm_direct_use) VALUES ('28', 'Immobilisations financières', '2', 'ACT', 1009,
'N');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (22, 'contact_multiple', 1, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (23, 'contact_multiple', 2, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (24, 'contact_multiple', 3, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (25, 'contact_multiple', 4, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (26, 'contact_multiple', 5, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (27, 'contact_multiple', 6, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (28, 'contact_multiple', 7, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (29, 'contact_multiple', 8, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (30, 'contact_multiple', 9, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (31, 'contact_multiple', 10, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (32, 'contact_multiple', 20, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (33, 'contact_multiple', 21, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (34, 'contact_multiple', 22, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (35, 'make_invoice', 2, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (36, 'make_invoice', 4, 1, NULL);
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (37, 'detail_operation', 2, 1, 'VEN');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (38, 'detail_operation', 3, 1, 'VEN');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (39, 'detail_operation', 4, 1, 'VEN');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (40, 'detail_operation', 5, 1, 'VEN');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (41, 'detail_operation', 10, 1, 'ACH');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (42, 'detail_operation', 20, 1, 'ACH');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (43, 'detail_operation', 21, 1, 'VEN');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (44, 'followup_comment', 1, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (45, 'followup_comment', 2, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (46, 'followup_comment', 3, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (47, 'followup_comment', 4, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (48, 'followup_comment', 5, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (49, 'followup_comment', 6, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (50, 'followup_comment', 7, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (51, 'followup_comment', 8, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (52, 'followup_comment', 9, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (53, 'followup_comment', 10, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (54, 'followup_comment', 20, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (55, 'followup_comment', 21, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (56, 'followup_comment', 22, 1, 'SOME_FIXED');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (57, 'videoconf_server', 1, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (58, 'videoconf_server', 2, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (59, 'videoconf_server', 3, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (60, 'videoconf_server', 4, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (61, 'videoconf_server', 5, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (62, 'videoconf_server', 6, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (63, 'videoconf_server', 7, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (64, 'videoconf_server', 8, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (65, 'videoconf_server', 9, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (66, 'videoconf_server', 10, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (67, 'videoconf_server', 20, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (68, 'videoconf_server', 21, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (69, 'videoconf_server', 22, 1,
'https://www.free-solutions.org/');
+INSERT INTO public.document_option (do_id, do_code, document_type_id,
do_enable, do_option) VALUES (70, 'make_feenote', 10, 1, NULL);
+INSERT INTO public.document_state (s_id, s_value, s_status) VALUES (2, 'A
suivre', NULL);
+INSERT INTO public.document_state (s_id, s_value, s_status) VALUES (3, 'A
faire', NULL);
+INSERT INTO public.document_state (s_id, s_value, s_status) VALUES (1,
'Clôturé', 'C');
+INSERT INTO public.document_state (s_id, s_value, s_status) VALUES (4,
'Abandonné', 'C');
-SELECT pg_catalog.setval('del_action_del_id_seq', 1, false);
-SELECT pg_catalog.setval('del_jrn_dj_id_seq', 1, false);
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (79, '2010-01-01', '2010-01-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (80, '2010-02-01', '2010-02-28', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (81, '2010-03-01', '2010-03-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (82, '2010-04-01', '2010-04-30', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (83, '2010-05-01', '2010-05-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (84, '2010-06-01', '2010-06-30', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (85, '2010-07-01', '2010-07-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (86, '2010-08-01', '2010-08-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (87, '2010-09-01', '2010-09-30', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (88, '2010-10-01', '2010-10-31', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (89, '2010-11-01', '2010-11-30', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (90, '2010-12-01', '2010-12-30', '2010',
false, false, '2010');
+INSERT INTO public.parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central, p_exercice_label) VALUES (91, '2010-12-31', '2010-12-31', '2010',
false, false, '2010');
-SELECT pg_catalog.setval('del_jrnx_djx_id_seq', 1, false);
-SELECT pg_catalog.setval('document_d_id_seq', 1, false);
+INSERT INTO public.form_definition (fr_id, fr_label) VALUES (3000000, 'TVA
déclaration Belge');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511]
FROM=01.2005');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000401, 3000000, 4, 'Marchandises, matière première et auxiliaire
[case 81 ]', '[60%]');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000404, 3000000, 9, 'TVA déductible [ case 59 ]',
'abs([4117]-[411%])');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2');
+INSERT INTO public.form_detail (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula)
VALUES (3000406, 3000000, 9, 'Acompte TVA', '[4117]');
-SELECT pg_catalog.setval('document_modele_md_id_seq', 1, false);
-SELECT pg_catalog.setval('document_seq', 1, false);
-INSERT INTO document_state (s_id, s_value, s_status) VALUES (2, 'A suivre',
NULL);
-INSERT INTO document_state (s_id, s_value, s_status) VALUES (3, 'A faire',
NULL);
-INSERT INTO document_state (s_id, s_value, s_status) VALUES (1, 'Clôturé',
'C');
-INSERT INTO document_state (s_id, s_value, s_status) VALUES (4, 'Abandonné',
'C');
+INSERT INTO public.info_def (id_type, id_description) VALUES ('BON_COMMANDE',
'Numero de bon de commande');
+INSERT INTO public.info_def (id_type, id_description) VALUES ('OTHER', 'Info
diverses');
-SELECT pg_catalog.setval('document_state_s_id_seq', 100, false);
-SELECT pg_catalog.setval('document_type_dt_id_seq', 25, false);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
1, 16, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
1, 27, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5,
1, 36, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
1, 40, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
4, 18, 2);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
12, 19, 3);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
19, 44, 2);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
13, 9, 31);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
13, 20, 31);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
13, 29, 31);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
2, 3, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
12, 8, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
3, 17, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
12, 28, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5,
2, 37, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
2, 41, 1);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
6, 4, 120);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
6, 42, 120);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
7, 5, 130);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5,
7, 38, 130);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
7, 43, 130);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
14, 10, 40);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
14, 21, 40);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
14, 30, 40);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
16, 12, 70);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
16, 23, 70);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
16, 32, 70);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
17, 13, 80);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
17, 24, 80);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
17, 33, 80);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
18, 14, 90);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
18, 25, 90);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
18, 34, 90);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
23, 45, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
23, 46, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
23, 47, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
23, 48, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5,
23, 49, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
23, 50, 400);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
24, 51, 60);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
24, 52, 60);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
15, 11, 50);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
15, 22, 50);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
15, 31, 50);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
5, 1, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
5, 6, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
5, 15, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
5, 26, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5,
5, 35, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6,
5, 39, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1,
1, 2, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
1, 7, 0);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES
(500000, 1, 54, 10);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES
(500000, 9, 55, 20);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES
(500000, 23, 56, 30);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4,
34, 65, 40);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2,
34, 66, 40);
+INSERT INTO public.jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3,
34, 67, 40);
-SELECT pg_catalog.setval('extension_ex_id_seq', 1, true);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (79, '2010-01-01', '2010-01-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (80, '2010-02-01', '2010-02-28', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (81, '2010-03-01', '2010-03-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (82, '2010-04-01', '2010-04-30', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (83, '2010-05-01', '2010-05-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (84, '2010-06-01', '2010-06-30', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (85, '2010-07-01', '2010-07-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (86, '2010-08-01', '2010-08-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (87, '2010-09-01', '2010-09-30', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (88, '2010-10-01', '2010-10-31', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (89, '2010-11-01', '2010-11-30', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (90, '2010-12-01', '2010-12-30', '2010', false, false);
-INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed,
p_central) VALUES (91, '2010-12-31', '2010-12-31', '2010', false, false);
@@ -928,35 +1051,74 @@ INSERT INTO parm_periode (p_id, p_start, p_end,
p_exercice, p_closed, p_central)
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 79,
'OP', 1);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 79,
'OP', 2);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 79,
'OP', 3);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 79,
'OP', 4);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 80,
'OP', 5);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 80,
'OP', 6);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 80,
'OP', 7);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 80,
'OP', 8);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 81,
'OP', 9);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 81,
'OP', 10);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 81,
'OP', 11);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 81,
'OP', 12);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 82,
'OP', 13);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 82,
'OP', 14);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 82,
'OP', 15);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 82,
'OP', 16);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 83,
'OP', 17);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 83,
'OP', 18);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 83,
'OP', 19);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 83,
'OP', 20);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 84,
'OP', 21);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 84,
'OP', 22);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 84,
'OP', 23);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 84,
'OP', 24);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 85,
'OP', 25);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 85,
'OP', 26);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 85,
'OP', 27);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 85,
'OP', 28);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 86,
'OP', 29);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 86,
'OP', 30);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 86,
'OP', 31);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 86,
'OP', 32);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 87,
'OP', 33);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 87,
'OP', 34);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 87,
'OP', 35);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 87,
'OP', 36);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 88,
'OP', 37);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 88,
'OP', 38);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 88,
'OP', 39);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 88,
'OP', 40);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 89,
'OP', 41);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 89,
'OP', 42);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 89,
'OP', 43);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 89,
'OP', 44);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 90,
'OP', 45);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 90,
'OP', 46);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 90,
'OP', 47);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 90,
'OP', 48);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 91,
'OP', 49);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 91,
'OP', 50);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 91,
'OP', 51);
+INSERT INTO public.jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 91,
'OP', 52);
-SELECT pg_catalog.setval('forecast_cat_fc_id_seq', 1, false);
-SELECT pg_catalog.setval('forecast_f_id_seq', 1, false);
-SELECT pg_catalog.setval('forecast_item_fi_id_seq', 1, false);
-INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA déclaration
Belge');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511]
FROM=01.2005');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000401, 3000000, 4, 'Marchandises, matière première et auxiliaire [case 81
]', '[60%]');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000404, 3000000, 9, 'TVA déductible [ case 59 ]', 'abs([4117]-[411%])');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2');
-INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label, fo_formula) VALUES
(3000406, 3000000, 9, 'Acompte TVA', '[4117]');
@@ -966,1124 +1128,1332 @@ INSERT INTO form (fo_id, fo_fr_id, fo_pos, fo_label,
fo_formula) VALUES (3000406
-SELECT pg_catalog.setval('historique_analytique_ha_id_seq', 1, false);
-INSERT INTO info_def (id_type, id_description) VALUES ('BON_COMMANDE', 'Numero
de bon de commande');
-INSERT INTO info_def (id_type, id_description) VALUES ('OTHER', 'Info
diverses');
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 1, 16,
0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 1, 27,
0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5, 1, 36,
0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 1, 40,
0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 4, 18,
2);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 12, 19,
3);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 19, 44,
2);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 13, 9,
31);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 13, 20,
31);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 13, 29,
31);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 2, 3, 1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 12, 8,
1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 3, 17,
1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 12, 28,
1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5, 2, 37,
1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 2, 41,
1);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 6, 4,
120);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 6, 42,
120);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 7, 5,
130);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5, 7, 38,
130);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 7, 43,
130);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 14, 10,
40);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 14, 21,
40);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 14, 30,
40);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 16, 12,
70);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 16, 23,
70);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 16, 32,
70);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 17, 13,
80);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 17, 24,
80);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 17, 33,
80);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 18, 14,
90);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 18, 25,
90);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 18, 34,
90);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 23, 45,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 23, 46,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 23, 47,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 23, 48,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5, 23, 49,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 23, 50,
400);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 24, 51,
60);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 24, 52,
60);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 15, 11,
50);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 15, 22,
50);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 15, 31,
50);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 5, 1,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 5, 6,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (3, 5, 15,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (4, 5, 26,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (5, 5, 35,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (6, 5, 39,
30);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (1, 1, 2, 0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (2, 1, 7, 0);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (500000, 1,
54, 10);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (500000, 9,
55, 20);
-INSERT INTO jnt_fic_attr (fd_id, ad_id, jnt_id, jnt_order) VALUES (500000, 23,
56, 30);
+INSERT INTO public.menu_default (md_id, md_code, me_code) VALUES (1,
'code_invoice', 'COMPTA/VENMENU/VEN');
+INSERT INTO public.menu_default (md_id, md_code, me_code) VALUES (2,
'code_follow', 'GESTION/FOLLOW');
+INSERT INTO public.menu_default (md_id, md_code, me_code) VALUES (3,
'code_feenote', 'COMPTA/MENUACH/ACH');
+
+
+
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCHOP', 'Historique', 'anc_history.inc.php', NULL, 'Historique des
imputations analytiques', NULL, NULL, 'ME', 'Historique des imputations
analytiques');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCBS', 'Balance simple', 'anc_balance_simple.inc.php', NULL, 'Balance
simple des imputations analytiques', NULL, NULL, 'ME', 'Balance simple des
imputations analytiques');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCTAB', 'Tableau', 'anc_acc_table.inc.php', NULL, 'Tableau lié à la
comptabilité', NULL, NULL, 'ME', 'Tableau lié à la comptabilité');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCBCC', 'Balance Analytique/comptabilité', 'anc_acc_balance.inc.php',
NULL, 'Lien entre comptabilité et Comptabilité analytique', NULL, NULL, 'ME',
'Lien entre comptabilité et Comptabilité analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCGR', 'Groupe', 'anc_group_balance.inc.php', NULL, 'Balance par
groupe', NULL, NULL, 'ME', 'Balance par groupe');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGTVA', 'TVA', 'tva.inc.php', NULL, 'Config. de la tva', NULL, NULL,
'ME', 'Permet d''ajouter des taux de TVA ou de les modifier ainsi que les
postes comptables de ces TVA, ces TVA sont utilisables dans les menus de vente
et d''achat');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGMENU', 'Config. Menu', 'menu.inc.php', NULL, 'Configuration des
menus et plugins', NULL, NULL, 'ME', 'Ajout de menu ou de plugins');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('SUPPL', 'Fournisseur', 'supplier.inc.php', NULL, 'Suivi fournisseur',
NULL, NULL, 'ME', 'Suivi des fournisseurs : devis, lettres, email....');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCODS', 'Opérations diverses', 'anc_od.inc.php', NULL, 'OD
analytique', NULL, NULL, 'ME', 'Opérations diverses en Analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('REPORT', 'Création de rapport', 'report.inc.php', NULL, 'Création de
rapport', NULL, NULL, 'ME', 'Création de rapport sur mesure, comme les ratios,
vous permet de créer des graphiques de vos données (vente, achat...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('new_line', 'saut de ligne', NULL, NULL, 'Saut de ligne', NULL, NULL,
'SP', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CUST', 'Client', 'customer.inc.php', NULL, 'Suivi client', NULL, NULL,
'ME', 'Suivi client : devis, réunion, courrier, commande...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('STOCK_HISTO', 'Historique stock', 'stock_histo.inc.php', NULL,
'Historique des mouvement de stock', NULL, NULL, 'ME', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:histo', 'Export Historique', 'export_histo_csv.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:ledger', 'Export Journaux', 'export_ledger_csv.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:ledger', 'Export Journaux', 'export_ledger_pdf.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:postedetail', 'Export Poste détail',
'export_poste_detail_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:postedetail', 'Export Poste détail',
'export_poste_detail_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:fichedetail', 'Export Fiche détail',
'export_fiche_detail_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:fichedetail', 'Export Fiche détail',
'export_fiche_detail_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:fiche_balance', 'Export Fiche balance',
'export_fiche_balance_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:fiche_balance', 'Export Fiche balance',
'export_fiche_balance_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:report', 'Export report', 'export_form_csv.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:report', 'Export report', 'export_form_pdf.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:fiche', 'Export Fiche', 'export_fiche_csv.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:glcompte', 'Export Grand Livre', 'export_gl_csv.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:glcompte', 'Export Grand Livre', 'export_gl_pdf.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:sec', 'Export Sécurité', 'export_security_pdf.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncList', 'Export Comptabilité analytique',
'export_anc_list_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncBalSimple', 'Export Comptabilité analytique balance simple',
'export_anc_balance_simple_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:AncBalSimple', 'Export Comptabilité analytique',
'export_anc_balance_simple_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncBalDouble', 'Export Comptabilité analytique balance double',
'export_anc_balance_double_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:AncBalDouble', 'Export Comptabilité analytique balance double',
'export_anc_balance_double_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:balance', 'Export Balance comptable', 'export_balance_csv.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:balance', 'Export Balance comptable', 'export_balance_pdf.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncTable', 'Export Tableau Analytique',
'export_anc_table_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncAccList', 'Export Historique Compt. Analytique',
'export_anc_acc_list_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncBalGroup', 'Export Balance groupe analytique',
'export_anc_balance_group_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('OTH:Bilan', 'Export Bilan', 'export_bilan_oth.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:AncGrandLivre', 'Impression Grand-Livre',
'export_anc_grandlivre_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:reportinit', 'Export définition d''un raport',
'export_reportinit_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:ActionGestion', 'Export Action Gestion',
'export_follow_up_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:StockHisto', 'Export Historique mouvement stock',
'export_stock_histo_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:StockResmList', 'Export Résumé list stock',
'export_stock_resume_list.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('EXT', 'Extension', NULL, NULL, 'Extensions (plugins)', NULL, NULL,
'ME', 'Menu regroupant les plugins');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PLANANC', 'Plan Compt. analytique', 'anc_pa.inc.php', NULL, 'Plan
analytique', NULL, NULL, 'ME', 'Axe analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCGROUP', 'Groupe', 'anc_group.inc.php', NULL, 'Groupe analytique',
NULL, NULL, 'ME', 'Regroupement de compte analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CONTACT', 'Contact', 'contact.inc.php', NULL, 'Liste des contacts',
NULL, NULL, 'ME', 'Liste de tous vos contacts');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PREDOP', 'Ecriture prédefinie', 'preod.inc.php', NULL, 'Gestion des
opérations prédéfinifies', NULL, NULL, 'ME', 'Les opérations prédéfinies sont
des opérations que vous faites régulièrement (loyer, abonnement,...) ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FIN', 'Nouvel extrait', 'compta_fin.inc.php', NULL, 'Nouvel extrait
bancaire', NULL, NULL, 'ME', 'Encodage d''un extrait bancaire (=relevé
bancaire)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('JSSEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL,
'search_reconcile()', 'ME', 'Historique de toutes vos opérations un menu de
recherche dans une nouvelle fenêtre, vous permettra de retrouver rapidement
l''opération qui vous intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('LETCARD', 'Lettrage par Fiche', 'lettering.card.inc.php', NULL,
'Lettrage par fiche', NULL, NULL, 'ME', 'Lettrage par fiche');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ACHISTO', 'Historique achat', 'history_operation.inc.php', NULL,
'Historique achat', 'ledger_type=ACH', NULL, 'ME', 'Historique de toutes vos
opérations dans les journaux d''achats un menu de recherche, vous permettra de
retrouver rapidement l''opération qui vous intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGACTION', 'Document Suivi', 'cfg_action.inc.php', NULL,
'Configuration des documents dans le suivi', NULL, NULL, 'ME', 'Vous permet
d''ajouter de nouveaux type de documents pour le suivi (bordereau de livraison,
devis..)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('VEN', 'Nouvelle vente', 'compta_ven.inc.php', NULL, 'Nouvelle vente ou
recette', NULL, NULL, 'ME', 'Encodage de tous vos revenus ou vente');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ODHISTO', 'Historique opérations diverses',
'history_operation.inc.php', NULL, 'Historique opérations diverses',
'ledger_type=ODS', NULL, 'ME', 'Historique de toutes vos opérations dans les
journaux d''opérations diverses un menu de recherche, vous permettra de
retrouver rapidement l''opération qui vous intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CMCARD', 'Modèle de fiches', 'fiche_def.inc.php', NULL, 'Gestion de
modèle de fiches', NULL, NULL, 'ME', 'Permet de changer le poste comptable de
base des modèles de fiches');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0PST', 'Poste', 'impress_poste.inc.php', NULL, 'Impression du détail
d''un poste comptable', NULL, NULL, 'ME', 'Impression du détail d''un poste
comptable');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MENUACH', 'Achat', NULL, NULL, 'Menu achat', NULL, NULL, 'ME',
'Regroupement pour les menus d''achats(nouvelle opération, historique...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MOD', 'Menu et profil', NULL, NULL, 'Menu ', NULL, NULL, 'ME',
'Regroupement pour les menus et les profils');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PRINT', 'Impression', NULL, NULL, 'Menu impression', NULL, NULL, 'ME',
'Menu impression');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('BK', 'Banque', 'bank.inc.php', NULL, 'Information Banque', NULL, NULL,
'ME', 'Regroupement des menus des journaux de trésorerie');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCGL', 'Grand''Livre', 'anc_great_ledger.inc.php', NULL, 'Grand livre
analytique', NULL, NULL, 'ME', 'Grand livre pour la comptabilité analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('GESTION', 'Gestion', NULL, NULL, 'Module gestion', NULL, NULL, 'ME',
'Module gestion');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('LET', 'Lettrage', NULL, NULL, 'Lettrage', NULL, NULL, 'ME', 'Menu
Lettrage');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ACCESS', 'Accueil', NULL, 'user_login.php', 'Accueil', NULL, NULL,
'ME', 'Choix de votre dossier');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('COMPTA', 'Comptabilité', NULL, NULL, 'Module comptabilité', NULL,
NULL, 'ME', 'Module comptabilité');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('DIVPARM', 'Divers', NULL, NULL, 'Paramètres divers', NULL, NULL, 'ME',
'Menu de différents paramètres');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGACC', 'Poste', 'poste.inc.php', NULL, 'Config. poste comptable de
base', NULL, NULL, 'ME', 'Config. poste comptable de base');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CARD', 'Fiche', 'fiche.inc.php', NULL, 'Liste,Balance,Historique par
fiche', NULL, NULL, 'ME', 'Permet d''avoir la balance de toutes vos fiches, les
résumés exportables en CSV, les historiques avec ou sans lettrages');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PREFERENCE', 'Préférence', NULL, NULL, 'Préférence', NULL,
'set_preference(<DOSSIER>)', 'ME', 'Préférence de l''utilisateur, apparence de
l''application pour l''utilisateur, période par défaut et mot de passe');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCBC2', 'Balance croisée double', 'anc_balance_double.inc.php', NULL,
'Balance double croisées des imputations analytiques', NULL, NULL, 'ME',
'Balance double croisées des imputations analytiques');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PERIODE', 'Période', 'periode.inc.php', NULL, 'Gestion des périodes',
NULL, NULL, 'ME', 'Gestion des périodes : clôture, ajout de période, afin de
créer des périodes vous pouvez aussi utiliser le plugin outil comptable');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('VERIFBIL', 'Vérification ', 'verif_bilan.inc.php', NULL, 'Vérification
de la comptabilité', NULL, NULL, 'ME', 'Vérifie que votre comptabilité ne
contient pas d''erreur de base, tels que l''équilibre entre le passif et
l''actif, l''utilisation des postes comptables...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGDOC', 'Document', 'document_modele.inc.php', NULL, 'Config. modèle
de document', NULL, NULL, 'ME', 'Chargement de modèles de documents qui seront
générés par NOALYSS, les formats utilisables sont libreoffice, html, text et
rtf');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGSEC', 'Sécurité', 'param_sec.inc.php', NULL, 'configuration de la
sécurité', NULL, NULL, 'ME', 'Configuration de la sécurité, vous permet de
donner un profil à vos utilisateurs, cela leur permettra d''utiliser ce que
vous souhaitez qu''ils puissent utiliser');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('STOCK_STATE', 'Etat des stock', 'stock_state.inc.php', NULL, 'Etat des
stock', NULL, NULL, 'ME', 'Etat des stock de l''exercice indiqué');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('STOCK_INV', 'Modification Stocks', 'stock_inv.inc.php', NULL,
'Modification des stocks (inventaire)', NULL, NULL, 'ME', 'Modification des
stocks, menu utilisé pour l''inventaire');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('STOCK_INVHISTO', 'Histo. Changement', 'stock_inv_histo.inc.php', NULL,
'Liste des changements manuels des stocks', NULL, NULL, 'ME', 'Liste des
changements manuels des stocks, inventaire, transfert de marchandises entre
dépôts...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('HIST', 'Historique', 'history_operation.inc.php', NULL, 'Historique',
'ledger_type=ALL', NULL, 'ME', 'Historique de toutes vos opérations un menu de
recherche, vous permettra de retrouver rapidement l''opération qui vous
intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FREC', 'Rapprochement', 'compta_fin_rec.inc.php', NULL, 'Rapprochement
bancaire', NULL, NULL, 'ME', 'Permet de faire correspondre vos extraits
bancaires avec les opérations de vente ou d''achat, le lettrage se fait
automatiquement');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FSALDO', 'Soldes', 'compta_fin_saldo.inc.php', NULL, 'Solde des
comptes en banques, caisse...', NULL, NULL, 'ME', 'Solde des journaux de
trésorerie cela concerne les comptes en banques, caisse , les chèques... ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('LOGOUT', 'Sortie ⎆', NULL, 'logout.php', 'Sortie', NULL, NULL,
'ME', 'Déconnexion ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('LETACC', 'Lettrage par Poste', 'lettering.account.inc.php', NULL,
'lettrage par poste comptable', NULL, NULL, 'ME', 'lettrage par poste
comptable');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CARDBAL', 'Balance', 'balance_card.inc.php', NULL, 'Balance par
catégorie de fiche', NULL, NULL, 'ME', 'Balance par catégorie de fiche ou pour
toutes les fiches ayant un poste comptable');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGPCMN', 'Plan Comptable', 'param_pcmn.inc.php', NULL, 'Config. du
plan comptable', NULL, NULL, 'ME', 'Modification de votre plan comptable,
parfois il est plus rapide d''utiliser le plugin "Poste Comptable"');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGPRO', 'Profil', 'profile.inc.php', NULL, 'Configuration profil',
NULL, NULL, 'ME', 'Configuration des profils des utilisateurs, permet de fixer
les journaux, profils dans les documents et stock que ce profil peut utiliser.
Cela limite les utilisateurs puisque ceux-ci ont un profil');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CCARDAT', 'Attribut de fiche', 'card_attr.inc.php', NULL, 'Gestion des
attributs de fiches ', NULL, NULL, 'ME', 'Permet d''ajouter de nouveaux
attributs que vous pourrez par la suite ajouter à des catégories de fiches');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('VEHISTO', 'Historique vente', 'history_operation.inc.php', NULL,
'Historique des ventes', 'ledger_type=VEN', NULL, 'ME', 'Historique de toutes
vos opérations dans les journaux de vente un menu de recherche, vous permettra
de retrouver rapidement l''opération qui vous intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FIHISTO', 'Historique financier', 'history_operation.inc.php', NULL,
'Historique financier', 'ledger_type=FIN', NULL, 'ME', 'Historique de toutes
vos opérations dans les journaux de trésorerie un menu de recherche, vous
permettra de retrouver rapidement l''opération qui vous intéresse');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('OTAX', 'Autre Taxe', 'acc_other_tax.inc.php', NULL, 'Autre Taxe pour
les ventes et achats', NULL, NULL, 'ME', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('COMPANY', 'Principal', 'company.inc.php', NULL, 'Parametre societe',
NULL, NULL, 'ME', 'Information sur votre société : nom, adresse... utilisé lors
de la génération de documents');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('NAVI', 'Navigateur 🧭', NULL, NULL, 'Menu simplifié pour
retrouver rapidement un menu', NULL, 'ask_navigator(<DOSSIER>)', 'ME', 'Le
navigateur vous présente une liste de menu auquel vous avez accès et vous
permet d''accèder plus rapidement au menu que vous souhaitez');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0GRL', 'Grand Livre', 'impress_gl_comptes.inc.php', NULL, 'Impression
du grand livre', NULL, NULL, 'ME', 'Impression du grand livre');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0BAL', 'Balance', 'balance.inc.php', NULL, 'Impression des balances
comptables', NULL, NULL, 'ME', 'Impression des balances comptables');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0RAP', 'Rapprochement', 'impress_rec.inc.php', NULL, 'Impression des
rapprochements', NULL, NULL, 'ME', 'Impression des rapprochements : opérations
non rapprochées ou avec des montants différents');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0RPO', 'Rapport', 'impress_rapport.inc.php', NULL, 'Impression de
rapport', NULL, NULL, 'ME', 'Impression de rapport personnalisé, il est aussi
possible d''exporter en CSV afin de faire des graphiques');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('STOCK', 'Stock', NULL, NULL, 'Stock', NULL, NULL, 'ME', 'Permet
d''ajouter de nouvelles catégorie de fiche, d''ajouter des attributs à ces
catégories (numéro de téléphone, gsm, email...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGDOCST', 'Etat des documents', 'doc_state.inc.php', NULL, 'Etat des
documents', NULL, NULL, 'ME', 'Permet d''ajouter des état pour les documents
utilisés dans le suivi (à faire, à suivre...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MENUODS', 'Opérations diverses', NULL, NULL, 'Menu opérations
diverses', NULL, NULL, 'ME', 'Regroupement pour les menus d''opérations
diverses (nouvelle opération, historique...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('VENMENU', 'Vente / Recette', NULL, NULL, 'Menu ventes et recettes',
NULL, NULL, 'ME', 'Regroupement des menus ventes et recettes');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCIMP', 'Impression', NULL, NULL, 'Impression compta. analytique',
NULL, NULL, 'ME', 'Impression compta. analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANC', 'Compta Analytique', NULL, NULL, 'Module comptabilité
analytique', NULL, NULL, 'ME', 'Module comptabilité analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('DASHBOARD', 'Tableau de bord', 'dashboard.inc.php', NULL, 'Tableau de
bord', NULL, NULL, 'ME', 'Tableau de suivi, vous permet de voir en un coup
d''oeil vos dernières opérations, un petit calendrier, une liste de chose à
faire...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ADV', 'Avancé', NULL, NULL, 'Menu avancé', NULL, NULL, 'ME', 'Menu
regroupant la création de rapport, la vérification de la comptabilité...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FOLLOW', 'Liste Suivi', 'action.inc.php', NULL, 'Document de suivi
sous forme de liste', NULL, NULL, 'ME', 'Liste de vos suivis, en fait de tous
les documents, réunions ... dont vous avez besoin afin de suivre vos clients,
fournisseurs ou administrations. Il permet la génération de documents comme les
devis, les bordereau de livraison...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ADM', 'Administration', 'adm.inc.php', NULL, 'Suivi administration,
banque', NULL, NULL, 'ME', 'Suivi des administrations : courrrier,
déclarations.');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('FORECAST', 'Prévision', 'forecast.inc.php', NULL, 'Prévision', NULL,
NULL, 'ME', 'Prévision de vos achats, revenus, permet de suivre l''évolution de
votre société. Vos prévisions sont des formules sur les postes comptables et
vous permettent aussi vos marges brutes.');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:Reconciliation', 'Export opérations rapprochées',
'export_rec_csv.php', NULL, 'Export opérations rapprochées en CSV', NULL, NULL,
'PR', '');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MANAGER', 'Administrateur', 'manager.inc.php', NULL, 'Suivi des
gérants, administrateurs et salariés', NULL, NULL, 'ME', 'Suivi de vos
salariés, managers ainsi que des administrateurs, pour les documents et les
opérations comptables');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGDEFMENU', 'Menu par défaut', 'default_menu.inc.php', NULL,
'Configuration des menus par défaut', NULL, NULL, 'ME', 'Configuration des
menus par défaut, ces menus sont appelés par des actions dans d''autres menus');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:AncReceipt', 'Export pièce PDF', 'export_anc_receipt_pdf.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ANCKEY', 'Clef de répartition', 'anc_key.inc.php', NULL, NULL, NULL,
NULL, 'ME', 'Permet de gèrer les clefs de répartition en comptabilité
analytique');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('BOOKMARK', 'Favori ★ ', NULL, NULL, 'Raccourci vers vos menus
préférés', NULL, 'show_bookmark(<DOSSIER>)', 'ME', 'Ce menu vous présente un
menu rapide de vos menus préférés');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:balance_age', 'Export Balance agée', 'export_balance_age_csv.php',
NULL, 'Balance agée', NULL, NULL, 'PR', 'Balance agée pour les clients et
fournisseurs');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('RAW:receipt', 'Exporte la pièce', 'export_receipt.php', NULL, 'export
la pièce justificative d''une opération', NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('RAW:document', 'Export le document', 'export_document.php', NULL,
'exporte le document d''un événement', NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('RAW:document_template', 'Exporte le modèle de document',
'export_document_template.php', NULL, 'export le modèle de document utilisé
dans le suivi', NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGCURRENCY', 'Devises', 'acc_currency_cfg.inc.php', NULL,
'Configuration des devises', NULL, NULL, 'ME', 'Permet de configurer les
devises');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:Analytic_Axis', 'Export ANC', 'export_anc_axis_csv.php', NULL,
'Export ANC Liste comptes', NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:printtva', 'Export Résumé TVA', 'export_printtva_csv.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:printtva', 'Export Résumé TVA', 'export_printtva_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:operation_detail', NULL, 'export_operation_pdf.php', NULL, 'Export
Operation', NULL, NULL, NULL, NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:FollowUpContactOption', 'Export action suivi',
'export_follow_up_contact_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGOPT1', 'Option Fiches', 'contact_option_ref.inc.php', NULL,
'configure les options pour les fiches dans le suivi', NULL, NULL, 'ME', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ACH', 'Nouvel achat', 'compta_ach.inc.php', NULL, 'Nouvel achat ou
dépense', NULL, NULL, 'ME', 'Vous permet d''encoder des achats, dépenses, des
notes de frais ou des notes de crédits, vous pouvez spécifier un bénéficiaire
ou un autre moyen de paiement');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGSTOCK', 'Dépôt', 'stock_cfg.inc.php', NULL, 'Configuration dépôts',
NULL, NULL, 'ME', 'Configuration des entrepots de dépôts');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('ODS', 'Nouvelle opération', 'compta_ods.inc.php', NULL, 'Nouvelle
opérations diverses', NULL, NULL, 'ME', 'Opération diverses tels que les
amortissements, les augmentations de capital, les salaires, ...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PCUR01', 'Devise', 'print_currency01.inc.php', NULL, 'Résumé par
devise', NULL, NULL, 'ME', 'Résumé par devise afin de
+faire de calculer les écarts de conversion (différence de change) pour les
actifs et passifs');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:pcur01', 'Export Devise CSV', 'export_pcur01_csv.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:pcur01', 'Export Devise PDF', 'export_pcur01_pdf.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGPLUGIN', 'Extension', 'cfgplugin.inc.php', NULL, NULL, NULL, NULL,
'ME', 'Permet d''installer et d''activer facilement des extensions');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGTAG', 'Etiquette', 'cfgtags.inc.php', NULL, 'Configuration des
tags', NULL, NULL, 'ME', 'Configuration des tags ou dossiers, on l''appele tag
ou dossier suivant la façon dont vous utilisez
+cette fonctionnalité. Vous pouvez en ajouter, en supprimer ou les modifier');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MCARD', 'Fiche', NULL, NULL, 'Paramètrage des fiches', NULL, NULL,
'E', 'Menu regroupant ce qui concerne les fiches');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MDOC', 'Document', NULL, NULL, 'Paramètrage des documents', NULL,
NULL, 'E', 'Meu regroupant ce qui concene les documents ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MACC', 'Comptabilité', NULL, NULL, 'Paramètrage comptabilité', NULL,
NULL, 'E', 'Menu regroupant ce qui concerne la comptabilité');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:AncAccList', 'Export Historique Compt. Analytique',
'export_anc_acc_list_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('AGENDA', 'Agenda 📅', 'calendar.inc.php', NULL, 'Agenda', NULL,
NULL, 'ME', 'Agenda, présentation du suivi sous forme d''agenda ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0BIL', 'Bilan', 'impress_bilan.inc.php', NULL, 'Impression de bilan',
NULL, NULL, 'ME', 'Impression de bilan, ce module est basique, il est plus
intéressant d''utiliser le plugin "rapport avancés"');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0JRN', 'Impression Journaux', 'impress_jrn.inc.php', NULL,
'Impression des journaux', NULL, NULL, 'ME', 'Impression des journaux avec les
détails pour les parties privés, la TVA et ce qui est non déductibles en ce qui
concerne les journaux de vente et d''achat');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('NCOL', 'Apparence', 'noalyss-color.inc.php', NULL, 'Couleur de
NOALYSS', NULL, NULL, 'ME', 'Personnalisation des couleurs de NOYALYSS');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CCARD', 'Catégorie fiche', 'cfgfiche.inc.php', NULL, 'Configuration de
catégorie de fiches', NULL, NULL, 'ME', 'Permet d''ajouter de nouvelles
catégorie de fiche, d''ajouter des attributs à ces catégories (numéro de
téléphone, gsm, email...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGLED', 'Journal', 'cfgledger.inc.php', NULL, 'Configuration des
journaux', NULL, NULL, 'ME', 'Création et modification des journaux, préfixe
des pièces justificatives, numérotation, catégories de fiches accessibles à ce
journal');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFGPAY', 'Moyen de paiement', 'payment_method.inc.php', NULL, 'Config.
des méthodes de paiement', NULL, NULL, 'ME', 'Configuration des moyens de
paiements que vous voulez utiliser dans les journaux de type VEN ou ACH, les
moyens de paiement permettent de générer l''opération de trésorerie en même
temps que l''achat, la note de frais ou la [...]
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('MENUFIN', 'Financier', NULL, NULL, 'Menu Financier', NULL, NULL, 'ME',
'Regroupement pour les menus de trésorerie (nouvelle opération,
historique...)');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('OPCL', 'Ouvert./Fermeture', 'operation_exercice.inc.php', NULL,
'Opération de cloture ou d''ouverture d''exercice', NULL, NULL, 'ME', 'Ecriture
d''ouverture ou de fermeture , , reporte les soldes des comptes de l''année
passé du poste comptable 0xxx à 5xxxx sur l''année courante ou ferme les
comptes de 6 à 7 de l''année ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('PDF:card', 'export Fiche détail PDF', 'export_card_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CFG', 'Configuration 🔧', NULL, NULL, 'Configuration de votre
dossier', NULL, NULL, 'ME', 'Module paramètres');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('SEARCH', 'Recherche 🔎', NULL, NULL, 'Recherche', NULL,
'popup_recherche(<DOSSIER>)', 'ME', 'Historique de toutes vos opérations dans
tous les journaux auquels vous avez accès, vous permettra de retrouver
rapidement l''opération qui vous intéresse sur base de la date, du poste
comptable, des montants...');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0TVA', 'Résumé TVA', 'tax_summary.inc.php', NULL, 'totaux par TVA et
par journal', NULL, NULL, 'ME', 'Calcul des totaux par TVA et par journal');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P0BLG', 'Balance agée', 'balance_age.inc.php', NULL, 'Balance agée',
NULL, NULL, 'ME', 'Balance agée pour les clients et fournisseurs');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('P1TVA', 'Détail TVA', 'tax_detail.inc.php', NULL, 'Détail TVA par
journal', NULL, NULL, 'ME', 'Détail des TVA ');
+INSERT INTO public.menu_ref (me_code, me_menu, me_file, me_url,
me_description, me_parameter, me_javascript, me_type, me_description_etendue)
VALUES ('CSV:p1tva', 'Export Détail TVA', 'export_p1tva_csv.php', NULL, NULL,
NULL, NULL, 'PR', NULL);
-SELECT pg_catalog.setval('jnt_letter_jl_id_seq', 1, false);
-SELECT pg_catalog.setval('jrn_info_ji_id_seq', 1, false);
-SELECT pg_catalog.setval('jrn_note_n_id_seq', 1, false);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 79, 'OP', 1);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 79, 'OP', 2);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 79, 'OP', 3);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 79, 'OP', 4);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 80, 'OP', 5);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 80, 'OP', 6);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 80, 'OP', 7);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 80, 'OP', 8);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 81, 'OP', 9);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 81, 'OP',
10);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 81, 'OP',
11);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 81, 'OP',
12);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 82, 'OP',
13);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 82, 'OP',
14);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 82, 'OP',
15);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 82, 'OP',
16);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 83, 'OP',
17);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 83, 'OP',
18);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 83, 'OP',
19);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 83, 'OP',
20);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 84, 'OP',
21);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 84, 'OP',
22);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 84, 'OP',
23);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 84, 'OP',
24);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 85, 'OP',
25);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 85, 'OP',
26);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 85, 'OP',
27);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 85, 'OP',
28);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 86, 'OP',
29);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 86, 'OP',
30);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 86, 'OP',
31);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 86, 'OP',
32);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 87, 'OP',
33);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 87, 'OP',
34);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 87, 'OP',
35);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 87, 'OP',
36);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 88, 'OP',
37);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 88, 'OP',
38);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 88, 'OP',
39);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 88, 'OP',
40);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 89, 'OP',
41);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 89, 'OP',
42);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 89, 'OP',
43);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 89, 'OP',
44);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 90, 'OP',
45);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 90, 'OP',
46);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 90, 'OP',
47);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 90, 'OP',
48);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (4, 91, 'OP',
49);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (1, 91, 'OP',
50);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (3, 91, 'OP',
51);
-INSERT INTO jrn_periode (jrn_def_id, p_id, status, id) VALUES (2, 91, 'OP',
52);
-SELECT pg_catalog.setval('jrn_periode_id_seq', 52, true);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_NAME', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_CP', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_COMMUNE', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_TVA', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_STREET', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_NUMBER', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_TEL', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_PAYS', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_FAX', NULL);
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_ANALYTIC', 'nu');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_COUNTRY', 'BE');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_STRICT', 'Y');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_TVA_USE', 'Y');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_PJ_SUGGEST', 'Y');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_DATE_SUGGEST', 'Y');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_ALPHANUM', 'N');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_CHECK_PERIODE',
'N');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_UPDLAB', 'N');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_STOCK', 'N');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_ANC_FILTER', '6,7');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES
('MY_DEFAULT_ROUND_ERROR_CRED', '755');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES
('MY_DEFAULT_ROUND_ERROR_DEB', '655');
+INSERT INTO public.parameter (pr_id, pr_value) VALUES ('MY_REPORT', 'N');
+INSERT INTO public.parameter_extra (id, pe_code, pe_label, pe_value) VALUES
(1, 'RPM', 'RPM', NULL);
+INSERT INTO public.parameter_extra (id, pe_code, pe_label, pe_value) VALUES
(2, 'ONSS', 'Numéro ONSS', NULL);
+INSERT INTO public.parameter_extra (id, pe_code, pe_label, pe_value) VALUES
(3, 'EMAIL_COMPANY', 'Email Société', NULL);
+INSERT INTO public.parameter_extra (id, pe_code, pe_label, pe_value) VALUES
(4, 'WEB_COMPANY', 'Site Web', NULL);
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('H2', '#9fbcd6');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('MENU1',
'#000074');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('BODY',
'#ffffff');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('MENU2',
'#3d3d87');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('MENU1-SELECTED',
'#506cb8');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FONT-MENU1',
'#ffffff');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FONT-MENU2',
'#ffffff');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FONT-TABLE',
'#222bd0');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FONT-DEFAULT',
'#000074');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES
('FONT-TABLE-HEADER', '#0C106D');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FOLDER',
'#ffffff');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('FONT-FOLDER',
'#000074');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('TR-ODD',
'#DCE7F5');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('TR-EVEN',
'#ffffff');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES ('INNER-BOX',
'#DCE1EF');
+INSERT INTO public.parm_appearance (a_code, a_value) VALUES
('INNER-BOX-TITLE', '#023575');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('CUSTOMER',
'400', 'Poste comptable de base pour les clients');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES
('COMPTE_TVA', '451', 'TVA à payer');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('BANQUE',
'550', 'Poste comptable de base pour les banques');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES
('VIREMENT_INTERNE', '58', 'Poste Comptable pour les virements internes');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES
('COMPTE_COURANT', '56', 'Poste comptable pour le compte courant');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('CAISSE',
'57', 'Poste comptable pour la caisse');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('TVA_DNA',
'6740', 'Tva non déductible s');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES
('TVA_DED_IMPOT', '619000', 'Tva déductible par l''impôt');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('VENTE',
'70', 'Poste comptable de base pour les ventes');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('DEP_PRIV',
'4890', 'Depense a charge du gerant');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('SUPPLIER',
'440', 'Poste par défaut pour les fournisseurs');
+INSERT INTO public.parm_code (p_code, p_value, p_comment) VALUES ('DNA', '67',
'Dépense non déductible');
+
+
+
+INSERT INTO public.parm_money (pm_id, pm_code, pm_rate) VALUES (1, 'EUR',
1.0000);
+
+
+
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('1', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('101', 'PASINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('141', 'PASINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('42', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('43', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('44', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('45', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('46', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('47', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('48', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('492', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('493', 'PAS');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('2', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('2409', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('3', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('491', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('490', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6', 'CHA');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('7', 'PRO');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('4', 'ACT');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5501', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5511', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5521', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5531', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5541', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5551', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5561', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5571', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5581', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('5591', 'ACTINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6311', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6321', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6331', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6341', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6351', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6361', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6371', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('649', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6511', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('6701', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('608', 'CHAINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('709', 'PROINV');
+INSERT INTO public.parm_poste (p_value, p_type) VALUES ('40', 'PAS');
+
+
+
+INSERT INTO public.payment_method (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id,
mp_qcode, jrn_def_id) VALUES (2, 'Caisse', 1, NULL, NULL, 2);
+INSERT INTO public.payment_method (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id,
mp_qcode, jrn_def_id) VALUES (1, 'Paiement électronique', 1, NULL, NULL, 2);
+INSERT INTO public.payment_method (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id,
mp_qcode, jrn_def_id) VALUES (4, 'Caisse', 1, NULL, NULL, 3);
+INSERT INTO public.payment_method (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id,
mp_qcode, jrn_def_id) VALUES (3, 'Par gérant ou administrateur', 2, NULL, NULL,
3);
+
+
+
+INSERT INTO public.profile_menu_type (pm_type, pm_desc) VALUES ('P',
'Impression');
+INSERT INTO public.profile_menu_type (pm_type, pm_desc) VALUES ('S',
'Extension');
+INSERT INTO public.profile_menu_type (pm_type, pm_desc) VALUES ('E', 'Menu');
+INSERT INTO public.profile_menu_type (pm_type, pm_desc) VALUES ('M', 'Module');
+
+
+
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (2, 'ANC', NULL, 1, 500, 'M', 0,
NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (651, 'ANCHOP', 'ANCIMP', 1, 100,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (173, 'COMPTA', NULL, 1, 400,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (652, 'ANCGL', 'ANCIMP', 1, 200,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (653, 'ANCBS', 'ANCIMP', 1, 300,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (654, 'ANCBC2', 'ANCIMP', 1, 400,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (655, 'ANCTAB', 'ANCIMP', 1, 500,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (656, 'ANCBCC', 'ANCIMP', 1, 600,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (657, 'ANCGR', 'ANCIMP', 1, 700,
'E', 0, 78);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (658, 'CSV:AncGrandLivre', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (662, 'new_line', NULL, 1, 350,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (23, 'LET', 'COMPTA', 1, 80, 'E',
0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (75, 'PLANANC', 'ANC', 1, 10,
'E', 0, 2);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (76, 'ANCODS', 'ANC', 1, 20, 'E',
0, 2);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (77, 'ANCGROUP', 'ANC', 1, 30,
'E', 0, 2);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (78, 'ANCIMP', 'ANC', 1, 40, 'E',
0, 2);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (79, 'PREFERENCE', NULL, 1, 150,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (37, 'CUST', 'GESTION', 1, 10,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (38, 'SUPPL', 'GESTION', 1, 20,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (39, 'ADM', 'GESTION', 1, 30,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (40, 'STOCK', 'GESTION', 1, 50,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (41, 'FORECAST', 'GESTION', 1,
70, 'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (42, 'FOLLOW', 'GESTION', 1, 80,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (29, 'VERIFBIL', 'ADV', 1, 210,
'E', 0, 28);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (31, 'PREDOP', 'ADV', 1, 230,
'E', 0, 28);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (33, 'REPORT', 'ADV', 1, 250,
'E', 0, 28);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (43, 'HIST', 'COMPTA', 1, 10,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (28, 'ADV', 'COMPTA', 1, 200,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (688, 'PLANANC', 'ANC', 2, 10,
'E', 0, 727);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (690, 'ANCODS', 'ANC', 2, 20,
'E', 0, 727);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (53, 'ACCESS', NULL, 1, 250, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (785, 'STOCK_HISTO', 'STOCK', 1,
10, 'E', NULL, 30);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (820, 'STOCK_HISTO', 'STOCK', 1,
10, 'E', NULL, 40);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (786, 'STOCK_STATE', 'STOCK', 1,
20, 'E', NULL, 30);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (821, 'STOCK_STATE', 'STOCK', 1,
20, 'E', NULL, 40);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (789, 'STOCK_INVHISTO', 'STOCK',
1, 30, 'E', NULL, 30);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (822, 'STOCK_INVHISTO', 'STOCK',
1, 30, 'E', NULL, 40);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (795, 'STOCK_INV', 'STOCK', 1,
30, 'E', NULL, 30);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (823, 'STOCK_INV', 'STOCK', 1,
30, 'E', NULL, 40);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (787, 'STOCK_HISTO', 'STOCK', 2,
10, 'E', NULL, 702);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (832, 'STOCK_HISTO', 'STOCK', 2,
10, 'E', NULL, 706);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (788, 'STOCK_STATE', 'STOCK', 2,
20, 'E', NULL, 702);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (833, 'STOCK_STATE', 'STOCK', 2,
20, 'E', NULL, 706);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (790, 'STOCK_INVHISTO', 'STOCK',
2, 30, 'E', NULL, 702);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (834, 'STOCK_INVHISTO', 'STOCK',
2, 30, 'E', NULL, 706);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (796, 'STOCK_INV', 'STOCK', 2,
30, 'E', NULL, 702);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (835, 'STOCK_INV', 'STOCK', 2,
30, 'E', NULL, 706);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (123, 'CSV:histo', NULL, 1, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (20, 'LOGOUT', NULL, 1, 300, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (35, 'PRINT', 'GESTION', 1, 40,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (124, 'CSV:ledger', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (125, 'PDF:ledger', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (6, 'PRINT', 'COMPTA', 1, 60,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (126, 'CSV:postedetail', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (3, 'MENUACH', 'COMPTA', 1, 30,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (34, 'GESTION', NULL, 1, 450,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (18, 'MENUODS', 'COMPTA', 1, 50,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (88, 'ODS', 'MENUODS', 1, 10,
'E', 0, 18);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (4, 'VENMENU', 'COMPTA', 1, 20,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (90, 'VEN', 'VENMENU', 1, 10,
'E', 0, 4);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (19, 'FIN', 'MENUFIN', 1, 10,
'E', 0, 92);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (82, 'EXT', NULL, 1, 550, 'M', 0,
NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (95, 'FREC', 'MENUFIN', 1, 40,
'E', 0, 92);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (94, 'FSALDO', 'MENUFIN', 1, 30,
'E', 0, 92);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (45, 'CFG', NULL, 1, 200, 'M', 0,
NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (68, 'CCARDAT', 'MCARD', 1, 90,
'E', 0, 878);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (71, 'CFGSEC', 'CFG', 1, 60, 'E',
0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (54, 'COMPANY', 'CFG', 1, 1, 'E',
1, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (27, 'LETACC', 'LET', 1, 20, 'E',
0, 23);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (24, 'LETCARD', 'LET', 1, 10,
'E', 0, 23);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (92, 'MENUFIN', 'COMPTA', 1, 40,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (151, 'SEARCH', NULL, 1, 600,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (85, 'ACH', 'MENUACH', 1, 10,
'E', 0, 3);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (127, 'PDF:postedetail', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (128, 'CSV:fichedetail', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (129, 'PDF:fichedetail', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (130, 'CSV:fiche_balance', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (131, 'PDF:fiche_balance', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (132, 'CSV:report', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (133, 'PDF:report', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (134, 'CSV:fiche', NULL, 1, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (526, 'P0GRL', 'PRINT', 1, 200,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (136, 'CSV:glcompte', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (137, 'PDF:glcompte', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (138, 'PDF:sec', NULL, 1, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (139, 'CSV:AncList', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (140, 'CSV:AncBalSimple', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (141, 'PDF:AncBalSimple', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (142, 'CSV:AncBalDouble', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (143, 'PDF:AncBalDouble', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (144, 'CSV:balance', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (145, 'PDF:balance', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (146, 'CSV:AncTable', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (147, 'CSV:AncAccList', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (148, 'CSV:AncBalGroup', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (149, 'OTH:Bilan', NULL, 1, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (1, 'DASHBOARD', NULL, 1, 100,
'M', 1, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (172, 'CFGPRO', 'MOD', 1, NULL,
'E', 0, 167);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (171, 'CFGMENU', 'MOD', 1, NULL,
'E', 0, 167);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (86, 'ACHISTO', 'MENUACH', 1, 20,
'E', 0, 3);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (91, 'VEHISTO', 'VENMENU', 1, 20,
'E', 0, 4);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (781, 'BK', 'GESTION', 1, 35,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (783, 'CSV:ActionGestion', NULL,
1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (30, 'STOCK', 'COMPTA', 1, 90,
'E', 0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (791, 'CSV:StockHisto', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (792, 'CSV:StockResmList', NULL,
1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (779, 'CSV:reportinit', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (36, 'CARD', 'GESTION', 1, 60,
'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (5, 'CARD', 'COMPTA', 1, 70, 'E',
0, 173);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (93, 'FIHISTO', 'MENUFIN', 1, 20,
'E', 0, 92);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (89, 'ODHISTO', 'MENUODS', 1, 20,
'E', 0, 18);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (799, 'NAVI', NULL, 1, 90, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (801, 'BOOKMARK', NULL, 1, 85,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (804, 'CSV:Reconciliation', NULL,
1, 0, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (806, 'MANAGER', 'GESTION', 1,
25, 'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (808, 'CFGDEFMENU', 'MOD', 1, 30,
'E', 0, 167);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (809, 'AGENDA', 'NULL', 1, 410,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (811, 'PDF:AncReceipt', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (812, 'ANCKEY', 'ANC', 1, 15,
'E', 0, 2);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (818, 'CSV:balance_age', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (668, 'ANCHOP', 'ANCIMP', 2, 100,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (669, 'COMPTA', NULL, 2, 400,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (672, 'ANCGL', 'ANCIMP', 2, 200,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (674, 'ANCBS', 'ANCIMP', 2, 300,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (675, 'ANCBC2', 'ANCIMP', 2, 400,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (676, 'ANCTAB', 'ANCIMP', 2, 500,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (677, 'ANCBCC', 'ANCIMP', 2, 600,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (678, 'ANCGR', 'ANCIMP', 2, 700,
'E', 0, 692);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (679, 'CSV:AncGrandLivre', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (680, 'new_line', NULL, 2, 350,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (684, 'LET', 'COMPTA', 2, 80,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (717, 'CSV:ledger', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (718, 'PDF:ledger', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (719, 'PRINT', 'COMPTA', 2, 60,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (720, 'CSV:postedetail', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (721, 'MENUACH', 'COMPTA', 2, 30,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (723, 'GESTION', NULL, 2, 450,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (724, 'MENUODS', 'COMPTA', 2, 50,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (725, 'ODS', 'MENUODS', 2, 10,
'E', 0, 724);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (727, 'ANC', NULL, 2, 500, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (728, 'VENMENU', 'COMPTA', 2, 20,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (729, 'VEN', 'VENMENU', 2, 10,
'E', 0, 728);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (731, 'FIN', 'MENUFIN', 2, 10,
'E', 0, 742);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (735, 'EXT', NULL, 2, 550, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (736, 'FREC', 'MENUFIN', 2, 40,
'E', 0, 742);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (737, 'FSALDO', 'MENUFIN', 2, 30,
'E', 0, 742);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (738, 'LETACC', 'LET', 2, 20,
'E', 0, 684);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (691, 'ANCGROUP', 'ANC', 2, 30,
'E', 0, 727);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (692, 'ANCIMP', 'ANC', 2, 40,
'E', 0, 727);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (697, 'PREFERENCE', NULL, 2, 150,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (698, 'CUST', 'GESTION', 2, 10,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (699, 'SUPPL', 'GESTION', 2, 20,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (700, 'ADM', 'GESTION', 2, 30,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (702, 'STOCK', 'GESTION', 2, 50,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (703, 'FORECAST', 'GESTION', 2,
70, 'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (704, 'FOLLOW', 'GESTION', 2, 80,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (705, 'VERIFBIL', 'ADV', 2, 210,
'E', 0, 712);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (707, 'PREDOP', 'ADV', 2, 230,
'E', 0, 712);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (709, 'REPORT', 'ADV', 2, 250,
'E', 0, 712);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (711, 'HIST', 'COMPTA', 2, 10,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (712, 'ADV', 'COMPTA', 2, 200,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (713, 'ACCESS', NULL, 2, 250,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (714, 'CSV:histo', NULL, 2, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (715, 'LOGOUT', NULL, 2, 300,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (716, 'PRINT', 'GESTION', 2, 40,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (739, 'LETCARD', 'LET', 2, 10,
'E', 0, 684);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (742, 'MENUFIN', 'COMPTA', 2, 40,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (744, 'SEARCH', NULL, 2, 600,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (745, 'ACH', 'MENUACH', 2, 10,
'E', 0, 721);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (746, 'PDF:postedetail', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (747, 'CSV:fichedetail', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (748, 'PDF:fichedetail', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (749, 'CSV:fiche_balance', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (750, 'PDF:fiche_balance', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (751, 'CSV:report', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (752, 'PDF:report', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (722, 'ACHISTO', 'MENUACH', 2,
20, 'E', 0, 721);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (730, 'VEHISTO', 'VENMENU', 2,
20, 'E', 0, 728);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (753, 'CSV:fiche', NULL, 2, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (755, 'CSV:glcompte', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (756, 'PDF:glcompte', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (757, 'PDF:sec', NULL, 2, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (167, 'MOD', 'CFG', 1, 10, 'E',
0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (784, 'CFGSTOCK', 'CFG', 1, 40,
'E', 0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (758, 'CSV:AncList', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (759, 'CSV:AncBalSimple', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (760, 'PDF:AncBalSimple', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (761, 'CSV:AncBalDouble', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (762, 'PDF:AncBalDouble', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (763, 'CSV:balance', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (764, 'PDF:balance', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (765, 'CSV:AncTable', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (766, 'CSV:AncAccList', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (767, 'CSV:AncBalGroup', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (768, 'OTH:Bilan', NULL, 2, NULL,
'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (772, 'DASHBOARD', NULL, 2, 100,
'M', 1, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (782, 'BK', 'GESTION', 2, 35,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (706, 'STOCK', 'COMPTA', 2, 90,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (793, 'CSV:StockHisto', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (794, 'CSV:StockResmList', NULL,
2, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (780, 'CSV:reportinit', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (798, 'CFGDOCST', 'DIVPARM', 2,
9, 'E', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (708, 'OPCL', 'ADV', 2, 240, 'E',
0, 712);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (701, 'CARD', 'GESTION', 2, 60,
'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (710, 'CARD', 'COMPTA', 2, 70,
'E', 0, 669);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (743, 'FIHISTO', 'MENUFIN', 2,
20, 'E', 0, 742);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (726, 'ODHISTO', 'MENUODS', 2,
20, 'E', 0, 724);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (800, 'NAVI', NULL, 2, 90, 'M',
0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (802, 'BOOKMARK', NULL, 2, 85,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (805, 'CSV:Reconciliation', NULL,
2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (807, 'MANAGER', 'GESTION', 2,
25, 'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (810, 'AGENDA', 'NULL', 2, 410,
'M', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (813, 'ANCKEY', 'ANC', 2, 15,
'E', 0, 727);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (819, 'CSV:balance_age', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (844, 'CONTACT', 'GESTION', 1,
22, 'E', 0, 34);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (845, 'CONTACT', 'GESTION', 2,
22, 'E', 0, 723);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (846, 'RAW:receipt', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (847, 'RAW:receipt', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (848, 'RAW:document', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (849, 'RAW:document', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (850, 'RAW:document_template',
NULL, 1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (851, 'RAW:document_template',
NULL, 2, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (853, 'CSV:Analytic_Axis', NULL,
2, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (854, 'CSV:Analytic_Axis', NULL,
1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (859, 'CSV:printtva', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (860, 'CSV:printtva', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (861, 'PDF:printtva', NULL, 1,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (862, 'PDF:printtva', NULL, 2,
NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (863, 'PDF:operation_detail',
NULL, 1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (864, 'PDF:operation_detail',
NULL, 2, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (865, 'PDF:operation_detail',
NULL, -1, NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (866,
'CSV:FollowUpContactOption', NULL, 1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (867,
'CSV:FollowUpContactOption', NULL, 2, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (868,
'CSV:FollowUpContactOption', NULL, -1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (871,
'CSV:FollowUpContactOption', NULL, 1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (872,
'CSV:FollowUpContactOption', NULL, 2, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (873,
'CSV:FollowUpContactOption', NULL, -1, NULL, 'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (874, 'PCUR01', 'PRINT', 2, 260,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (875, 'PCUR01', 'PRINT', 1, 260,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (876, 'PCUR01', 'PRINT', 1, 260,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (877, 'PCUR01', 'PRINT', 2, 260,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (869, 'CFGOPT1', 'MCARD', 1, 85,
'E', 0, 878);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (870, 'CFGOPT1', 'MCARD', 1, 85,
'E', 0, 878);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (73, 'CFGDOC', 'MDOC', 1, 80,
'E', 0, 879);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (797, 'CFGDOCST', 'MDOC', 1, 9,
'E', 0, 879);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (67, 'CFGACTION', 'MDOC', 1, 80,
'E', 0, 879);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (55, 'PERIODE', 'MACC', 1, 20,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (69, 'CFGPCMN', 'MACC', 1, 40,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (72, 'PREDOP', 'MACC', 1, 70,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (74, 'CFGLED', 'MACC', 1, 90,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (852, 'CFGCURRENCY', 'MACC', 1,
50, 'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (59, 'CFGPAY', 'MACC', 1, 40,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (61, 'CFGACC', 'MACC', 1, 60,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (60, 'CFGTVA', 'MACC', 1, 50,
'E', 0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (881, 'PDF:AncAccList', NULL, 1,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (882, 'PDF:AncAccList', NULL, 2,
NULL, 'P', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (65, 'CMCARD', 'MCARD', 1, 70,
'E', 0, 878);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (525, 'CCARD', 'MCARD', 1, 400,
'E', 0, 878);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (883, 'OTAX', 'MACC', 1, 55, 'E',
0, 880);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (803, 'CFGTAG', 'CFG', 1, 390,
'E', 0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (814, 'CFGPLUGIN', 'CFG', 1, 15,
'E', 0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (815, 'CFGPLUGIN', 'CFG', 2, 15,
'E', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (878, 'MCARD', 'CFG', 1, 20, 'E',
NULL, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (879, 'MDOC', 'CFG', 1, 30, 'E',
NULL, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (880, 'MACC', 'CFG', 1, 50, 'E',
NULL, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (770, 'CCARD', 'CFG', 2, 400,
'E', 0, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (884, 'NCOL', 'CFG', 1, 5, 'E',
0, 45);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (32, 'OPCL', 'ADV', 1, 240, 'E',
0, 28);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (885, 'PDF:card', NULL, 1, NULL,
'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (886, 'PDF:card', NULL, 2, NULL,
'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (887, 'PDF:card', NULL, -1, NULL,
'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (683, 'P0GRL', 'PRINT', 2, 200,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (824, 'P0GRL', 'PRINT', 1, 200,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (837, 'P0GRL', 'PRINT', 2, 200,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (523, 'P0BAL', 'PRINT', 1, 500,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (685, 'P0BAL', 'PRINT', 2, 500,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (825, 'P0BAL', 'PRINT', 1, 500,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (838, 'P0BAL', 'PRINT', 2, 500,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (530, 'P0RAP', 'PRINT', 1, 1000,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (695, 'P0RAP', 'PRINT', 2, 1000,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (828, 'P0RAP', 'PRINT', 1, 1000,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (840, 'P0RAP', 'PRINT', 2, 1000,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (524, 'P0BIL', 'PRINT', 1, 900,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (696, 'P0BIL', 'PRINT', 2, 900,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (829, 'P0BIL', 'PRINT', 1, 900,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (841, 'P0BIL', 'PRINT', 2, 900,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (527, 'P0JRN', 'PRINT', 1, 100,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (694, 'P0JRN', 'PRINT', 2, 100,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (827, 'P0JRN', 'PRINT', 1, 100,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (839, 'P0JRN', 'PRINT', 2, 100,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (855, 'P0TVA', 'PRINT', 1, 250,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (856, 'P0TVA', 'PRINT', 2, 250,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (857, 'P0TVA', 'PRINT', 1, 250,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (858, 'P0TVA', 'PRINT', 2, 250,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (528, 'P0PST', 'PRINT', 1, 300,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (830, 'P0PST', 'PRINT', 1, 300,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (769, 'P0PST', 'PRINT', 2, 300,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (842, 'P0PST', 'PRINT', 2, 300,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (529, 'P0RPO', 'PRINT', 1, 850,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (686, 'P0RPO', 'PRINT', 2, 850,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (826, 'P0RPO', 'PRINT', 1, 850,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (836, 'P0RPO', 'PRINT', 2, 850,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (816, 'P0BLG', 'PRINT', 1, 550,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (831, 'P0BLG', 'PRINT', 1, 550,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (817, 'P0BLG', 'PRINT', 2, 550,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (843, 'P0BLG', 'PRINT', 2, 550,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (888, 'P1TVA', 'PRINT', 2, 250,
'E', 0, 719);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (889, 'P1TVA', 'PRINT', 1, 250,
'E', 0, 35);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (890, 'P1TVA', 'PRINT', 1, 250,
'E', 0, 6);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (891, 'P1TVA', 'PRINT', 2, 250,
'E', 0, 716);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (892, 'CSV:p1tva', NULL, 1, NULL,
'P', NULL, NULL);
+INSERT INTO public.profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (893, 'CSV:p1tva', NULL, 2, NULL,
'P', NULL, NULL);
+
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (1, 'AGENDA', 10, 1, '1');
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (2, 'AGENDA', 10, 2, '1');
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (3, 'AGENDA', 10, -1, '1');
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (4, 'LOGOUT', 20, 1, '1');
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (5, 'LOGOUT', 20, 2, '1');
+INSERT INTO public.profile_mobile (pmo_id, me_code, pmo_order, p_id,
pmo_default) VALUES (6, 'LOGOUT', 20, -1, '1');
+INSERT INTO public.stock_repository (r_id, r_name, r_adress, r_country,
r_city, r_phone) VALUES (1, 'Dépôt par défaut', NULL, NULL, NULL, NULL);
+INSERT INTO public.profile_sec_repository (ur_id, p_id, r_id, ur_right) VALUES
(1, 1, 1, 'W');
+INSERT INTO public.profile_sec_repository (ur_id, p_id, r_id, ur_right) VALUES
(2, 2, 1, 'W');
-SELECT pg_catalog.setval('key_distribution_activity_ka_id_seq', 1, false);
+INSERT INTO public.profile_user (user_name, pu_id, p_id) VALUES ('phpcompta',
1, 1);
-SELECT pg_catalog.setval('key_distribution_detail_ke_id_seq', 1, false);
-SELECT pg_catalog.setval('key_distribution_kd_id_seq', 1, false);
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (4, '0%', 0.0000, 'Aucune tva n''est applicable', '4114,4514', 0, 'O',
'O', '0A');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (6, 'EXPORT', 0.0000, 'Tva pour les exportations', '41141,45144', 0,
'O', 'O', '0B');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (5, 'INTRA', 0.0000, 'Tva pour les livraisons / acquisition intra
communautaires', '41142,45142', 0, 'O', 'O', '0C');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (7, 'COC', 0.0000, 'Opérations avec des cocontractants', '41144,45144',
0, 'O', 'O', '0D');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (8, 'ART44', 0.0000, 'Opérations pour les opérations avec des assujettis
à l\''art 44 Code TVA', '41143,45143', 0, 'O', 'O', '0E');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (3, '6%', 0.0600, 'Tva applicable aux journaux et livres', '4113,4513',
0, 'O', 'O', '60A');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (2, '12%', 0.1200, 'Tva ', '4112,4512', 0, 'O', 'O', '120A');
+INSERT INTO public.tva_rate (tva_id, tva_label, tva_rate, tva_comment,
tva_poste, tva_both_side, tva_payment_sale, tva_payment_purchase, tva_code)
VALUES (1, '21%', 0.2100, 'Tva applicable à tout ce qui bien et service
divers', '4111,4511', 0, 'O', 'O', '210A');
-SELECT pg_catalog.setval('key_distribution_ledger_kl_id_seq', 1, false);
-SELECT pg_catalog.setval('letter_cred_lc_id_seq', 1, false);
-SELECT pg_catalog.setval('letter_deb_ld_id_seq', 1, false);
-SELECT pg_catalog.setval('link_action_type_l_id_seq', 1, false);
-INSERT INTO menu_default (md_id, md_code, me_code) VALUES (1, 'code_invoice',
'COMPTA/VENMENU/VEN');
-INSERT INTO menu_default (md_id, md_code, me_code) VALUES (2, 'code_follow',
'GESTION/FOLLOW');
-SELECT pg_catalog.setval('menu_default_md_id_seq', 2, true);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ACH',
'Achat', 'compta_ach.inc.php', NULL, 'Nouvel achat ou dépense', NULL, NULL,
'ME', 'Vous permet d''encoder des achats, dépenses, des notes de frais ou des
notes de crédits, vous pouvez spécifier un bénéficiaire ou un autre moyen de
paiement');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCHOP',
'Historique', 'anc_history.inc.php', NULL, 'Historique des imputations
analytiques', NULL, NULL, 'ME', 'Historique des imputations analytiques');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCBS',
'Balance simple', 'anc_balance_simple.inc.php', NULL, 'Balance simple des
imputations analytiques', NULL, NULL, 'ME', 'Balance simple des imputations
analytiques');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCTAB',
'Tableau', 'anc_acc_table.inc.php', NULL, 'Tableau lié à la comptabilité',
NULL, NULL, 'ME', 'Tableau lié à la comptabilité');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCBCC',
'Balance Analytique/comptabilité', 'anc_acc_balance.inc.php', NULL, 'Lien entre
comptabilité et Comptabilité analytique', NULL, NULL, 'ME', 'Lien entre
comptabilité et Comptabilité analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCGR',
'Groupe', 'anc_group_balance.inc.php', NULL, 'Balance par groupe', NULL, NULL,
'ME', 'Balance par groupe');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGTVA',
'TVA', 'tva.inc.php', NULL, 'Config. de la tva', NULL, NULL, 'ME', 'Permet
d''ajouter des taux de TVA ou de les modifier ainsi que les postes comptables
de ces TVA, ces TVA sont utilisables dans les menus de vente et d''achat');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('VEN',
'Vente', 'compta_ven.inc.php', NULL, 'Nouvelle vente ou recette', NULL, NULL,
'ME', 'Encodage de tous vos revenus ou vente');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGMENU', 'Config. Menu', 'menu.inc.php', NULL, 'Configuration des menus et
plugins', NULL, NULL, 'ME', 'Ajout de menu ou de plugins');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('SUPPL',
'Fournisseur', 'supplier.inc.php', NULL, 'Suivi fournisseur', NULL, NULL, 'ME',
'Suivi des fournisseurs : devis, lettres, email....');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCODS',
'Opérations diverses', 'anc_od.inc.php', NULL, 'OD analytique', NULL, NULL,
'ME', 'Opérations diverses en Analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('REPORT',
'Création de rapport', 'report.inc.php', NULL, 'Création de rapport', NULL,
NULL, 'ME', 'Création de rapport sur mesure, comme les ratios, vous permet de
créer des graphiques de vos données (vente, achat...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('new_line', 'saut de ligne', NULL, NULL, 'Saut de ligne', NULL, NULL, 'SP',
NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CUST',
'Client', 'customer.inc.php', NULL, 'Suivi client', NULL, NULL, 'ME', 'Suivi
client : devis, réunion, courrier, commande...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('STOCK_HISTO', 'Historique stock', 'stock_histo.inc.php', NULL, 'Historique
des mouvement de stock', NULL, NULL, 'ME', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:histo', 'Export Historique', 'export_histo_csv.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:ledger', 'Export Journaux', 'export_ledger_csv.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:ledger', 'Export Journaux', 'export_ledger_pdf.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:postedetail', 'Export Poste détail', 'export_poste_detail_csv.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:postedetail', 'Export Poste détail', 'export_poste_detail_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:fichedetail', 'Export Fiche détail', 'export_fiche_detail_csv.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:fichedetail', 'Export Fiche détail', 'export_fiche_detail_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:fiche_balance', 'Export Fiche balance', 'export_fiche_balance_csv.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:fiche_balance', 'Export Fiche balance', 'export_fiche_balance_pdf.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:report', 'Export report', 'export_form_csv.php', NULL, NULL, NULL, NULL,
'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:report', 'Export report', 'export_form_pdf.php', NULL, NULL, NULL, NULL,
'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:fiche', 'Export Fiche', 'export_fiche_csv.php', NULL, NULL, NULL, NULL,
'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:fiche', 'Export Fiche', 'export_fiche_pdf.php', NULL, NULL, NULL, NULL,
'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:glcompte', 'Export Grand Livre', 'export_gl_csv.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:glcompte', 'Export Grand Livre', 'export_gl_pdf.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:sec', 'Export Sécurité', 'export_security_pdf.php', NULL, NULL, NULL,
NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncList', 'Export Comptabilité analytique', 'export_anc_list_csv.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncBalSimple', 'Export Comptabilité analytique balance simple',
'export_anc_balance_simple_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:AncBalSimple', 'Export Comptabilité analytique',
'export_anc_balance_simple_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncBalDouble', 'Export Comptabilité analytique balance double',
'export_anc_balance_double_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:AncBalDouble', 'Export Comptabilité analytique balance double',
'export_anc_balance_double_pdf.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:balance', 'Export Balance comptable', 'export_balance_csv.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:balance', 'Export Balance comptable', 'export_balance_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncTable', 'Export Tableau Analytique', 'export_anc_table_csv.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncAccList', 'Export Historique Compt. Analytique',
'export_anc_acc_list_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncBalGroup', 'Export Balance groupe analytique',
'export_anc_balance_group_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('OTH:Bilan', 'Export Bilan', 'export_bilan_oth.php', NULL, NULL, NULL, NULL,
'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:AncGrandLivre', 'Impression Grand-Livre',
'export_anc_grandlivre_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:reportinit', 'Export définition d''un raport',
'export_reportinit_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:ActionGestion', 'Export Action Gestion', 'export_follow_up_csv.php',
NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:StockHisto', 'Export Historique mouvement stock',
'export_stock_histo_csv.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:StockResmList', 'Export Résumé list stock',
'export_stock_resume_list.php', NULL, NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('EXT',
'Extension', NULL, NULL, 'Extensions (plugins)', NULL, NULL, 'ME', 'Menu
regroupant les plugins');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PLANANC', 'Plan Compt. analytique', 'anc_pa.inc.php', NULL, 'Plan
analytique', NULL, NULL, 'ME', 'Axe analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('ANCGROUP', 'Groupe', 'anc_group.inc.php', NULL, 'Groupe analytique', NULL,
NULL, 'ME', 'Regroupement de compte analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CONTACT', 'Contact', 'contact.inc.php', NULL, 'Liste des contacts', NULL,
NULL, 'ME', 'Liste de tous vos contacts');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('PREDOP',
'Ecriture prédefinie', 'preod.inc.php', NULL, 'Gestion des opérations
prédéfinifies', NULL, NULL, 'ME', 'Les opérations prédéfinies sont des
opérations que vous faites régulièrement (loyer, abonnement,...) ');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ODS',
'Opérations Diverses', 'compta_ods.inc.php', NULL, 'Nouvelle opérations
diverses', NULL, NULL, 'ME', 'Opération diverses tels que les amortissements,
les augmentations de capital, les salaires, ...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('FIN',
'Nouvel extrait', 'compta_fin.inc.php', NULL, 'Nouvel extrait bancaire', NULL,
NULL, 'ME', 'Encodage d''un extrait bancaire (=relevé bancaire)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('JSSEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'search_reconcile()',
'ME', 'Historique de toutes vos opérations un menu de recherche dans une
nouvelle fenêtre, vous permettra de retrouver rapidement l''opération qui vous
intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('PARAM',
'Paramètre', NULL, NULL, 'Module paramètre', NULL, NULL, 'ME', 'Module
paramètres');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGCATDOC', 'Catégorie de documents', 'cat_document.inc.php', NULL, 'Config.
catégorie de documents', NULL, NULL, 'ME', 'Vous permet d''ajouter de nouveaux
type de documents (bordereau de livraison, devis..)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('LETCARD', 'Lettrage par Fiche', 'lettering.card.inc.php', NULL, 'Lettrage par
fiche', NULL, NULL, 'ME', 'Lettrage par fiche');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('ACHISTO', 'Historique achat', 'history_operation.inc.php', NULL, 'Historique
achat', 'ledger_type=ACH', NULL, 'ME', 'Historique de toutes vos opérations
dans les journaux d''achats un menu de recherche, vous permettra de retrouver
rapidement l''opération qui vous intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('ODHISTO', 'Historique opérations diverses', 'history_operation.inc.php',
NULL, 'Historique opérations diverses', 'ledger_type=ODS', NULL, 'ME',
'Historique de toutes vos opérations dans les journaux d''opérations diverses
un menu de recherche, vous permettra de retrouver rapidement l''opération qui
vous intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTPOSTE', 'Poste', 'impress_poste.inc.php', NULL, 'Impression du détail
d''un poste comptable', NULL, NULL, 'ME', 'Impression du détail d''un poste
comptable');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTREPORT', 'Rapport', 'impress_rapport.inc.php', NULL, 'Impression de
rapport', NULL, NULL, 'ME', 'Impression de rapport personnalisé, il est aussi
possible d''exporter en CSV afin de faire des graphiques');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTGL', 'Grand Livre', 'impress_gl_comptes.inc.php', NULL, 'Impression du
grand livre', NULL, NULL, 'ME', 'Impression du grand livre');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTBAL', 'Balance', 'balance.inc.php', NULL, 'Impression des balances
comptables', NULL, NULL, 'ME', 'Impression des balances comptables');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('MENUACH', 'Achat', NULL, NULL, 'Menu achat', NULL, NULL, 'ME', 'Regroupement
pour les menus d''achats(nouvelle opération, historique...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('MOD',
'Menu et profil', NULL, NULL, 'Menu ', NULL, NULL, 'ME', 'Regroupement pour les
menus et les profils');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('PRINT',
'Impression', NULL, NULL, 'Menu impression', NULL, NULL, 'ME', 'Menu
impression');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('BK',
'Banque', 'bank.inc.php', NULL, 'Information Banque', NULL, NULL, 'ME',
'Regroupement des menus des journaux de trésorerie');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCGL',
'Grand''Livre', 'anc_great_ledger.inc.php', NULL, 'Grand livre analytique',
NULL, NULL, 'ME', 'Grand livre pour la comptabilité analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('GESTION', 'Gestion', NULL, NULL, 'Module gestion', NULL, NULL, 'ME', 'Module
gestion');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('LET',
'Lettrage', NULL, NULL, 'Lettrage', NULL, NULL, 'ME', 'Menu Lettrage');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ACCESS',
'Accueil', NULL, 'user_login.php', 'Accueil', NULL, NULL, 'ME', 'Choix de votre
dossier');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('COMPTA',
'Comptabilité', NULL, NULL, 'Module comptabilité', NULL, NULL, 'ME', 'Module
comptabilité');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('DIVPARM', 'Divers', NULL, NULL, 'Paramètres divers', NULL, NULL, 'ME', 'Menu
de différents paramètres');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGPRO',
'Profil', 'profile.inc.php', NULL, 'Configuration profil', NULL, NULL, 'ME',
'Configuration des profils des utilisateurs, permet de fixer les journaux,
profils dans les documents et stock que ce profil peut utiliser. Cela limite
les utilisateurs puisque ceux-ci ont un profil');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGACC',
'Poste', 'poste.inc.php', NULL, 'Config. poste comptable de base', NULL, NULL,
'ME', 'Config. poste comptable de base');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CARD',
'Fiche', 'fiche.inc.php', NULL, 'Liste,Balance,Historique par fiche', NULL,
NULL, 'ME', 'Permet d''avoir la balance de toutes vos fiches, les résumés
exportables en CSV, les historiques avec ou sans lettrages');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PREFERENCE', 'Préférence', NULL, NULL, 'Préférence', NULL,
'set_preference(<DOSSIER>)', 'ME', 'Préférence de l''utilisateur, apparence de
l''application pour l''utilisateur, période par défaut et mot de passe');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGTAG',
'Configuration étiquette', 'cfgtags.inc.php', NULL, 'Configuration des tags',
NULL, NULL, 'ME', 'Configuration des tags ou dossiers, on l''appele tag ou
dossier suivant la façon dont vous utilisez
-cette fonctionnalité. Vous pouvez en ajouter, en supprimer ou les modifier');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCBC2',
'Balance croisée double', 'anc_balance_double.inc.php', NULL, 'Balance double
croisées des imputations analytiques', NULL, NULL, 'ME', 'Balance double
croisées des imputations analytiques');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('COMPANY', 'Sociétés', 'company.inc.php', NULL, 'Parametre societe', NULL,
NULL, 'ME', 'Information sur votre société : nom, adresse... utilisé lors de la
génération de documents');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PERIODE', 'Période', 'periode.inc.php', NULL, 'Gestion des périodes', NULL,
NULL, 'ME', 'Gestion des périodes : clôture, ajout de période, afin de créer
des périodes vous pouvez aussi utiliser le plugin outil comptable');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('VERIFBIL', 'Vérification ', 'verif_bilan.inc.php', NULL, 'Vérification de la
comptabilité', NULL, NULL, 'ME', 'Vérifie que votre comptabilité ne contient
pas d''erreur de base, tels que l''équilibre entre le passif et l''actif,
l''utilisation des postes comptables...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('OPEN',
'Ecriture Ouverture', 'opening.inc.php', NULL, 'Ecriture d''ouverture', NULL,
NULL, 'ME', 'Ecriture d''ouverture ou écriture à nouveau, reporte les soldes
des comptes de l''année passé du poste comptable 0xxx à 5xxxx sur l''année
courante');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGDOC',
'Document', 'document_modele.inc.php', NULL, 'Config. modèle de document',
NULL, NULL, 'ME', 'Chargement de modèles de documents qui seront générés par
NOALYSS, les formats utilisables sont libreoffice, html, text et rtf');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGLED',
'journaux', 'cfgledger.inc.php', NULL, 'Configuration des journaux', NULL,
NULL, 'ME', 'Création et modification des journaux, préfixe des pièces
justificatives, numérotation, catégories de fiches accessibles à ce journal');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGSEC',
'Sécurité', 'param_sec.inc.php', NULL, 'configuration de la sécurité', NULL,
NULL, 'ME', 'Configuration de la sécurité, vous permet de donner un profil à
vos utilisateurs, cela leur permettra d''utiliser ce que vous souhaitez qu''ils
puissent utiliser');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGATCARD', 'Attribut de fiche', 'card_attr.inc.php', NULL, 'Gestion des
attributs de fiches ', NULL, NULL, 'ME', 'Permet d''ajouter de nouveaux
attributs que vous pourrez par la suite ajouter à des catégories de fiches');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('STOCK_STATE', 'Etat des stock', 'stock_state.inc.php', NULL, 'Etat des
stock', NULL, NULL, 'ME', 'Etat des stock de l''exercice indiqué');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('STOCK_INV', 'Modification Stocks', 'stock_inv.inc.php', NULL, 'Modification
des stocks (inventaire)', NULL, NULL, 'ME', 'Modification des stocks, menu
utilisé pour l''inventaire');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('STOCK_INVHISTO', 'Histo. Changement', 'stock_inv_histo.inc.php', NULL, 'Liste
des changements manuels des stocks', NULL, NULL, 'ME', 'Liste des changements
manuels des stocks, inventaire, transfert de marchandises entre dépôts...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('NAVI',
'Navigateur', NULL, NULL, 'Menu simplifié pour retrouver rapidement un menu',
NULL, 'ask_navigator(<DOSSIER>)', 'ME', 'Le navigateur vous présente une liste
de menu auquel vous avez accès et vous permet d''accèder plus rapidement au
menu que vous souhaitez');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('SEARCH',
'Recherche', NULL, NULL, 'Recherche', NULL, 'popup_recherche(<DOSSIER>)', 'ME',
'Historique de toutes vos opérations dans tous les journaux auquels vous avez
accès, vous permettra de retrouver rapidement l''opération qui vous intéresse
sur base de la date, du poste comptable, des montants...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('HIST',
'Historique', 'history_operation.inc.php', NULL, 'Historique',
'ledger_type=ALL', NULL, 'ME', 'Historique de toutes vos opérations un menu de
recherche, vous permettra de retrouver rapidement l''opération qui vous
intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('FREC',
'Rapprochement', 'compta_fin_rec.inc.php', NULL, 'Rapprochement bancaire',
NULL, NULL, 'ME', 'Permet de faire correspondre vos extraits bancaires avec les
opérations de vente ou d''achat, le lettrage se fait automatiquement');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('FSALDO',
'Soldes', 'compta_fin_saldo.inc.php', NULL, 'Solde des comptes en banques,
caisse...', NULL, NULL, 'ME', 'Solde des journaux de trésorerie cela concerne
les comptes en banques, caisse , les chèques... ');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('LOGOUT',
'Sortie ⎆', NULL, 'logout.php', 'Sortie', NULL, NULL, 'ME', 'Déconnexion
');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('LETACC',
'Lettrage par Poste', 'lettering.account.inc.php', NULL, 'lettrage par poste
comptable', NULL, NULL, 'ME', 'lettrage par poste comptable');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CARDBAL', 'Balance', 'balance_card.inc.php', NULL, 'Balance par catégorie de
fiche', NULL, NULL, 'ME', 'Balance par catégorie de fiche ou pour toutes les
fiches ayant un poste comptable');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGPCMN', 'Plan Comptable', 'param_pcmn.inc.php', NULL, 'Config. du plan
comptable', NULL, NULL, 'ME', 'Modification de votre plan comptable, parfois il
est plus rapide d''utiliser le plugin "Poste Comptable"');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('VEHISTO', 'Historique vente', 'history_operation.inc.php', NULL, 'Historique
des ventes', 'ledger_type=VEN', NULL, 'ME', 'Historique de toutes vos
opérations dans les journaux de vente un menu de recherche, vous permettra de
retrouver rapidement l''opération qui vous intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('FIHISTO', 'Historique financier', 'history_operation.inc.php', NULL,
'Historique financier', 'ledger_type=FIN', NULL, 'ME', 'Historique de toutes
vos opérations dans les journaux de trésorerie un menu de recherche, vous
permettra de retrouver rapidement l''opération qui vous intéresse');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTREC', 'Rapprochement', 'impress_rec.inc.php', NULL, 'Impression des
rapprochements', NULL, NULL, 'ME', 'Impression des rapprochements : opérations
non rapprochées ou avec des montants différents');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTBILAN', 'Bilan', 'impress_bilan.inc.php', NULL, 'Impression de bilan',
NULL, NULL, 'ME', 'Impression de bilan, ce module est basique, il est plus
intéressant d''utiliser le plugin "rapport avancés"');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGSTOCK', 'Configuration des dépôts', 'stock_cfg.inc.php', NULL,
'Configuration dépôts', NULL, NULL, 'ME', 'Configuration des entrepots de
dépôts');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('STOCK',
'Stock', NULL, NULL, 'Stock', NULL, NULL, 'ME', 'Permet d''ajouter de nouvelles
catégorie de fiche, d''ajouter des attributs à ces catégories (numéro de
téléphone, gsm, email...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGCARDCAT', 'Catégorie de fiche', 'fiche_def.inc.php', NULL, 'Gestion
catégorie de fiche', NULL, NULL, 'ME', 'Permet de changer le poste comptable de
base des catégories de fiches');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGCARD', 'Fiche', 'cfgfiche.inc.php', NULL, 'Configuration de catégorie de
fiches', NULL, NULL, 'ME', 'Permet d''ajouter de nouvelles catégorie de fiche,
d''ajouter des attributs à ces catégories (numéro de téléphone, gsm,
email...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGDOCST', 'Etat des documents', 'doc_state.inc.php', NULL, 'Etat des
documents', NULL, NULL, 'ME', 'Permet d''ajouter des état pour les documents
utilisés dans le suivi (à faire, à suivre...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('MENUODS', 'Opérations diverses', NULL, NULL, 'Menu opérations diverses',
NULL, NULL, 'ME', 'Regroupement pour les menus d''opérations diverses (nouvelle
opération, historique...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PRINTJRN', 'Impression Journaux', 'impress_jrn.inc.php', NULL, 'Impression
des journaux', NULL, NULL, 'ME', 'Impression des journaux avec les détails pour
les parties privés, la TVA et ce qui est non déductibles en ce qui concerne les
journaux de vente et d''achat');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('VENMENU', 'Vente / Recette', NULL, NULL, 'Menu ventes et recettes', NULL,
NULL, 'ME', 'Regroupement des menus ventes et recettes');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCIMP',
'Impression', NULL, NULL, 'Impression compta. analytique', NULL, NULL, 'ME',
'Impression compta. analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANC',
'Compta Analytique', NULL, NULL, 'Module comptabilité analytique', NULL, NULL,
'ME', 'Module comptabilité analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('DASHBOARD', 'Tableau de bord', 'dashboard.inc.php', NULL, 'Tableau de bord',
NULL, NULL, 'ME', 'Tableau de suivi, vous permet de voir en un coup d''oeil vos
dernières opérations, un petit calendrier, une liste de chose à faire...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ADV',
'Avancé', NULL, NULL, 'Menu avancé', NULL, NULL, 'ME', 'Menu regroupant la
création de rapport, la vérification de la comptabilité...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('MENUFIN', 'Trésorerie', NULL, NULL, 'Menu Financier', NULL, NULL, 'ME',
'Regroupement pour les menus de trésorerie (nouvelle opération,
historique...)');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('FOLLOW',
'Liste Suivi', 'action.inc.php', NULL, 'Document de suivi sous forme de liste',
NULL, NULL, 'ME', 'Liste de vos suivis, en fait de tous les documents, réunions
... dont vous avez besoin afin de suivre vos clients, fournisseurs ou
administrations. Il permet la génération de documents comme les devis, les
bordereau de livraison...');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('CFGPAY',
'Moyen de paiement', 'payment_middle.inc.php', NULL, 'Config. des méthodes de
paiement', NULL, NULL, 'ME', 'Configuration des moyens de paiements que vous
voulez utiliser dans les journaux de type VEN ou ACH, les moyens de paiement
permettent de générer l''opération de trésorerie en même temps que l''achat, la
note de frais ou la vente');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ADM',
'Administration', 'adm.inc.php', NULL, 'Suivi administration, banque', NULL,
NULL, 'ME', 'Suivi des administrations : courrrier, déclarations.');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('FORECAST', 'Prévision', 'forecast.inc.php', NULL, 'Prévision', NULL, NULL,
'ME', 'Prévision de vos achats, revenus, permet de suivre l''évolution de votre
société. Vos prévisions sont des formules sur les postes comptables et vous
permettent aussi vos marges brutes.');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:Reconciliation', 'Export opérations rapprochées', 'export_rec_csv.php',
NULL, 'Export opérations rapprochées en CSV', NULL, NULL, 'PR', '');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('MANAGER', 'Administrateur', 'manager.inc.php', NULL, 'Suivi des gérants,
administrateurs et salariés', NULL, NULL, 'ME', 'Suivi de vos salariés,
managers ainsi que des administrateurs, pour les documents et les opérations
comptables');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGDEFMENU', 'Menu par défaut', 'default_menu.inc.php', NULL, 'Configuration
des menus par défaut', NULL, NULL, 'ME', 'Configuration des menus par défaut,
ces menus sont appelés par des actions dans d''autres menus');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('AGENDA',
'Agenda', 'calendar.inc.php', NULL, 'Agenda', NULL, NULL, 'ME', 'Agenda,
présentation du suivi sous forme d''agenda ');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('PDF:AncReceipt', 'Export pièce PDF', 'export_anc_receipt_pdf.php', NULL,
NULL, NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('ANCKEY',
'Clef de répartition', 'anc_key.inc.php', NULL, NULL, NULL, NULL, 'ME', 'Permet
de gèrer les clefs de répartition en comptabilité analytique');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CFGPLUGIN', 'Configuration extension', 'cfgplugin.inc.php', NULL, NULL, NULL,
NULL, 'ME', 'Permet d''installer et d''activer facilement des extensions');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('BOOKMARK', 'Favori ★ ', NULL, NULL, 'Raccourci vers vos menus préférés',
NULL, 'show_bookmark(<DOSSIER>)', 'ME', 'Ce menu vous présente un menu rapide
de vos menus préférés');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES ('BALAGE',
'Balance agée', 'balance_age.inc.php', NULL, 'Balance agée', NULL, NULL, 'ME',
'Balance agée pour les clients et fournisseurs');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('CSV:balance_age', 'Export Balance agée', 'export_balance_age_csv.php', NULL,
'Balance agée', NULL, NULL, 'PR', 'Balance agée pour les clients et
fournisseurs');
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('RAW:receipt', 'Exporte la pièce', 'export_receipt.php', NULL, 'export la
pièce justificative d''une opération', NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('RAW:document', 'Export le document', 'export_document.php', NULL, 'exporte le
document d''un événement', NULL, NULL, 'PR', NULL);
-INSERT INTO menu_ref (me_code, me_menu, me_file, me_url, me_description,
me_parameter, me_javascript, me_type, me_description_etendue) VALUES
('RAW:document_template', 'Exporte le modèle de document',
'export_document_template.php', NULL, 'export le modèle de document utilisé
dans le suivi', NULL, NULL, 'PR', NULL);
-
-
-
-INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id, mp_qcode,
jrn_def_id) VALUES (2, 'Caisse', 1, NULL, NULL, 2);
-INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id, mp_qcode,
jrn_def_id) VALUES (1, 'Paiement électronique', 1, NULL, NULL, 2);
-INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id, mp_qcode,
jrn_def_id) VALUES (4, 'Caisse', 1, NULL, NULL, 3);
-INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_fd_id, mp_qcode,
jrn_def_id) VALUES (3, 'Par gérant ou administrateur', 2, NULL, NULL, 3);
-
-
-
-SELECT pg_catalog.setval('mod_payment_mp_id_seq', 10, true);
-
-
-
-SELECT pg_catalog.setval('op_def_op_seq', 1, false);
-
-
-
-
-
-
-
-
-
-SELECT pg_catalog.setval('op_predef_detail_opd_id_seq', 1, false);
-
-
-
-
-
-
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_NAME', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_CP', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_COMMUNE', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_TVA', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_STREET', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_NUMBER', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_TEL', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_PAYS', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_FAX', NULL);
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_ANALYTIC', 'nu');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_COUNTRY', 'BE');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_STRICT', 'Y');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_TVA_USE', 'Y');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_PJ_SUGGEST', 'Y');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_DATE_SUGGEST', 'Y');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_ALPHANUM', 'N');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_CHECK_PERIODE', 'N');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_UPDLAB', 'N');
-INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_STOCK', 'N');
-
-
-
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('CUSTOMER', '400',
'Poste comptable de base pour les clients');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('COMPTE_TVA',
'451', 'TVA à payer');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('BANQUE', '550',
'Poste comptable de base pour les banques');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('VIREMENT_INTERNE',
'58', 'Poste Comptable pour les virements internes');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('COMPTE_COURANT',
'56', 'Poste comptable pour le compte courant');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('CAISSE', '57',
'Poste comptable pour la caisse');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('TVA_DNA', '6740',
'Tva non déductible s');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('TVA_DED_IMPOT',
'619000', 'Tva déductible par l''impôt');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('VENTE', '70',
'Poste comptable de base pour les ventes');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('DEP_PRIV', '4890',
'Depense a charge du gerant');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('SUPPLIER', '440',
'Poste par défaut pour les fournisseurs');
-INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('DNA', '67',
'Dépense non déductible');
-
-
-
-INSERT INTO parm_money (pm_id, pm_code, pm_rate) VALUES (1, 'EUR', 1.0000);
-
-
-
-INSERT INTO parm_poste (p_value, p_type) VALUES ('1', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('101', 'PASINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('141', 'PASINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('42', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('43', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('44', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('45', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('46', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('47', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('48', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('492', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('493', 'PAS');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('2', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('2409', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('3', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('491', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('490', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6', 'CHA');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('7', 'PRO');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('4', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('40', 'ACT');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5501', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5511', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5521', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5531', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5541', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5551', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5561', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5571', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5581', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('5591', 'ACTINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6311', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6321', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6331', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6341', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6351', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6361', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6371', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('649', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6511', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('6701', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('608', 'CHAINV');
-INSERT INTO parm_poste (p_value, p_type) VALUES ('709', 'PROINV');
-
-
-
-SELECT pg_catalog.setval('plan_analytique_pa_id_seq', 1, false);
-
-
-
-SELECT pg_catalog.setval('poste_analytique_po_id_seq', 1, false);
-
-
-
-INSERT INTO profile_menu_type (pm_type, pm_desc) VALUES ('P', 'Impression');
-INSERT INTO profile_menu_type (pm_type, pm_desc) VALUES ('S', 'Extension');
-INSERT INTO profile_menu_type (pm_type, pm_desc) VALUES ('E', 'Menu');
-INSERT INTO profile_menu_type (pm_type, pm_desc) VALUES ('M', 'Module');
-
-
-
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (59, 'CFGPAY', 'DIVPARM', 1, 40,
'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (68, 'CFGATCARD', 'DIVPARM', 1,
90, 'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (61, 'CFGACC', 'DIVPARM', 1, 60,
'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (54, 'COMPANY', 'PARAM', 1, 10,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (2, 'ANC', NULL, 1, 500, 'M', 0,
NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (526, 'PRINTGL', 'PRINT', 1, 200,
'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (523, 'PRINTBAL', 'PRINT', 1,
500, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (529, 'PRINTREPORT', 'PRINT', 1,
850, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (527, 'PRINTJRN', 'PRINT', 1,
100, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (530, 'PRINTREC', 'PRINT', 1,
1000, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (524, 'PRINTBILAN', 'PRINT', 1,
900, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (686, 'PRINTREPORT', 'PRINT', 2,
850, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (651, 'ANCHOP', 'ANCIMP', 1, 100,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (173, 'COMPTA', NULL, 1, 400,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (55, 'PERIODE', 'PARAM', 1, 20,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (56, 'DIVPARM', 'PARAM', 1, 30,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (652, 'ANCGL', 'ANCIMP', 1, 200,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (60, 'CFGTVA', 'DIVPARM', 1, 50,
'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (653, 'ANCBS', 'ANCIMP', 1, 300,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (654, 'ANCBC2', 'ANCIMP', 1, 400,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (655, 'ANCTAB', 'ANCIMP', 1, 500,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (656, 'ANCBCC', 'ANCIMP', 1, 600,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (657, 'ANCGR', 'ANCIMP', 1, 700,
'E', 0, 78);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (658, 'CSV:AncGrandLivre', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (662, 'new_line', NULL, 1, 350,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (67, 'CFGCATDOC', 'DIVPARM', 1,
80, 'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (69, 'CFGPCMN', 'PARAM', 1, 40,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (23, 'LET', 'COMPTA', 1, 80, 'E',
0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (72, 'PREDOP', 'PARAM', 1, 70,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (75, 'PLANANC', 'ANC', 1, 10,
'E', 0, 2);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (65, 'CFGCARDCAT', 'DIVPARM', 1,
70, 'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (76, 'ANCODS', 'ANC', 1, 20, 'E',
0, 2);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (77, 'ANCGROUP', 'ANC', 1, 30,
'E', 0, 2);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (78, 'ANCIMP', 'ANC', 1, 40, 'E',
0, 2);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (45, 'PARAM', NULL, 1, 200, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (79, 'PREFERENCE', NULL, 1, 150,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (37, 'CUST', 'GESTION', 1, 10,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (38, 'SUPPL', 'GESTION', 1, 20,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (39, 'ADM', 'GESTION', 1, 30,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (40, 'STOCK', 'GESTION', 1, 50,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (41, 'FORECAST', 'GESTION', 1,
70, 'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (42, 'FOLLOW', 'GESTION', 1, 80,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (29, 'VERIFBIL', 'ADV', 1, 210,
'E', 0, 28);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (31, 'PREDOP', 'ADV', 1, 230,
'E', 0, 28);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (32, 'OPEN', 'ADV', 1, 240, 'E',
0, 28);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (33, 'REPORT', 'ADV', 1, 250,
'E', 0, 28);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (43, 'HIST', 'COMPTA', 1, 10,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (28, 'ADV', 'COMPTA', 1, 200,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (688, 'PLANANC', 'ANC', 2, 10,
'E', 0, 727);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (690, 'ANCODS', 'ANC', 2, 20,
'E', 0, 727);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (528, 'PRINTPOSTE', 'PRINT', 1,
300, 'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (683, 'PRINTGL', 'PRINT', 2, 200,
'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (685, 'PRINTBAL', 'PRINT', 2,
500, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (694, 'PRINTJRN', 'PRINT', 2,
100, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (695, 'PRINTREC', 'PRINT', 2,
1000, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (696, 'PRINTBILAN', 'PRINT', 2,
900, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (53, 'ACCESS', NULL, 1, 250, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (785, 'STOCK_HISTO', 'STOCK', 1,
10, 'E', NULL, 30);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (820, 'STOCK_HISTO', 'STOCK', 1,
10, 'E', NULL, 40);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (786, 'STOCK_STATE', 'STOCK', 1,
20, 'E', NULL, 30);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (821, 'STOCK_STATE', 'STOCK', 1,
20, 'E', NULL, 40);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (789, 'STOCK_INVHISTO', 'STOCK',
1, 30, 'E', NULL, 30);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (822, 'STOCK_INVHISTO', 'STOCK',
1, 30, 'E', NULL, 40);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (795, 'STOCK_INV', 'STOCK', 1,
30, 'E', NULL, 30);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (823, 'STOCK_INV', 'STOCK', 1,
30, 'E', NULL, 40);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (824, 'PRINTGL', 'PRINT', 1, 200,
'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (825, 'PRINTBAL', 'PRINT', 1,
500, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (826, 'PRINTREPORT', 'PRINT', 1,
850, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (827, 'PRINTJRN', 'PRINT', 1,
100, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (828, 'PRINTREC', 'PRINT', 1,
1000, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (829, 'PRINTBILAN', 'PRINT', 1,
900, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (830, 'PRINTPOSTE', 'PRINT', 1,
300, 'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (816, 'BALAGE', 'PRINT', 1, 550,
'E', 0, 6);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (831, 'BALAGE', 'PRINT', 1, 550,
'E', 0, 35);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (787, 'STOCK_HISTO', 'STOCK', 2,
10, 'E', NULL, 702);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (832, 'STOCK_HISTO', 'STOCK', 2,
10, 'E', NULL, 706);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (788, 'STOCK_STATE', 'STOCK', 2,
20, 'E', NULL, 702);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (833, 'STOCK_STATE', 'STOCK', 2,
20, 'E', NULL, 706);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (790, 'STOCK_INVHISTO', 'STOCK',
2, 30, 'E', NULL, 702);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (834, 'STOCK_INVHISTO', 'STOCK',
2, 30, 'E', NULL, 706);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (796, 'STOCK_INV', 'STOCK', 2,
30, 'E', NULL, 702);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (835, 'STOCK_INV', 'STOCK', 2,
30, 'E', NULL, 706);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (836, 'PRINTREPORT', 'PRINT', 2,
850, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (837, 'PRINTGL', 'PRINT', 2, 200,
'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (838, 'PRINTBAL', 'PRINT', 2,
500, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (839, 'PRINTJRN', 'PRINT', 2,
100, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (840, 'PRINTREC', 'PRINT', 2,
1000, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (841, 'PRINTBILAN', 'PRINT', 2,
900, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (769, 'PRINTPOSTE', 'PRINT', 2,
300, 'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (842, 'PRINTPOSTE', 'PRINT', 2,
300, 'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (817, 'BALAGE', 'PRINT', 2, 550,
'E', 0, 716);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (843, 'BALAGE', 'PRINT', 2, 550,
'E', 0, 719);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (123, 'CSV:histo', NULL, 1, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (20, 'LOGOUT', NULL, 1, 300, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (35, 'PRINT', 'GESTION', 1, 40,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (124, 'CSV:ledger', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (125, 'PDF:ledger', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (6, 'PRINT', 'COMPTA', 1, 60,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (126, 'CSV:postedetail', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (3, 'MENUACH', 'COMPTA', 1, 30,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (34, 'GESTION', NULL, 1, 450,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (18, 'MENUODS', 'COMPTA', 1, 50,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (88, 'ODS', 'MENUODS', 1, 10,
'E', 0, 18);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (4, 'VENMENU', 'COMPTA', 1, 20,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (90, 'VEN', 'VENMENU', 1, 10,
'E', 0, 4);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (19, 'FIN', 'MENUFIN', 1, 10,
'E', 0, 92);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (73, 'CFGDOC', 'PARAM', 1, 80,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (74, 'CFGLED', 'PARAM', 1, 90,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (71, 'CFGSEC', 'PARAM', 1, 60,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (82, 'EXT', NULL, 1, 550, 'M', 0,
NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (95, 'FREC', 'MENUFIN', 1, 40,
'E', 0, 92);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (94, 'FSALDO', 'MENUFIN', 1, 30,
'E', 0, 92);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (27, 'LETACC', 'LET', 1, 20, 'E',
0, 23);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (24, 'LETCARD', 'LET', 1, 10,
'E', 0, 23);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (167, 'MOD', 'PARAM', 1, 10, 'E',
0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (92, 'MENUFIN', 'COMPTA', 1, 40,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (151, 'SEARCH', NULL, 1, 600,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (85, 'ACH', 'MENUACH', 1, 10,
'E', 0, 3);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (127, 'PDF:postedetail', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (128, 'CSV:fichedetail', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (129, 'PDF:fichedetail', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (130, 'CSV:fiche_balance', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (131, 'PDF:fiche_balance', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (132, 'CSV:report', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (133, 'PDF:report', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (134, 'CSV:fiche', NULL, 1, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (135, 'PDF:fiche', NULL, 1, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (136, 'CSV:glcompte', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (137, 'PDF:glcompte', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (138, 'PDF:sec', NULL, 1, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (139, 'CSV:AncList', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (140, 'CSV:AncBalSimple', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (141, 'PDF:AncBalSimple', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (142, 'CSV:AncBalDouble', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (143, 'PDF:AncBalDouble', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (144, 'CSV:balance', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (145, 'PDF:balance', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (146, 'CSV:AncTable', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (147, 'CSV:AncAccList', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (148, 'CSV:AncBalGroup', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (149, 'OTH:Bilan', NULL, 1, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (1, 'DASHBOARD', NULL, 1, 100,
'M', 1, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (172, 'CFGPRO', 'MOD', 1, NULL,
'E', 0, 167);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (171, 'CFGMENU', 'MOD', 1, NULL,
'E', 0, 167);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (86, 'ACHISTO', 'MENUACH', 1, 20,
'E', 0, 3);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (91, 'VEHISTO', 'VENMENU', 1, 20,
'E', 0, 4);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (781, 'BK', 'GESTION', 1, 35,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (783, 'CSV:ActionGestion', NULL,
1, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (784, 'CFGSTOCK', 'PARAM', 1, 40,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (30, 'STOCK', 'COMPTA', 1, 90,
'E', 0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (791, 'CSV:StockHisto', NULL, 1,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (792, 'CSV:StockResmList', NULL,
1, NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (779, 'CSV:reportinit', NULL, 1,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (797, 'CFGDOCST', 'DIVPARM', 1,
9, 'E', 0, 56);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (36, 'CARD', 'GESTION', 1, 60,
'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (5, 'CARD', 'COMPTA', 1, 70, 'E',
0, 173);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (525, 'CFGCARD', 'PARAM', 1, 400,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (93, 'FIHISTO', 'MENUFIN', 1, 20,
'E', 0, 92);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (89, 'ODHISTO', 'MENUODS', 1, 20,
'E', 0, 18);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (799, 'NAVI', NULL, 1, 90, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (801, 'BOOKMARK', NULL, 1, 85,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (803, 'CFGTAG', 'PARAM', 1, 390,
'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (804, 'CSV:Reconciliation', NULL,
1, 0, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (806, 'MANAGER', 'GESTION', 1,
25, 'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (808, 'CFGDEFMENU', 'MOD', 1, 30,
'E', 0, 167);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (809, 'AGENDA', 'NULL', 1, 410,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (811, 'PDF:AncReceipt', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (812, 'ANCKEY', 'ANC', 1, 15,
'E', 0, 2);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (814, 'CFGPLUGIN', 'PARAM', 1,
15, 'E', 0, 45);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (818, 'CSV:balance_age', NULL, 1,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (668, 'ANCHOP', 'ANCIMP', 2, 100,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (669, 'COMPTA', NULL, 2, 400,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (672, 'ANCGL', 'ANCIMP', 2, 200,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (674, 'ANCBS', 'ANCIMP', 2, 300,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (675, 'ANCBC2', 'ANCIMP', 2, 400,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (676, 'ANCTAB', 'ANCIMP', 2, 500,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (677, 'ANCBCC', 'ANCIMP', 2, 600,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (678, 'ANCGR', 'ANCIMP', 2, 700,
'E', 0, 692);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (679, 'CSV:AncGrandLivre', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (680, 'new_line', NULL, 2, 350,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (684, 'LET', 'COMPTA', 2, 80,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (717, 'CSV:ledger', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (718, 'PDF:ledger', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (719, 'PRINT', 'COMPTA', 2, 60,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (720, 'CSV:postedetail', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (721, 'MENUACH', 'COMPTA', 2, 30,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (723, 'GESTION', NULL, 2, 450,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (724, 'MENUODS', 'COMPTA', 2, 50,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (725, 'ODS', 'MENUODS', 2, 10,
'E', 0, 724);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (727, 'ANC', NULL, 2, 500, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (728, 'VENMENU', 'COMPTA', 2, 20,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (729, 'VEN', 'VENMENU', 2, 10,
'E', 0, 728);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (731, 'FIN', 'MENUFIN', 2, 10,
'E', 0, 742);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (735, 'EXT', NULL, 2, 550, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (736, 'FREC', 'MENUFIN', 2, 40,
'E', 0, 742);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (737, 'FSALDO', 'MENUFIN', 2, 30,
'E', 0, 742);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (738, 'LETACC', 'LET', 2, 20,
'E', 0, 684);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (691, 'ANCGROUP', 'ANC', 2, 30,
'E', 0, 727);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (692, 'ANCIMP', 'ANC', 2, 40,
'E', 0, 727);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (697, 'PREFERENCE', NULL, 2, 150,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (698, 'CUST', 'GESTION', 2, 10,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (699, 'SUPPL', 'GESTION', 2, 20,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (700, 'ADM', 'GESTION', 2, 30,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (702, 'STOCK', 'GESTION', 2, 50,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (703, 'FORECAST', 'GESTION', 2,
70, 'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (704, 'FOLLOW', 'GESTION', 2, 80,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (705, 'VERIFBIL', 'ADV', 2, 210,
'E', 0, 712);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (707, 'PREDOP', 'ADV', 2, 230,
'E', 0, 712);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (708, 'OPEN', 'ADV', 2, 240, 'E',
0, 712);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (709, 'REPORT', 'ADV', 2, 250,
'E', 0, 712);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (711, 'HIST', 'COMPTA', 2, 10,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (712, 'ADV', 'COMPTA', 2, 200,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (713, 'ACCESS', NULL, 2, 250,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (714, 'CSV:histo', NULL, 2, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (715, 'LOGOUT', NULL, 2, 300,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (716, 'PRINT', 'GESTION', 2, 40,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (739, 'LETCARD', 'LET', 2, 10,
'E', 0, 684);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (742, 'MENUFIN', 'COMPTA', 2, 40,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (744, 'SEARCH', NULL, 2, 600,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (745, 'ACH', 'MENUACH', 2, 10,
'E', 0, 721);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (746, 'PDF:postedetail', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (747, 'CSV:fichedetail', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (748, 'PDF:fichedetail', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (749, 'CSV:fiche_balance', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (750, 'PDF:fiche_balance', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (751, 'CSV:report', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (752, 'PDF:report', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (722, 'ACHISTO', 'MENUACH', 2,
20, 'E', 0, 721);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (730, 'VEHISTO', 'VENMENU', 2,
20, 'E', 0, 728);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (753, 'CSV:fiche', NULL, 2, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (754, 'PDF:fiche', NULL, 2, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (755, 'CSV:glcompte', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (756, 'PDF:glcompte', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (757, 'PDF:sec', NULL, 2, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (758, 'CSV:AncList', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (759, 'CSV:AncBalSimple', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (760, 'PDF:AncBalSimple', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (761, 'CSV:AncBalDouble', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (762, 'PDF:AncBalDouble', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (763, 'CSV:balance', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (764, 'PDF:balance', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (765, 'CSV:AncTable', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (766, 'CSV:AncAccList', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (767, 'CSV:AncBalGroup', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (768, 'OTH:Bilan', NULL, 2, NULL,
'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (772, 'DASHBOARD', NULL, 2, 100,
'M', 1, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (782, 'BK', 'GESTION', 2, 35,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (706, 'STOCK', 'COMPTA', 2, 90,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (793, 'CSV:StockHisto', NULL, 2,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (794, 'CSV:StockResmList', NULL,
2, NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (780, 'CSV:reportinit', NULL, 2,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (798, 'CFGDOCST', 'DIVPARM', 2,
9, 'E', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (701, 'CARD', 'GESTION', 2, 60,
'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (710, 'CARD', 'COMPTA', 2, 70,
'E', 0, 669);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (770, 'CFGCARD', 'PARAM', 2, 400,
'E', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (743, 'FIHISTO', 'MENUFIN', 2,
20, 'E', 0, 742);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (726, 'ODHISTO', 'MENUODS', 2,
20, 'E', 0, 724);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (800, 'NAVI', NULL, 2, 90, 'M',
0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (802, 'BOOKMARK', NULL, 2, 85,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (805, 'CSV:Reconciliation', NULL,
2, NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (807, 'MANAGER', 'GESTION', 2,
25, 'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (810, 'AGENDA', 'NULL', 2, 410,
'M', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (813, 'ANCKEY', 'ANC', 2, 15,
'E', 0, 727);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (815, 'CFGPLUGIN', 'PARAM', 2,
15, 'E', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (819, 'CSV:balance_age', NULL, 2,
NULL, 'P', 0, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (844, 'CONTACT', 'GESTION', 1,
22, 'E', 0, 34);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (845, 'CONTACT', 'GESTION', 2,
22, 'E', 0, 723);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (846, 'RAW:receipt', NULL, 1,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (847, 'RAW:receipt', NULL, 2,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (848, 'RAW:document', NULL, 1,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (849, 'RAW:document', NULL, 2,
NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (850, 'RAW:document_template',
NULL, 1, NULL, 'P', NULL, NULL);
-INSERT INTO profile_menu (pm_id, me_code, me_code_dep, p_id, p_order,
p_type_display, pm_default, pm_id_dep) VALUES (851, 'RAW:document_template',
NULL, 2, NULL, 'P', NULL, NULL);
+
+INSERT INTO public.user_active_security (id, us_login, us_ledger, us_action)
VALUES (1, 'phpcompta', 'Y', 'Y');
+
+
+
+
+
+
+
+
+
+
+
+
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (1, 1, 1, 'W');
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (2, 1, 2, 'W');
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (3, 1, -1, 'W');
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (4, 2, 1, 'W');
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (5, 2, 2, 'W');
+INSERT INTO public.user_sec_action_profile (ua_id, p_id, p_granted, ua_right)
VALUES (6, 2, -1, 'W');
+
+
+
+
+
+
+INSERT INTO public.version (val, v_description, v_date) VALUES (126, NULL,
NULL);
+INSERT INTO public.version (val, v_description, v_date) VALUES (127, 'Add
filter for search, inactive tag or ledger, type of operation, security',
'2018-02-10 22:46:38.653432');
+INSERT INTO public.version (val, v_description, v_date) VALUES (128, 'Add a
view to manage VAT', '2018-02-10 22:46:39.22354');
+INSERT INTO public.version (val, v_description, v_date) VALUES (129, 'Currency
: create view , create tables ', '2018-05-16 11:33:18.669944');
+INSERT INTO public.version (val, v_description, v_date) VALUES (130, 'fix bug
: private fee not saved into quant_purchase', '2018-05-16 11:33:20.9263');
+INSERT INTO public.version (val, v_description, v_date) VALUES (131, 'Currency
: adapt quant_fin', '2018-12-17 23:52:00.159162');
+INSERT INTO public.version (val, v_description, v_date) VALUES (132, 'Currency
: Create view for managing currency ', '2018-12-17 23:52:00.288224');
+INSERT INTO public.version (val, v_description, v_date) VALUES (133, 'Currency
: default accounting for currency difference ', '2019-01-12 15:09:01.986951');
+INSERT INTO public.version (val, v_description, v_date) VALUES (134, 'Export
CSV:Analytic_Axis', '2019-02-04 22:14:03.628655');
+INSERT INTO public.version (val, v_description, v_date) VALUES (135, 'rename
table mod_payment', '2019-08-25 19:45:53.925329');
+INSERT INTO public.version (val, v_description, v_date) VALUES (136, 'new
feature PRINTTVA', '2019-08-25 19:45:53.967262');
+INSERT INTO public.version (val, v_description, v_date) VALUES (137, 'Ledger
warning', '2019-08-26 15:09:22.44569');
+INSERT INTO public.version (val, v_description, v_date) VALUES (138, 'Analytic
improve', '2019-08-29 09:52:53.277185');
+INSERT INTO public.version (val, v_description, v_date) VALUES (139, 'Add VAT
exigibility', '2019-11-12 21:22:32.829633');
+INSERT INTO public.version (val, v_description, v_date) VALUES (140, 'Filter
operation PRINTJRN', '2019-11-12 21:22:33.17685');
+INSERT INTO public.version (val, v_description, v_date) VALUES (141, 'Search
filter with operation status', '2019-11-24 21:58:09.605487');
+INSERT INTO public.version (val, v_description, v_date) VALUES (142, 'Bug dans
PARM_POSTE', '2020-04-04 13:21:42.367967');
+INSERT INTO public.version (val, v_description, v_date) VALUES (143, 'Corrige
function find_pcm_type', '2020-04-04 14:27:49.866001');
+INSERT INTO public.version (val, v_description, v_date) VALUES (144, 'Export
Operation PDF', '2020-06-07 19:21:25.227793');
+INSERT INTO public.version (val, v_description, v_date) VALUES (146, 'Export
CSV for Multiple card, contact option by document type', '2020-10-13
13:18:40.69055');
+INSERT INTO public.version (val, v_description, v_date) VALUES (145, 'Improve
tags , add multiple contacts with options', '2020-10-13 13:18:52.511642');
+INSERT INTO public.version (val, v_description, v_date) VALUES (147, 'Cascade
delete on action_gestion', '2020-10-13 13:25:00.168939');
+INSERT INTO public.version (val, v_description, v_date) VALUES (148, 'Default
values for document_option', '2020-10-13 13:30:19.558565');
+INSERT INTO public.version (val, v_description, v_date) VALUES (149, 'Default
values for document_option,comment on followup', '2020-11-02 23:54:57.979499');
+INSERT INTO public.version (val, v_description, v_date) VALUES (150, 'Change
name default action', '2020-11-06 17:22:45.157804');
+INSERT INTO public.version (val, v_description, v_date) VALUES (151, 'Tag with
color and operation', '2020-11-11 00:00:14.603917');
+INSERT INTO public.version (val, v_description, v_date) VALUES (152, 'Comment
on tables,card structure change', '2021-01-26 10:58:32.041375');
+INSERT INTO public.version (val, v_description, v_date) VALUES (153, 'Add
videoconf server', '2021-02-03 14:33:20.642796');
+INSERT INTO public.version (val, v_description, v_date) VALUES (154,
'Rewriting of FORECAST', '2021-04-11 11:48:44.376349');
+INSERT INTO public.version (val, v_description, v_date) VALUES (155,
'Rewriting of COMPANY add extra parameter', '2021-04-11 11:48:44.400179');
+INSERT INTO public.version (val, v_description, v_date) VALUES (156, 'insert
default accounting', '2021-04-11 11:48:44.47274');
+INSERT INTO public.version (val, v_description, v_date) VALUES (157, 'new
feature Currency search', '2021-05-01 13:27:50.989949');
+INSERT INTO public.version (val, v_description, v_date) VALUES (158, 'Filter
Currency search', '2021-05-01 13:27:51.0093');
+INSERT INTO public.version (val, v_description, v_date) VALUES (159, 'correct
bug when inserting accounting', '2021-05-01 13:44:53.503966');
+INSERT INTO public.version (val, v_description, v_date) VALUES (160, 'correct
menu item', '2021-05-09 10:00:00.666521');
+INSERT INTO public.version (val, v_description, v_date) VALUES (161,
'rewriting of Impress (Formula), reorganize menu', '2021-05-29 19:01:15.34999');
+INSERT INTO public.version (val, v_description, v_date) VALUES (162, 'Analytic
accountancy : enable or disable #1983', '2021-06-15 11:01:34.155823');
+INSERT INTO public.version (val, v_description, v_date) VALUES (163, 'typo in
menu', '2021-06-21 13:40:56.153856');
+INSERT INTO public.version (val, v_description, v_date) VALUES (164, 'Menu for
small device : mobile', '2021-07-31 11:23:59.783994');
+INSERT INTO public.version (val, v_description, v_date) VALUES (165, 'Fix bug
for company without VAT', '2021-07-31 11:23:59.834802');
+INSERT INTO public.version (val, v_description, v_date) VALUES (166, 'Fix bug
for card with empty name or quickcode', '2021-08-18 17:09:54.700945');
+INSERT INTO public.version (val, v_description, v_date) VALUES (167, 'Card
accounting created automatically', '2021-08-22 18:01:19.73546');
+INSERT INTO public.version (val, v_description, v_date) VALUES (168, 'Button
search card', '2021-08-24 18:08:17.415644');
+INSERT INTO public.version (val, v_description, v_date) VALUES (169, 'Fix bug
currency_id is null, from IMPORTBANK', '2021-10-14 11:27:17.158961');
+INSERT INTO public.version (val, v_description, v_date) VALUES (170, 'new :
export in PDF balance Analytic / Accountancy', '2021-11-10 00:16:07.964928');
+INSERT INTO public.version (val, v_description, v_date) VALUES (171, 'change
name for menu ', '2021-12-02 17:46:48.237139');
+INSERT INTO public.version (val, v_description, v_date) VALUES (172, 'Add free
label for exercice', '2021-12-02 17:56:37.005382');
+INSERT INTO public.version (val, v_description, v_date) VALUES (173,
'Supplemental tax', '2022-11-27 21:52:48.953093');
+INSERT INTO public.version (val, v_description, v_date) VALUES (174,
'Supplemental tax : delete', '2022-11-27 21:52:49.089595');
+INSERT INTO public.version (val, v_description, v_date) VALUES (175, 'Folder
Appearance', '2022-11-27 21:52:49.094392');
+INSERT INTO public.version (val, v_description, v_date) VALUES (176, 'Folder
Appearance : dialog box', '2022-11-27 21:52:49.105093');
+INSERT INTO public.version (val, v_description, v_date) VALUES (177, 'Use of
quantity column optional and rename PARAM', '2022-11-27 21:52:49.108968');
+INSERT INTO public.version (val, v_description, v_date) VALUES (178, 'Correct
contact', '2022-11-27 21:52:49.136413');
+INSERT INTO public.version (val, v_description, v_date) VALUES (179, 'Improve
Card Attribut - default order', '2022-11-27 21:52:49.151026');
+INSERT INTO public.version (val, v_description, v_date) VALUES (180, 'Shorten
Aphanumeric account', '2022-11-27 21:52:49.176811');
+INSERT INTO public.version (val, v_description, v_date) VALUES (181, 'Make
feenote from Management', '2022-11-27 21:52:49.19162');
+INSERT INTO public.version (val, v_description, v_date) VALUES (182, 'Prevent
to add several time same tag on an operation, action_comment formatting',
'2022-11-27 21:52:49.198977');
+INSERT INTO public.version (val, v_description, v_date) VALUES (183, 'Mantis
#1327 code for vat', '2023-01-05 11:07:42.287071');
+INSERT INTO public.version (val, v_description, v_date) VALUES (184, 'document
table action_gestion', '2023-01-25 15:51:17.885328');
+INSERT INTO public.version (val, v_description, v_date) VALUES (185, 'Document
Component : Type of Document Model in a table', '2023-05-01 08:50:07.962311');
+INSERT INTO public.version (val, v_description, v_date) VALUES (186, 'Correct
contact and web site', '2023-06-03 13:26:25.92533');
+INSERT INTO public.version (val, v_description, v_date) VALUES (187, 'Currency
: more decimals', '2023-07-05 17:46:27.022315');
+INSERT INTO public.version (val, v_description, v_date) VALUES (188, 'Filter
for VAT id', '2023-08-30 09:39:50.919488');
+INSERT INTO public.version (val, v_description, v_date) VALUES (189, 'Compute
properly accounting', '2023-08-30 09:39:50.930073');
+INSERT INTO public.version (val, v_description, v_date) VALUES (190, 'remove
dead code', '2023-09-17 10:33:59.028988');
+INSERT INTO public.version (val, v_description, v_date) VALUES (191,
'cloture-ouverture exercice-version 9112', '2024-01-13 13:02:09.291759');
+INSERT INTO public.version (val, v_description, v_date) VALUES (192, '2323 :
tree for depending event', '2024-01-17 19:05:06.774227');
+INSERT INTO public.version (val, v_description, v_date) VALUES (193, ' 2332:
Suivi : ajout fichier lié aux commentaires', '2024-01-28 14:37:01.294399');
+INSERT INTO public.version (val, v_description, v_date) VALUES (194,
'Renforcement sécurité', '2024-02-03 16:08:05.713015');
+INSERT INTO public.version (val, v_description, v_date) VALUES (195, 'Protect
injection JS , sauve recherche suivi', '2024-02-18 13:20:32.957891');
+INSERT INTO public.version (val, v_description, v_date) VALUES (196, 'remove
trigger update on JRNX ', '2024-02-27 17:58:20.490341');
+INSERT INTO public.version (val, v_description, v_date) VALUES (197, 'Adapt
for VAT CODE', '2024-07-27 22:11:14.756736');
+INSERT INTO public.version (val, v_description, v_date) VALUES (198, 'Cosmetic
and VAT', '2024-07-27 22:11:14.840218');
+INSERT INTO public.version (val, v_description, v_date) VALUES (199, 'Detail
VAT', '2024-07-29 16:02:22.5503');
+
+
+
+SELECT pg_catalog.setval('public.acc_other_tax_ac_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_comment_document_acd_id_seq', 1,
false);
+
+
+
+SELECT pg_catalog.setval('public.action_detail_ad_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_gestion_ag_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_gestion_comment_agc_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_gestion_filter_af_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_gestion_operation_ago_id_seq', 1,
false);
+
+
+
+SELECT pg_catalog.setval('public.action_gestion_related_aga_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_person_ap_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_person_option_ap_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.action_tags_at_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.bilan_b_id_seq', 9, true);
+
+
+
+SELECT pg_catalog.setval('public.bookmark_b_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.bud_card_bc_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.bud_detail_bd_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.bud_detail_periode_bdp_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.contact_option_ref_cor_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.currency_history_id_seq', 1, true);
+
+
+
+SELECT pg_catalog.setval('public.currency_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.del_action_del_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.del_jrn_dj_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.del_jrnx_djx_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.document_component_dc_id_seq', 3, true);
+
+
+
+SELECT pg_catalog.setval('public.document_d_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.document_modele_md_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.document_option_do_id_seq', 70, true);
+
+
+
+SELECT pg_catalog.setval('public.document_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.document_state_s_id_seq', 100, false);
+
+
+
+SELECT pg_catalog.setval('public.document_type_dt_id_seq', 25, false);
+
+
+
+SELECT pg_catalog.setval('public.extension_ex_id_seq', 1, true);
+
+
+
+SELECT pg_catalog.setval('public.forecast_cat_fc_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.forecast_f_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.forecast_item_fi_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.historique_analytique_ha_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.jnt_document_option_contact_jdoc_id_seq', 1,
false);
+
+
+
+SELECT pg_catalog.setval('public.jnt_letter_jl_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.jnt_tag_group_tag_jt_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.jrn_info_ji_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.jrn_note_n_id_seq', 1, false);
+
+
+
+SELECT pg_catalog.setval('public.jrn_periode_id_seq', 52, true);
-SELECT pg_catalog.setval('profile_menu_pm_id_seq', 851, true);
+SELECT pg_catalog.setval('public.jrn_tax_jt_id_seq', 1, false);
-SELECT pg_catalog.setval('profile_p_id_seq', 11, true);
+SELECT pg_catalog.setval('public.key_distribution_activity_ka_id_seq', 1,
false);
-INSERT INTO stock_repository (r_id, r_name, r_adress, r_country, r_city,
r_phone) VALUES (1, 'Dépôt par défaut', NULL, NULL, NULL, NULL);
+SELECT pg_catalog.setval('public.key_distribution_detail_ke_id_seq', 1, false);
-INSERT INTO profile_sec_repository (ur_id, p_id, r_id, ur_right) VALUES (1, 1,
1, 'W');
-INSERT INTO profile_sec_repository (ur_id, p_id, r_id, ur_right) VALUES (2, 2,
1, 'W');
+SELECT pg_catalog.setval('public.key_distribution_kd_id_seq', 1, false);
-SELECT pg_catalog.setval('profile_sec_repository_ur_id_seq', 2, true);
+SELECT pg_catalog.setval('public.key_distribution_ledger_kl_id_seq', 1, false);
-INSERT INTO profile_user (user_name, pu_id, p_id) VALUES ('phpcompta', 1, 1);
+SELECT pg_catalog.setval('public.letter_cred_lc_id_seq', 1, false);
-SELECT pg_catalog.setval('profile_user_pu_id_seq', 6, true);
+SELECT pg_catalog.setval('public.letter_deb_ld_id_seq', 1, false);
+SELECT pg_catalog.setval('public.link_action_type_l_id_seq', 1, false);
-SELECT pg_catalog.setval('quant_fin_qf_id_seq', 1, false);
+SELECT pg_catalog.setval('public.menu_default_md_id_seq', 3, true);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (1, '21%', 0.2100, 'Tva applicable à tout ce qui bien et
service divers', '4111,4511', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (2, '12%', 0.1200, 'Tva ', '4112,4512', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (3, '6%', 0.0600, 'Tva applicable aux journaux et
livres', '4113,4513', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (4, '0%', 0.0000, 'Aucune tva n''est applicable',
'4114,4514', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (6, 'EXPORT', 0.0000, 'Tva pour les exportations',
'41141,45144', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (5, 'INTRA', 0.0000, 'Tva pour les livraisons /
acquisition intra communautaires', '41142,45142', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (7, 'COC', 0.0000, 'Opérations avec des cocontractants',
'41144,45144', 0);
-INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste,
tva_both_side) VALUES (8, 'ART44', 0.0000, 'Opérations pour les opérations avec
des assujettis à l\''art 44 Code TVA', '41143,45143', 0);
+SELECT pg_catalog.setval('public.mod_payment_mp_id_seq', 10, true);
+SELECT pg_catalog.setval('public.op_def_op_seq', 1, false);
+SELECT pg_catalog.setval('public.op_predef_detail_opd_id_seq', 1, false);
-SELECT pg_catalog.setval('s_attr_def', 9001, false);
+SELECT pg_catalog.setval('public.operation_currency_id_seq', 1, false);
-SELECT pg_catalog.setval('s_cbc', 1, false);
+SELECT pg_catalog.setval('public.operation_exercice_detail_oed_id_seq', 1,
false);
-SELECT pg_catalog.setval('s_central', 1, false);
+SELECT pg_catalog.setval('public.operation_exercice_oe_id_seq', 1, false);
-SELECT pg_catalog.setval('s_central_order', 1, false);
+SELECT pg_catalog.setval('public.operation_tag_opt_id_seq', 1, false);
-SELECT pg_catalog.setval('s_centralized', 1, false);
+SELECT pg_catalog.setval('public.parameter_extra_id_seq', 4, true);
-SELECT pg_catalog.setval('s_currency', 1, true);
+SELECT pg_catalog.setval('public.plan_analytique_pa_id_seq', 1, false);
-SELECT pg_catalog.setval('s_fdef', 6, true);
+SELECT pg_catalog.setval('public.poste_analytique_po_id_seq', 1, false);
-SELECT pg_catalog.setval('s_fiche', 20, true);
+SELECT pg_catalog.setval('public.profile_menu_pm_id_seq', 893, true);
-SELECT pg_catalog.setval('s_fiche_def_ref', 16, true);
+SELECT pg_catalog.setval('public.profile_mobile_pmo_id_seq', 6, true);
-SELECT pg_catalog.setval('s_form', 1, false);
+SELECT pg_catalog.setval('public.profile_p_id_seq', 11, true);
-SELECT pg_catalog.setval('s_formdef', 1, false);
+SELECT pg_catalog.setval('public.profile_sec_repository_ur_id_seq', 2, true);
-SELECT pg_catalog.setval('s_grpt', 2, true);
+SELECT pg_catalog.setval('public.profile_user_pu_id_seq', 6, true);
-SELECT pg_catalog.setval('s_idef', 1, false);
+SELECT pg_catalog.setval('public.quant_fin_qf_id_seq', 1, false);
-SELECT pg_catalog.setval('s_internal', 1, false);
+SELECT pg_catalog.setval('public.s_attr_def', 9001, false);
-SELECT pg_catalog.setval('s_invoice', 1, false);
+SELECT pg_catalog.setval('public.s_cbc', 1, false);
-SELECT pg_catalog.setval('s_isup', 1, false);
+SELECT pg_catalog.setval('public.s_central', 1, false);
-SELECT pg_catalog.setval('s_jnt_fic_att_value', 371, true);
+SELECT pg_catalog.setval('public.s_central_order', 1, false);
-SELECT pg_catalog.setval('s_jnt_id', 56, true);
+SELECT pg_catalog.setval('public.s_centralized', 1, false);
-SELECT pg_catalog.setval('s_jrn', 1, false);
+SELECT pg_catalog.setval('public.s_currency', 1, true);
-SELECT pg_catalog.setval('s_jrn_1', 1, false);
+SELECT pg_catalog.setval('public.s_fdef', 6, true);
-SELECT pg_catalog.setval('s_jrn_2', 1, false);
+SELECT pg_catalog.setval('public.s_fiche', 20, true);
-SELECT pg_catalog.setval('s_jrn_3', 1, false);
+SELECT pg_catalog.setval('public.s_fiche_def_ref', 16, true);
-SELECT pg_catalog.setval('s_jrn_4', 1, false);
+SELECT pg_catalog.setval('public.s_form', 1, false);
-SELECT pg_catalog.setval('s_jrn_def', 5, false);
+SELECT pg_catalog.setval('public.s_formdef', 1, false);
-SELECT pg_catalog.setval('s_jrn_op', 1, false);
+SELECT pg_catalog.setval('public.s_grpt', 2, true);
-SELECT pg_catalog.setval('s_jrn_pj1', 1, false);
+SELECT pg_catalog.setval('public.s_idef', 1, false);
-SELECT pg_catalog.setval('s_jrn_pj2', 1, false);
+SELECT pg_catalog.setval('public.s_internal', 1, false);
-SELECT pg_catalog.setval('s_jrn_pj3', 1, false);
+SELECT pg_catalog.setval('public.s_invoice', 1, false);
-SELECT pg_catalog.setval('s_jrn_pj4', 1, false);
+SELECT pg_catalog.setval('public.s_isup', 1, false);
-SELECT pg_catalog.setval('s_jrn_rapt', 1, false);
+SELECT pg_catalog.setval('public.s_jnt_fic_att_value', 371, true);
-SELECT pg_catalog.setval('s_jrnaction', 5, true);
+SELECT pg_catalog.setval('public.s_jnt_id', 67, true);
-SELECT pg_catalog.setval('s_jrnx', 1, false);
+SELECT pg_catalog.setval('public.s_jrn', 1, false);
-SELECT pg_catalog.setval('s_oa_group', 1, true);
+SELECT pg_catalog.setval('public.s_jrn_1', 1, false);
-SELECT pg_catalog.setval('s_periode', 91, true);
+SELECT pg_catalog.setval('public.s_jrn_2', 1, false);
-SELECT pg_catalog.setval('s_quantity', 7, true);
+SELECT pg_catalog.setval('public.s_jrn_3', 1, false);
-SELECT pg_catalog.setval('s_stock_goods', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_4', 1, false);
-SELECT pg_catalog.setval('s_tva', 1001, true);
+SELECT pg_catalog.setval('public.s_jrn_def', 5, false);
-SELECT pg_catalog.setval('s_user_act', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_op', 1, false);
-SELECT pg_catalog.setval('s_user_jrn', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_pj1', 1, false);
-SELECT pg_catalog.setval('seq_bud_hypothese_bh_id', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_pj2', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_1', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_pj3', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_10', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_pj4', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_2', 1, false);
+SELECT pg_catalog.setval('public.s_jrn_rapt', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_20', 1, false);
+SELECT pg_catalog.setval('public.s_jrnaction', 5, true);
-SELECT pg_catalog.setval('seq_doc_type_21', 1, false);
+SELECT pg_catalog.setval('public.s_jrnx', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_22', 1, false);
+SELECT pg_catalog.setval('public.s_oa_group', 1, true);
-SELECT pg_catalog.setval('seq_doc_type_3', 1, false);
+SELECT pg_catalog.setval('public.s_periode', 91, true);
-SELECT pg_catalog.setval('seq_doc_type_4', 1, false);
+SELECT pg_catalog.setval('public.s_quantity', 7, true);
-SELECT pg_catalog.setval('seq_doc_type_5', 1, false);
+SELECT pg_catalog.setval('public.s_stock_goods', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_6', 1, false);
+SELECT pg_catalog.setval('public.s_tva', 1001, true);
-SELECT pg_catalog.setval('seq_doc_type_7', 1, false);
+SELECT pg_catalog.setval('public.s_user_act', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_8', 1, false);
+SELECT pg_catalog.setval('public.s_user_jrn', 1, false);
-SELECT pg_catalog.setval('seq_doc_type_9', 1, false);
+SELECT pg_catalog.setval('public.seq_bud_hypothese_bh_id', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_1', 1, false);
-SELECT pg_catalog.setval('stock_change_c_id_seq', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_10', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_2', 1, false);
-SELECT pg_catalog.setval('stock_repository_r_id_seq', 1, true);
+SELECT pg_catalog.setval('public.seq_doc_type_20', 1, false);
-SELECT pg_catalog.setval('tags_t_id_seq', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_21', 1, false);
-SELECT pg_catalog.setval('tmp_pcmn_id_seq', 1034, true);
+SELECT pg_catalog.setval('public.seq_doc_type_22', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_3', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_4', 1, false);
-SELECT pg_catalog.setval('tmp_stockgood_detail_d_id_seq', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_5', 1, false);
-SELECT pg_catalog.setval('tmp_stockgood_s_id_seq', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_6', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_7', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_8', 1, false);
-SELECT pg_catalog.setval('todo_list_shared_id_seq', 1, false);
+SELECT pg_catalog.setval('public.seq_doc_type_9', 1, false);
-SELECT pg_catalog.setval('todo_list_tl_id_seq', 1, false);
+SELECT pg_catalog.setval('public.stock_change_c_id_seq', 1, false);
+SELECT pg_catalog.setval('public.stock_repository_r_id_seq', 1, true);
-SELECT pg_catalog.setval('uos_pk_seq', 1, false);
+SELECT pg_catalog.setval('public.tag_group_tg_id_seq', 1, false);
-INSERT INTO user_active_security (id, us_login, us_ledger, us_action) VALUES
(1, 'phpcompta', 'Y', 'Y');
+SELECT pg_catalog.setval('public.tags_t_id_seq', 1, false);
-SELECT pg_catalog.setval('user_active_security_id_seq', 1, true);
+SELECT pg_catalog.setval('public.tmp_pcmn_id_seq', 1036, true);
+SELECT pg_catalog.setval('public.tmp_stockgood_detail_d_id_seq', 1, false);
-SELECT pg_catalog.setval('user_filter_id_seq', 1, false);
+SELECT pg_catalog.setval('public.tmp_stockgood_s_id_seq', 1, false);
+SELECT pg_catalog.setval('public.todo_list_shared_id_seq', 1, false);
+SELECT pg_catalog.setval('public.todo_list_tl_id_seq', 1, false);
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(1, 1, 1, 'W');
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(2, 1, 2, 'W');
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(3, 1, -1, 'W');
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(4, 2, 1, 'W');
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(5, 2, 2, 'W');
-INSERT INTO user_sec_action_profile (ua_id, p_id, p_granted, ua_right) VALUES
(6, 2, -1, 'W');
+SELECT pg_catalog.setval('public.uos_pk_seq', 1, false);
-SELECT pg_catalog.setval('user_sec_action_profile_ua_id_seq', 6, true);
+SELECT pg_catalog.setval('public.user_active_security_id_seq', 1, true);
+SELECT pg_catalog.setval('public.user_filter_id_seq', 1, false);
-INSERT INTO version (val, v_description, v_date) VALUES (126, NULL, NULL);
-INSERT INTO version (val, v_description, v_date) VALUES (127, 'Add filter for
search, inactive tag or ledger, type of operation, security', now());
-INSERT INTO version (val, v_description, v_date) VALUES (128, 'Add a view to
manage VAT', now());
+SELECT pg_catalog.setval('public.user_sec_action_profile_ua_id_seq', 6, true);
diff --git a/include/sql/mod1/function.sql b/include/sql/mod1/function.sql
index 7ebcde827..8a4ade611 100644
--- a/include/sql/mod1/function.sql
+++ b/include/sql/mod1/function.sql
@@ -1,22 +1,23 @@
-CREATE FUNCTION account_add(p_id public.account_type, p_name character
varying) RETURNS text
+CREATE FUNCTION comptaproc.account_add(p_id public.account_type, p_name
character varying) RETURNS text
LANGUAGE plpgsql
AS $$
declare
- nParent tmp_pcmn.pcm_val_parent%type;
- nCount integer;
- sReturn text;
-begin
- sReturn:= format_account(p_id);
- select count(*) into nCount from tmp_pcmn where pcm_val=sReturn;
- if nCount = 0 then
- nParent=account_parent(p_id);
- insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent)
- values (p_id, p_name,nParent) returning pcm_val into
sReturn;
- end if;
-return sReturn;
+ nParent tmp_pcmn.pcm_val_parent%type;
+ nCount integer;
+ sReturn text;
+begin
+ -- patch 189
+ sReturn:= format_account(p_id);
+ select count(*) into nCount from tmp_pcmn where pcm_val=sReturn;
+ if nCount = 0 then
+ nParent=account_parent(p_id);
+ insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent)
+ values (p_id, p_name,nParent) returning pcm_val into sReturn;
+ end if;
+ return sReturn;
end ;
$$;
-CREATE FUNCTION account_alphanum() RETURNS boolean
+CREATE FUNCTION comptaproc.account_alphanum() RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -30,7 +31,7 @@ begin
return l_auto;
end;
$$;
-CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean
+CREATE FUNCTION comptaproc.account_auto(p_fd_id integer) RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -44,139 +45,167 @@ begin
return l_auto;
end;
$$;
-CREATE FUNCTION account_compute(p_f_id integer) RETURNS public.account_type
+CREATE FUNCTION comptaproc.account_compute(p_f_id integer) RETURNS
public.account_type
LANGUAGE plpgsql
AS $$
declare
- class_base fiche_def.fd_class_base%type;
- maxcode numeric;
- sResult text;
- bAlphanum bool;
- sName text;
-begin
- select fd_class_base into class_base
- from
- fiche_def join fiche using (fd_id)
- where
- f_id=p_f_id;
- raise notice 'account_compute class base %',class_base;
- bAlphanum := account_alphanum();
- if bAlphanum = false then
- raise info 'account_compute : Alphanum is false';
- select count (pcm_val) into maxcode from tmp_pcmn where
pcm_val_parent = class_base;
- if maxcode = 0 then
- maxcode:=class_base::numeric;
- else
- select max (pcm_val) into maxcode from tmp_pcmn where
pcm_val_parent = class_base;
- maxcode:=maxcode::numeric;
- end if;
- if maxcode::text = class_base then
- maxcode:=class_base::numeric*1000;
- end if;
- maxcode:=maxcode+1;
- raise notice 'account_compute Max code %',maxcode;
- sResult:=maxcode::account_type;
- else
- raise info 'account_compute : Alphanum is true';
- -- if alphanum, use name
- select ad_value into sName from fiche_detail where f_id=p_f_id
and ad_id=1;
- raise info 'name is %',sName;
- if sName is null then
- raise exception 'Cannot compute an accounting without
the name of the card for %',p_f_id;
- end if;
- sResult := class_base||sName;
- sResult := substr(sResult,1,40);
- raise info 'Result is %',sResult;
- end if;
- return sResult::account_type;
+ class_base fiche_def.fd_class_base%type;
+ maxcode numeric;
+ sResult account_type;
+ bAlphanum bool;
+ sName text;
+ nCount integer;
+ sNumber text;
+begin
+ -- patch 189
+ select fd_class_base into class_base
+ from
+ fiche_def join fiche using (fd_id)
+ where
+ f_id=p_f_id;
+
+ bAlphanum := account_alphanum();
+ if bAlphanum = false then
+ select max (pcm_val::numeric) into maxcode
+ from tmp_pcmn
+ where pcm_val_parent = class_base and pcm_val !~* '[[:alpha:]]' ;
+ if maxcode is null or length(maxcode::text) < length(class_base)+4
then
+ maxcode:=class_base::numeric*10000+1;
+ else
+ select max (pcm_val::numeric) into maxcode
+ from tmp_pcmn
+ where pcm_val !~* '[[:alpha:]]'
+ and pcm_val_parent = class_base
+ and substr(pcm_val::text,1,length(class_base))=class_base;
+
+ sNumber := substr(maxcode::text,length(class_base)+1);
+ nCount := sNumber::numeric+1;
+ sNumber := lpad (nCount::text,4,'0');
+
+ maxcode:=class_base||sNumber;
+ end if;
+ sResult:=maxcode::account_type;
+ else
+ -- if alphanum, use name
+ select ad_value into sName from fiche_detail where f_id=p_f_id and
ad_id=1;
+ if sName is null then
+ raise exception 'Cannot compute an accounting without the name of
the card for %',p_f_id;
+ end if;
+ sResult := account_compute_alpha(class_base,sName);
+ end if;
+ return sResult;
end;
$$;
-CREATE FUNCTION account_insert(p_f_id integer, p_account text) RETURNS text
+CREATE FUNCTION comptaproc.account_compute_alpha(p_class text, p_name text)
RETURNS public.account_type
LANGUAGE plpgsql
AS $$
declare
- nParent tmp_pcmn.pcm_val_parent%type;
- sName varchar;
- sNew tmp_pcmn.pcm_val%type;
- bAuto bool;
- nFd_id integer;
- sClass_Base fiche_def.fd_class_base%TYPE;
- nCount integer;
- first text;
- second text;
- s_account text;
+ sResult account_type;
+ sAccount account_type;
+ sFormatedAccount account_type;
+ nCount int;
+ idx int :=0;
begin
+ sFormatedAccount := comptaproc.format_account(p_name);
- if p_account is not null and length(trim(p_account)) != 0 then
- -- if there is coma in p_account, treat normally
- if position (',' in p_account) = 0 then
- raise info 'p_account is not empty';
- s_account := substr( p_account,1 , 40);
- select count(*) into nCount from tmp_pcmn
where pcm_val=s_account::account_type;
- raise notice 'found in tmp_pcm %',nCount;
- if nCount !=0 then
- raise info 'this account exists in
tmp_pcmn ';
- perform
attribut_insert(p_f_id,5,s_account);
- else
- -- account doesn't exist, create it
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
+ sAccount := p_class||substring(sFormatedAccount for 5);
+ nCount := 0;
+ loop
+ select count(*) into nCount from tmp_pcmn where pcm_val =
comptaproc.format_account(sAccount);
-
nParent:=account_parent(s_account::account_type);
- insert into
tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values
(s_account::account_type,sName,nParent);
- perform
attribut_insert(p_f_id,5,s_account);
+ exit when nCount = 0;
+ idx := idx + 1;
+ sAccount := p_class || substring(sFormatedAccount for 5)||idx::text;
+ end loop;
+ sResult := comptaproc.format_account(sAccount);
+ return sResult;
+end;
+$$;
+CREATE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text)
RETURNS text
+ LANGUAGE plpgsql
+ AS $$
+declare
+ nParent tmp_pcmn.pcm_val_parent%type;
+ sName varchar;
+ sNew tmp_pcmn.pcm_val%type;
+ bAuto bool;
+ nFd_id integer;
+ sClass_Base fiche_def.fd_class_base%TYPE;
+ nCount integer;
+ first text;
+ second text;
+ s_account text;
+begin
+ -- patch 189
+ -- accouting is given
+ if p_account is not null and length(trim(p_account)) != 0 then
+ -- if there is coma in p_account, treat normally
+ if position (',' in p_account) = 0 then
+ s_account := format_account(substr( p_account,1 ,
40)::account_type);
+ select count(*) into nCount from tmp_pcmn where
pcm_val=s_account::account_type;
+ if nCount !=0 then
+ perform attribut_insert(p_f_id,5,s_account);
+ else
+ -- account doesn't exist, create it
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ -- retrieve parent account from card
+ select fd_class_base::account_type into nParent from fiche_def
where fd_id=(select fd_id from fiche where f_id=p_f_id);
+ if nParent = null or nParent = '' then
+ nParent:=account_parent(s_account::account_type);
+ end if;
+ insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values
(s_account::account_type,sName,nParent);
+ perform attribut_insert(p_f_id,5,s_account);
- end if;
- else
- raise info 'presence of a comma';
- -- there is 2 accounts separated by a comma
- first := split_part(p_account,',',1);
- second := split_part(p_account,',',2);
- -- check there is no other coma
- raise info 'first value % second value %', first, second;
-
- if position (',' in first) != 0 or position (',' in second) !=
0 then
- raise exception 'Too many comas, invalid account';
- end if;
- perform attribut_insert(p_f_id,5,p_account);
- end if;
- else
- raise info 'A000 : p_account is empty';
- select fd_id into nFd_id from fiche where f_id=p_f_id;
- bAuto:= account_auto(nFd_id);
-
- select fd_class_base into sClass_base from fiche_def where
fd_id=nFd_id;
-raise info 'sClass_Base : %',sClass_base;
- if bAuto = true and sClass_base similar to '[[:digit:]]*' then
- raise info 'account generated automatically';
- sNew:=account_compute(p_f_id);
- raise info 'sNew %', sNew;
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
- nParent:=account_parent(sNew);
- sNew := account_add (sNew,sName);
- perform attribut_insert(p_f_id,5,sNew);
+ end if;
+ return s_account;
+ else
+ -- there is 2 accounts separated by a comma
+ first := split_part(p_account,',',1);
+ second := split_part(p_account,',',2);
+ -- check there is no other coma
- else
- -- if there is an account_base then it is the default
- select fd_class_base::account_type into sNew from
fiche_def join fiche using (fd_id) where f_id=p_f_id;
- if sNew is null or length(trim(sNew)) = 0 then
- raise notice 'count is null';
- perform attribut_insert(p_f_id,5,null);
- else
- perform attribut_insert(p_f_id,5,sNew);
- end if;
- end if;
- end if;
+ if position (',' in first) != 0 or position (',' in second) != 0
then
+ raise exception 'Too many comas, invalid account';
+ end if;
+ perform attribut_insert(p_f_id,5,p_account);
+
+ end if;
+ return s_account;
+ end if;
+
+ select fd_id into nFd_id from fiche where f_id=p_f_id;
+ bAuto:= account_auto(nFd_id);
+
+ select fd_class_base into sClass_base from fiche_def where fd_id=nFd_id;
+ if bAuto = true and sClass_base similar to '[[:digit:]]*' then
+ sNew:=account_compute(p_f_id);
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ nParent:=sClass_Base::account_type;
+ sNew := account_add (sNew,sName);
+ update tmp_pcmn set pcm_val_parent=nParent where pcm_val=sNew;
+ perform attribut_insert(p_f_id,5,sNew);
+ return sNew;
+ else
+ -- if there is an account_base then it is the default
+ if trim(coalesce(sClass_base::text,'')) = '' then
+ perform attribut_insert(p_f_id,5,null);
+ else
+ perform attribut_insert(p_f_id,5,sClass_base);
+ end if;
+ return sClass_base;
+ end if;
+
+ raise notice 'ai89.account_insert nothing done : error';
-return 0;
end;
$$;
-CREATE FUNCTION account_parent(p_account public.account_type) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.account_parent(p_account public.account_type)
RETURNS public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -207,7 +236,7 @@ begin
return sSubParent;
end;
$$;
-CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type)
RETURNS integer
+CREATE FUNCTION comptaproc.account_update(p_f_id integer, p_account
public.account_type) RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -222,32 +251,35 @@ begin
if length(trim(p_account)) != 0 then
-- 2 accounts in card separated by comma
if position (',' in p_account) = 0 then
+ p_account := format_account(p_account);
select count(*) into nCount from tmp_pcmn where
pcm_val=p_account;
if nCount = 0 then
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
- nParent:=account_parent(p_account);
- insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent)
values (p_account,sName,nParent);
- end if;
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ nParent:=account_parent(p_account);
+ raise notice 'insert into tmp_pcmn %
%',p_account,sName;
+ insert into
tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account,sName,nParent);
+ end if;
else
- raise info 'presence of a comma';
- -- there is 2 accounts separated by a comma
- first := split_part(p_account,',',1);
- second := split_part(p_account,',',2);
- -- check there is no other coma
- raise info 'first value % second value %', first, second;
-
- if position (',' in first) != 0 or position (',' in second) !=
0 then
- raise exception 'Too many comas, invalid account';
- end if;
- -- check that both account are in PCMN
+ raise info 'presence of a comma';
+ -- there is 2 accounts separated by a comma
+ first := split_part(p_account,',',1);
+ second := split_part(p_account,',',2);
+ -- check there is no other coma
+ raise info 'first value % second value %', first,
second;
+
+ if position (',' in first) != 0 or position (',' in
second) != 0 then
+ raise exception 'Too many comas, invalid
account';
+ end if;
+ -- check that both account are in PCMN
end if;
else
-- account is null
update fiche_detail set ad_value=null where f_id=p_f_id and
ad_id=5 ;
+ return 0;
end if;
update fiche_detail set ad_value=p_account where f_id=p_f_id and
ad_id=5 ;
@@ -255,7 +287,7 @@ begin
return 0;
end;
$$;
-CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.action_gestion_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -265,7 +297,7 @@ NEW.ag_owner := lower(NEW.ag_owner);
return NEW;
end;
$$;
-CREATE FUNCTION action_gestion_related_ins_up() RETURNS trigger
+CREATE FUNCTION comptaproc.action_gestion_related_ins_up() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -286,7 +318,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION anc_correct_tvand() RETURNS void
+CREATE FUNCTION comptaproc.anc_correct_tvand() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -314,16 +346,21 @@ begin
end loop;
end;
$$;
-CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value
character varying) RETURNS void
+CREATE FUNCTION comptaproc.attribut_insert(p_f_id integer, p_ad_id integer,
p_value character varying) RETURNS void
LANGUAGE plpgsql
AS $$
+declare
+ nResult bigint;
begin
- insert into fiche_detail (f_id,ad_id, ad_value) values
(p_f_id,p_ad_id,p_value);
-
+ update fiche_detail set ad_value=p_value where ad_id=p_ad_id and
f_id=p_f_id returning jft_id into nResult;
+ if nResult is null then
+ insert into fiche_detail (f_id,ad_id, ad_value) values
(p_f_id,p_ad_id,p_value);
+ end if;
+
return;
end;
$$;
-CREATE FUNCTION attribute_correct_order() RETURNS void
+CREATE FUNCTION comptaproc.attribute_correct_order() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -343,7 +380,7 @@ begin
perform attribute_correct_order ();
end;
$$;
-CREATE FUNCTION card_after_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.card_after_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -354,7 +391,7 @@ begin
end;
$$;
-CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text
+CREATE FUNCTION comptaproc.card_class_base(p_f_id integer) RETURNS text
LANGUAGE plpgsql
AS $$
declare
@@ -370,7 +407,7 @@ begin
return n_poste;
end;
$$;
-CREATE FUNCTION category_card_before_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.category_card_before_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -382,7 +419,7 @@ begin
end;
$$;
-CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric
+CREATE FUNCTION comptaproc.check_balance(p_grpt integer) RETURNS numeric
LANGUAGE plpgsql
AS $$
declare
@@ -418,27 +455,37 @@ begin
return 0;
end;
$$;
-CREATE FUNCTION check_periode() RETURNS trigger
+CREATE FUNCTION comptaproc.check_periode() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
nPeriode int;
+ nExerciceLabel int;
begin
-if periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) <> -1 then
- nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) ;
- raise info 'Overlap periode start % periode %',NEW.p_start,nPeriode;
- return null;
-end if;
+ nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id);
+ if nPeriode <> -1 then
+ raise info 'Overlap periode start % periode %',NEW.p_start,nPeriode;
+ return null;
+ end if;
+ if new.p_exercice_label is null or trim (new.p_exercice_label ) = ''
then
+ new.p_exercice_label := new.p_exercice;
+ end if;
+ select count(*) into nExerciceLabel
+ from parm_periode
+ where
+ (p_exercice =new.p_exercice and p_exercice_label <>
new.p_exercice_label)
+ or
+ (p_exercice <> new.p_exercice and p_exercice_label =
new.p_exercice_label);
+
+ if nExerciceLabel > 0 then
+ raise exception 'a label cannot be on two exercices';
+ return null;
+ end if;
-if periode_exist(to_char(NEW.p_end,'DD.MM.YYYY'),NEW.p_id) <> -1 then
- nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) ;
- raise info 'Overlap periode end % periode %',NEW.p_end,nPeriode;
- return null;
-end if;
return NEW;
end;
$$;
-CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text)
RETURNS integer
+CREATE FUNCTION comptaproc.correct_sequence(p_sequence text, p_col text,
p_table text) RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -469,7 +516,7 @@ return 0;
end;
$$;
-CREATE FUNCTION create_missing_sequence() RETURNS integer
+CREATE FUNCTION comptaproc.create_missing_sequence() RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -492,7 +539,7 @@ return 0;
end;
$$;
-CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void
+CREATE FUNCTION comptaproc.drop_index(p_constraint character varying) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -504,7 +551,7 @@ begin
end if;
end;
$$;
-CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void
+CREATE FUNCTION comptaproc.drop_it(p_constraint character varying) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -516,7 +563,7 @@ begin
end if;
end;
$$;
-CREATE FUNCTION extension_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.extension_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -543,7 +590,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.fiche_account_parent(p_f_id integer) RETURNS
public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -556,7 +603,7 @@ begin
return ret;
end;
$$;
-CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void
+CREATE FUNCTION comptaproc.fiche_attribut_synchro(p_fd_id integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -578,7 +625,7 @@ begin
close list_missing;
end;
$$;
-CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.fiche_def_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -589,31 +636,41 @@ if position (',' in NEW.fd_class_base) != 0 then
end if;
return NEW;
end;$$;
-CREATE FUNCTION fiche_detail_qcode_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.fiche_detail_check() RETURNS trigger
LANGUAGE plpgsql
AS $$
-declare
- i record;
-begin
- if NEW.ad_id=23 and NEW.ad_value != OLD.ad_value then
- RAISE NOTICE 'new qcode [%] old qcode
[%]',NEW.ad_value,OLD.ad_value;
- update jrnx set j_qcode=NEW.ad_value where j_qcode =
OLD.ad_value;
- update op_predef_detail set opd_poste=NEW.ad_value where
opd_poste=OLD.ad_value;
- raise notice 'TRG fiche_detail update op_predef_detail set
opd_poste=% where opd_poste=%;',NEW.ad_value,OLD.ad_value;
- for i in select ad_id from attr_def where ad_type = 'card' or
ad_id=25 loop
- update fiche_detail set ad_value=NEW.ad_value where
ad_value=OLD.ad_value and ad_id=i.ad_id;
- RAISE NOTICE 'change for ad_id [%] ',i.ad_id;
- if i.ad_id=19 then
- RAISE NOTICE 'Change in stock_goods OLD[%] by
NEW[%]',OLD.ad_value,NEW.ad_value;
- update stock_goods set sg_code=NEW.ad_value
where sg_code=OLD.ad_value;
- end if;
+ BEGIN
+ if new.ad_id = 23 and coalesce (new.ad_value,'') = '' then
+ raise exception 'QUICKCODE can not be empty';
+ end if;
+ if new.ad_id = 1 and coalesce (new.ad_value,'') = '' then
+ raise exception 'NAME can not be empty';
+ end if;
+ return new;
+ END;
- end loop;
- end if;
-return NEW;
+$$;
+CREATE FUNCTION comptaproc.fiche_detail_check_qcode() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+declare
+ i record;
+begin
+ if NEW.ad_id=23 and NEW.ad_value != OLD.ad_value then
+ update jrnx set j_qcode=NEW.ad_value where j_qcode = OLD.ad_value;
+ update op_predef_detail set opd_poste=NEW.ad_value where
opd_poste=OLD.ad_value;
+ for i in select ad_id from attr_def where ad_type = 'card' or ad_id=25
loop
+ update fiche_detail set ad_value=NEW.ad_value where
ad_value=OLD.ad_value and ad_id=i.ad_id;
+ if i.ad_id=19 then
+ update stock_goods set sg_code=NEW.ad_value where
sg_code=OLD.ad_value;
+ end if;
+
+ end loop;
+ end if;
+ return NEW;
end;
$$;
-CREATE FUNCTION fill_quant_fin() RETURNS void
+CREATE FUNCTION comptaproc.fill_quant_fin() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -767,7 +824,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text
+CREATE FUNCTION comptaproc.find_pcm_type(pp_value public.account_type) RETURNS
text
LANGUAGE plpgsql
AS $$
declare
@@ -777,9 +834,23 @@ declare
begin
str_value:=pp_value;
nLength:=length(str_value::text);
+
while nLength > 0 loop
select p_type into str_type from parm_poste where
p_value=str_value;
if FOUND then
+ raise info 'Type of %s is %s',str_value,str_type;
+ return str_type;
+ end if;
+ nLength:=nLength-1;
+ str_value:=substring(str_value::text from 1 for
nLength)::account_type;
+ end loop;
+ str_value := pp_value;
+ nLength:=length(str_value::text);
+ str_value:=substring(str_value::text from 1 for nLength)::account_type;
+ while nLength > 0 loop
+ select pcm_type into str_type from tmp_pcmn tp where
pcm_val=str_value;
+ if FOUND then
+ raise info 'Type of %s is %s',str_value,str_type;
return str_type;
end if;
nLength:=nLength-1;
@@ -788,7 +859,7 @@ begin
return 'CON';
end;
$$;
-CREATE FUNCTION find_periode(p_date text) RETURNS integer
+CREATE FUNCTION comptaproc.find_periode(p_date text) RETURNS integer
LANGUAGE plpgsql
AS $$
@@ -809,7 +880,7 @@ end if;
return n_p_id;
end;$$;
-CREATE FUNCTION format_account(p_account public.account_type) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.format_account(p_account public.account_type)
RETURNS public.account_type
LANGUAGE plpgsql
AS $_$
@@ -830,14 +901,68 @@ $_$;
-COMMENT ON FUNCTION format_account(p_account public.account_type) IS 'format
the accounting :
+COMMENT ON FUNCTION comptaproc.format_account(p_account public.account_type)
IS 'format the accounting :
- upper case
- remove space and special char.
';
-CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint
+CREATE FUNCTION comptaproc.format_quickcode(p_qcode text) RETURNS text
+ LANGUAGE plpgsql
+ AS $_$
+declare
+ tText text;
+BEGIN
+ tText := lower(trim(p_qcode));
+ tText := replace(tText,' ','');
+ tText:= translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
+ tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+
+ return upper(tText);
+END;
+$_$;
+
+
+
+COMMENT ON FUNCTION comptaproc.format_quickcode(p_qcode text) IS 'Put in upper
case and remove invalid char';
+
+
+
+CREATE FUNCTION comptaproc.four_upper_letter() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ new.dc_code=transform_to_code(new.dc_code);
+ new.dc_code:=substr(new.dc_code,1,4);
+ return new;
+END;
+$$;
+CREATE FUNCTION comptaproc.get_follow_up_tree(action_gestion_id integer)
RETURNS SETOF integer
+ LANGUAGE plpgsql
+ AS $$
+declare
+ i int;
+ x int;
+ e int;
+begin
+ for x in select aga_least
+ from action_gestion_related
+ where
+ aga_greatest = action_gestion_id
+ loop
+ return next x;
+
+ for e in select * from comptaproc.get_follow_up_tree(x)
+ loop
+ return next e;
+ end loop;
+
+ end loop;
+ return;
+end;
+$$;
+CREATE FUNCTION comptaproc.get_letter_jnt(a bigint) RETURNS bigint
LANGUAGE plpgsql
AS $$
declare
@@ -853,7 +978,7 @@ begin
return nResult;
end;
$$;
-CREATE FUNCTION get_menu_dependency(profile_menu_id integer) RETURNS SETOF
integer
+CREATE FUNCTION comptaproc.get_menu_dependency(profile_menu_id integer)
RETURNS SETOF integer
LANGUAGE plpgsql
AS $$
declare
@@ -877,7 +1002,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION get_menu_tree(p_code text, p_profile integer) RETURNS SETOF
public.menu_tree
+CREATE FUNCTION comptaproc.get_menu_tree(p_code text, p_profile integer)
RETURNS SETOF public.menu_tree
LANGUAGE plpgsql
AS $$
declare
@@ -908,7 +1033,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF
public.account_type
+CREATE FUNCTION comptaproc.get_pcm_tree(source public.account_type) RETURNS
SETOF public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -927,7 +1052,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION get_profile_menu(p_profile integer) RETURNS SETOF
public.menu_tree
+CREATE FUNCTION comptaproc.get_profile_menu(p_profile integer) RETURNS SETOF
public.menu_tree
LANGUAGE plpgsql
AS $$
declare
@@ -948,7 +1073,7 @@ loop
return;
end;
$$;
-CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.group_analytic_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -960,7 +1085,7 @@ name:=replace(name,' ','');
NEW.ga_id:=name;
return NEW;
end;$$;
-CREATE FUNCTION group_analytique_del() RETURNS trigger
+CREATE FUNCTION comptaproc.group_analytique_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -968,7 +1093,7 @@ update poste_analytique set ga_id=null
where ga_id=OLD.ga_id;
return OLD;
end;$$;
-CREATE FUNCTION html_quote(p_string text) RETURNS text
+CREATE FUNCTION comptaproc.html_quote(p_string text) RETURNS text
LANGUAGE plpgsql
AS $$
declare
@@ -980,7 +1105,7 @@ begin
r:=replace(r,'''','"');
return r;
end;$$;
-CREATE FUNCTION info_def_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.info_def_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -999,7 +1124,7 @@ row_info_def.id_type:=str_type;
return row_info_def;
end;
$$;
-CREATE FUNCTION insert_jrnx(p_date character varying, p_montant numeric,
p_poste public.account_type, p_grpt integer, p_jrn_def integer, p_debit
boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment text)
RETURNS void
+CREATE FUNCTION comptaproc.insert_jrnx(p_date character varying, p_montant
numeric, p_poste public.account_type, p_grpt integer, p_jrn_def integer,
p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment
text) RETURNS void
LANGUAGE plpgsql
AS $$
begin
@@ -1032,7 +1157,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION insert_quant_purchase(p_internal text, p_j_id numeric, p_fiche
character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code
integer, p_nd_amount numeric, p_nd_tva numeric, p_nd_tva_recup numeric,
p_dep_priv numeric, p_client character varying, p_tva_sided numeric,
p_price_unit numeric) RETURNS void
+CREATE FUNCTION comptaproc.insert_quant_purchase(p_internal text, p_j_id
numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat
numeric, p_vat_code integer, p_nd_amount numeric, p_nd_tva numeric,
p_nd_tva_recup numeric, p_dep_priv numeric, p_client character varying,
p_tva_sided numeric, p_price_unit numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -1042,7 +1167,7 @@ declare
fid_good_account account_type;
n_dep_priv numeric;
begin
- n_dep_priv := 0;
+ n_dep_priv := p_dep_priv;
select p_value into account_priv from parm_code where
p_code='DEP_PRIV';
select f_id into fid_client from
fiche_detail where ad_id=23 and ad_value=upper(trim(p_client));
@@ -1085,8 +1210,8 @@ begin
p_price_unit);
return;
end;
- $$;
-CREATE FUNCTION insert_quant_sold(p_internal text, p_jid numeric, p_fiche
character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code
integer, p_client character varying, p_tva_sided numeric, p_price_unit numeric)
RETURNS void
+$$;
+CREATE FUNCTION comptaproc.insert_quant_sold(p_internal text, p_jid numeric,
p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric,
p_vat_code integer, p_client character varying, p_tva_sided numeric,
p_price_unit numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -1105,73 +1230,66 @@ begin
return;
end;
$$;
-CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer
+CREATE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text)
RETURNS integer
LANGUAGE plpgsql
- AS $_$
- declare
- ns integer;
- nExist integer;
- tText text;
- tBase text;
- tName text;
- nCount Integer;
- nDuplicate Integer;
- begin
- tText := lower(trim(tav_text));
- tText := replace(tText,' ','');
- tText:= translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- nDuplicate := 0;
- tBase := tText;
- loop
- -- take the next sequence
- select nextval('s_jnt_fic_att_value') into ns;
- if length (tText) = 0 or tText is null then
- select count(*) into nCount from fiche_detail where
f_id=nf_id and ad_id=1;
- if nCount = 0 then
- tText := 'FICHE'||ns::text;
- else
- select ad_value into tName from fiche_detail
where f_id=nf_id and ad_id=1;
-
- tName := lower(trim(tName));
- tName := substr(tName,1,6);
- tName := replace(tName,' ','');
- tName:= translate(tName,E'
$€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tName :=
translate(tName,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- tBase := tName;
- if nDuplicate = 0 then
- tText := tName;
- else
- tText := tName||nDuplicate::text;
- end if;
- end if;
- end if;
- -- av_text already used ?
- select count(*) into nExist
- from fiche_detail
- where
- ad_id=23 and ad_value=upper(tText);
-
- if nExist = 0 then
- exit;
- end if;
- nDuplicate := nDuplicate + 1 ;
- tText := tBase || nDuplicate::text;
-
- if nDuplicate > 9999 then
- raise Exception 'too many duplicate % duplicate#
%',tText,nDuplicate;
- end if;
- end loop;
-
+ AS $$
+declare
+ ns integer;
+ nExist integer;
+ tText text;
+ tBase text;
+ tName text;
+ nCount Integer;
+ nDuplicate Integer;
+begin
+ tText := comptaproc.format_quickcode(tav_text);
+ nDuplicate := 0;
+ tBase := tText;
+ -- take the next sequence
+ select nextval('s_jnt_fic_att_value') into ns;
+ loop
+ if length (tText) = 0 or tText is null then
+ select count(*) into nCount from fiche_detail where f_id=nf_id and
ad_id=1;
+ if nCount = 0 then
+ tBase := 'CRD';
+ else
+ select ad_value into tName from fiche_detail where f_id=nf_id
and ad_id=1;
+ tName := comptaproc.format_quickcode(tName);
+ tName := substr(tName,1,6);
+ tBase := tName;
+ if nDuplicate = 0 then
+ tText := tName;
+ else
+ tText := tBase||nDuplicate::text;
+ end if;
+ end if;
+ end if;
+ if coalesce(tText,'') = '' then
+ tText := 'CRD';
+ end if;
+ -- av_text already used ?
+ select count(*) into nExist
+ from fiche_detail
+ where
+ ad_id=23 and ad_value=tText;
- insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values
(ns,nf_id,23,upper(tText));
- return ns;
- end;
-$_$;
+ if nExist = 0 then
+ exit;
+ end if;
+ nDuplicate := nDuplicate + 1 ;
+ tText := tBase || nDuplicate::text;
+ if nDuplicate > 99999 then
+ raise Exception 'too many duplicate % duplicate#
%',tText,nDuplicate;
+ end if;
+ end loop;
-CREATE FUNCTION is_closed(p_periode integer, p_jrn_def_id integer) RETURNS
boolean
+ insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values
(ns,nf_id,23,upper(tText));
+ return ns;
+end;
+$$;
+CREATE FUNCTION comptaproc.is_closed(p_periode integer, p_jrn_def_id integer)
RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -1194,7 +1312,7 @@ end if;
return false;
end;
$$;
-CREATE FUNCTION jnt_fic_attr_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.jnt_fic_attr_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1209,7 +1327,7 @@ NEW.jnt_order=i_max;
return NEW;
end;
$$;
-CREATE FUNCTION jrn_add_note(p_jrid bigint, p_note text) RETURNS void
+CREATE FUNCTION comptaproc.jrn_add_note(p_jrid bigint, p_note text) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -1232,7 +1350,7 @@ begin
return;
end;
$$;
-CREATE FUNCTION jrn_check_periode() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_check_periode() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1243,38 +1361,51 @@ ljr_def_id jrn.jr_def_id%TYPE;
lreturn jrn%ROWTYPE;
begin
if TG_OP='UPDATE' then
- ljr_tech_per :=OLD.jr_tech_per ;
- NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
- ljr_def_id :=OLD.jr_def_id;
- lreturn :=NEW;
- if NEW.jr_date = OLD.jr_date then
- return NEW;
- end if;
- if comptaproc.is_closed(NEW.jr_tech_per,NEW.jr_def_id) = true then
- raise exception 'Periode fermee';
- end if;
+ ljr_tech_per :=OLD.jr_tech_per ;
+ NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
+ ljr_def_id :=OLD.jr_def_id;
+ lreturn :=NEW;
+ if NEW.jr_date = OLD.jr_date then
+ return NEW;
+ end if;
+ if comptaproc.is_closed(NEW.jr_tech_per,NEW.jr_def_id) = true then
+ raise exception 'Periode fermee';
+ end if;
end if;
if TG_OP='INSERT' then
- NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
- ljr_tech_per :=NEW.jr_tech_per ;
- ljr_def_id :=NEW.jr_def_id;
- lreturn :=NEW;
+ NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
+ ljr_tech_per :=NEW.jr_tech_per ;
+ ljr_def_id :=NEW.jr_def_id;
+ lreturn :=NEW;
end if;
if TG_OP='DELETE' then
- ljr_tech_per :=OLD.jr_tech_per;
- ljr_def_id :=OLD.jr_def_id;
- lreturn :=OLD;
+ ljr_tech_per :=OLD.jr_tech_per;
+ ljr_def_id :=OLD.jr_def_id;
+ lreturn :=OLD;
end if;
-if comptaproc.is_closed (ljr_def_id,ljr_def_id) = true then
- raise exception 'Periode fermee';
+if comptaproc.is_closed (ljr_tech_per,ljr_def_id) = true then
+ raise exception 'Periode fermee';
end if;
return lreturn;
-end;$$;
-CREATE FUNCTION jrn_def_add() RETURNS trigger
+end;
+$$;
+CREATE FUNCTION comptaproc.jrn_currency() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ if new.currency_id is null then
+ new.currency_id := 0;
+ new.currency_rate := 1;
+ new.currency_rate_ref := 1;
+ end if;
+ return new;
+end;
+$$;
+CREATE FUNCTION comptaproc.jrn_def_add() RETURNS trigger
LANGUAGE plpgsql
AS $$begin
execute 'insert into jrn_periode(p_id,jrn_def_id,status) select
p_id,'||NEW.jrn_def_id||',
@@ -1286,7 +1417,7 @@ from
parm_periode ';
return NEW;
end;$$;
-CREATE FUNCTION jrn_def_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_def_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1299,7 +1430,7 @@ if nb <> 0 then
end if;
return OLD;
end;$$;
-CREATE FUNCTION jrn_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1349,7 +1480,7 @@ insert into del_jrn ( jr_id,
return row;
end;
$$;
-CREATE FUNCTION jrnx_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1367,7 +1498,7 @@ insert into del_jrnx(
return row;
end;
$$;
-CREATE FUNCTION jrnx_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1415,7 +1546,7 @@ NEW.f_id:=n_fid;
return NEW;
end;
$$;
-CREATE FUNCTION jrnx_letter_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_letter_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1428,7 +1559,7 @@ delete from jnt_letter
return row;
end;
$$;
-CREATE FUNCTION menu_complete_dependency(n_profile numeric) RETURNS void
+CREATE FUNCTION comptaproc.menu_complete_dependency(n_profile numeric) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -1475,7 +1606,7 @@ begin
end;
$$;
-CREATE FUNCTION opd_limit_description() RETURNS trigger
+CREATE FUNCTION comptaproc.opd_limit_description() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1486,7 +1617,7 @@ CREATE FUNCTION opd_limit_description() RETURNS trigger
return NEW;
end;
$$;
-CREATE FUNCTION periode_exist(p_date text, p_periode_id bigint) RETURNS integer
+CREATE FUNCTION comptaproc.periode_exist(p_date text, p_periode_id bigint)
RETURNS integer
LANGUAGE plpgsql
AS $$
@@ -1509,7 +1640,7 @@ end if;
return n_p_id;
end;$$;
-CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.plan_analytic_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1522,7 +1653,7 @@ begin
return NEW;
end;
$$;
-CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.poste_analytique_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
name text;
@@ -1548,7 +1679,7 @@ if NOT FOUND then
end if;
return NEW;
end;$$;
-CREATE FUNCTION proc_check_balance() RETURNS trigger
+CREATE FUNCTION comptaproc.proc_check_balance() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1565,7 +1696,7 @@ begin
end if;
end;
$$;
-CREATE FUNCTION quant_purchase_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.quant_purchase_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -1576,7 +1707,7 @@ CREATE FUNCTION quant_purchase_ins_upd() RETURNS trigger
return NEW;
end;
$$;
-CREATE FUNCTION quant_sold_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.quant_sold_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -1587,7 +1718,24 @@ CREATE FUNCTION quant_sold_ins_upd() RETURNS trigger
return NEW;
end;
$$;
-CREATE FUNCTION t_document_modele_validate() RETURNS trigger
+CREATE FUNCTION comptaproc.set_tech_user() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+declare
+ /* variable */
+ noalyss_user text;
+begin
+ new.tech_user := current_setting('noalyss.user_login');
+ new.tech_date := now();
+ return NEW;
+
+exception when others then
+ new.tech_date := now();
+ new.tech_user := current_user;
+ return NEW;
+end ;
+$$;
+CREATE FUNCTION comptaproc.t_document_modele_validate() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1600,7 +1748,7 @@ begin
return modified;
end;
$$;
-CREATE FUNCTION t_document_type_insert() RETURNS trigger
+CREATE FUNCTION comptaproc.t_document_type_insert() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1613,7 +1761,7 @@ end if;
RETURN NEW;
END;
$$;
-CREATE FUNCTION t_document_validate() RETURNS trigger
+CREATE FUNCTION comptaproc.t_document_validate() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1625,7 +1773,7 @@ begin
return modified;
end;
$$;
-CREATE FUNCTION t_jrn_def_description() RETURNS trigger
+CREATE FUNCTION comptaproc.t_jrn_def_description() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1637,7 +1785,7 @@ CREATE FUNCTION t_jrn_def_description() RETURNS trigger
RETURN NEW;
END;
$$;
-CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger
+CREATE FUNCTION comptaproc.t_jrn_def_sequence() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1654,7 +1802,15 @@ nCounter integer;
RETURN NEW;
END;
$$;
-CREATE FUNCTION tmp_pcmn_alphanum_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.t_parameter_extra_code() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ new.pe_code := comptaproc.transform_to_code (new.pe_code);
+ return new;
+end;
+$$;
+CREATE FUNCTION comptaproc.tmp_pcmn_alphanum_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1666,7 +1822,7 @@ r_record.pcm_val:=format_account(NEW.pcm_val);
return r_record;
end;
$$;
-CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.tmp_pcmn_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1680,7 +1836,28 @@ end if;
return NEW;
end;
$$;
-CREATE FUNCTION trg_profile_user_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.transform_to_code(p_account text) RETURNS text
+ LANGUAGE plpgsql
+ AS $_$
+
+declare
+
+sResult text;
+
+begin
+sResult := lower(p_account);
+
+sResult := translate(sResult,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+sResult := translate(sResult,E' $€µ£%.+-/\\!(){}(),;&|"#''^<>*','');
+
+return upper(sResult);
+
+end;
+$_$;
+
+
+
+CREATE FUNCTION comptaproc.trg_profile_user_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1691,7 +1868,18 @@ return NEW;
end;
$$;
-CREATE FUNCTION trg_todo_list_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_remove_script_tag() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+
+begin
+
+ NEW.agc_comment_raw:= regexp_replace(NEW.agc_comment_raw, '<script',
'scritp', 'i');
+ return NEW;
+
+end;
+$$;
+CREATE FUNCTION comptaproc.trg_todo_list_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1702,7 +1890,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION trg_todo_list_shared_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_todo_list_shared_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1713,7 +1901,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION trg_user_sec_act_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_user_sec_act_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1724,7 +1912,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION trg_user_sec_jrn_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_user_sec_jrn_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1735,7 +1923,7 @@ return NEW;
end;
$$;
-CREATE FUNCTION trim_cvs_quote() RETURNS trigger
+CREATE FUNCTION comptaproc.trim_cvs_quote() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1750,7 +1938,7 @@ begin
return modified;
end;
$$;
-CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger
+CREATE FUNCTION comptaproc.trim_space_format_csv_banque() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1768,7 +1956,7 @@ begin
return modified;
end;
$$;
-CREATE FUNCTION tva_delete(integer) RETURNS void
+CREATE FUNCTION comptaproc.tva_delete(integer) RETURNS void
LANGUAGE plpgsql
AS $_$
declare
@@ -1794,7 +1982,7 @@ $_$;
-CREATE FUNCTION tva_insert(text, numeric, text, text, integer) RETURNS integer
+CREATE FUNCTION comptaproc.tva_insert(text, numeric, text, text, integer)
RETURNS integer
LANGUAGE plpgsql
AS $_$
declare
@@ -1831,7 +2019,7 @@ $_$;
-CREATE FUNCTION tva_modify(integer, text, numeric, text, text, integer)
RETURNS integer
+CREATE FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text,
integer) RETURNS integer
LANGUAGE plpgsql
AS $_$
declare
@@ -1867,75 +2055,65 @@ $_$;
-CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS
integer
+CREATE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text)
RETURNS integer
LANGUAGE plpgsql
- AS $_$
- declare
- ns integer;
- nExist integer;
- tText text;
- tBase text;
- old_qcode varchar;
- num_rows_jrnx integer;
- num_rows_predef integer;
- begin
- -- get current value
- select ad_value into old_qcode from fiche_detail where jft_id=njft_id;
- -- av_text didn't change so no update
- if tav_text = upper( trim(old_qcode)) then
- raise notice 'nothing to change % %' , tav_text,old_qcode;
- return 0;
- end if;
-
- tText := trim(lower(tav_text));
- tText := replace(tText,' ','');
- -- valid alpha is [ . : - _ ]
- tText := translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- tText := upper(tText);
- if length ( tText) = 0 or tText is null then
- return 0;
- end if;
-
- ns := njft_id;
- tBase := tText;
- loop
- -- av_text already used ?
- select count(*) into nExist
- from fiche_detail
- where
- ad_id=23 and ad_value=tText
- and jft_id <> njft_id;
-
- if nExist = 0 then
- exit;
- end if;
- if tText = tBase||ns then
- -- take the next sequence
- select nextval('s_jnt_fic_att_value') into ns;
- end if;
- tText :=tBase||ns;
+ AS $$
+declare
+ ns integer;
+ nExist integer;
+ tText text;
+ tBase text;
+ old_qcode varchar;
+ num_rows_jrnx integer;
+ num_rows_predef integer;
+ n_count integer;
+begin
+ n_count := 0;
+ -- get current value
+ select ad_value into old_qcode from fiche_detail where jft_id=njft_id;
+ -- av_text didn't change so no update
+ if tav_text = upper( trim(old_qcode)) then
+ raise notice 'nothing to change % %' , tav_text,old_qcode;
+ return 0;
+ end if;
- end loop;
- update fiche_detail set ad_value = tText where jft_id=njft_id;
+ tText := comptaproc.format_quickcode(tav_text);
- -- update also the contact
- update fiche_detail set ad_value = tText
- where jft_id in
- ( select jft_id
- from fiche_detail
- where ad_id=25 and ad_value=old_qcode);
+ if length ( tText) = 0 or tText is null then
+ return 0;
+ end if;
+ ns := njft_id;
+ tBase := tText;
+ loop
+ -- av_text already used ?
+ select count(*) into nExist
+ from fiche_detail
+ where
+ ad_id=23 and ad_value=tText
+ and jft_id <> njft_id;
- return ns;
- end;
-$_$;
+ if nExist = 0 then
+ exit;
+ end if;
+ tText := tBase || n_count::text;
+ n_count := n_count + 1 ;
+ end loop;
+ update fiche_detail set ad_value = tText where jft_id=njft_id;
-SET search_path = public, pg_catalog;
+ -- update also the contact
+ update fiche_detail set ad_value = tText
+ where jft_id in
+ ( select jft_id
+ from fiche_detail
+ where ad_id in (select ad_id from attr_def where ad_type='card')
and ad_value=old_qcode);
-CREATE FUNCTION bud_card_ins_upd() RETURNS trigger
+ return ns;
+end;
+$$;
+CREATE FUNCTION public.bud_card_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
sCode text;
@@ -1947,7 +2125,7 @@ sCode:=substr(sCode,1,10);
NEW.bc_code:=sCode;
return NEW;
end;$$;
-CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger
+CREATE FUNCTION public.bud_detail_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
mline bud_detail%ROWTYPE;
@@ -1958,7 +2136,7 @@ if mline.po_id = -1 then
end if;
return mline;
end;$$;
-CREATE FUNCTION correct_quant_purchase() RETURNS void
+CREATE FUNCTION public.correct_quant_purchase() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2007,7 +2185,7 @@ end loop;
return;
end;
$$;
-CREATE FUNCTION correct_quant_sale() RETURNS void
+CREATE FUNCTION public.correct_quant_sale() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2056,7 +2234,21 @@ end loop;
return;
end;
$$;
-CREATE FUNCTION modify_menu_system(n_profile numeric) RETURNS void
+CREATE FUNCTION public.isdate(text, text) RETURNS boolean
+ LANGUAGE plpgsql
+ AS $_$
+DECLARE x timestamp;
+BEGIN
+ x := to_date($1,$2);
+ RETURN TRUE;
+EXCEPTION WHEN others THEN
+ RETURN FALSE;
+END;
+$_$;
+
+
+
+CREATE FUNCTION public.modify_menu_system(n_profile numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2123,7 +2315,19 @@ loop
end loop;
end;
$$;
-CREATE FUNCTION upgrade_repo(p_version integer) RETURNS void
+CREATE FUNCTION public.replace_menu_code(code_source text, code_destination
text) RETURNS void
+ LANGUAGE plpgsql
+ AS $$
+begin
+ /*code */
+
+ update bookmark set b_action =
replace(b_action,code_source,code_destination) where b_action ~ code_source;
+ update menu_ref set me_code =code_destination where me_code = code_source;
+ update profile_menu set me_code=code_destination where me_code =
code_source;
+ update profile_menu set me_code_dep=code_destination where me_code_dep =
code_source;
+end ;
+$$;
+CREATE FUNCTION public.upgrade_repo(p_version integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
diff --git a/include/sql/mod1/index.sql b/include/sql/mod1/index.sql
index 92fbbfa23..2028a6960 100644
--- a/include/sql/mod1/index.sql
+++ b/include/sql/mod1/index.sql
@@ -1,33 +1,34 @@
-CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_id);
-CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON fiche_detail USING btree (f_id,
ad_id);
-CREATE INDEX fk_action_person_action_gestion ON action_person USING btree
(ag_id);
-CREATE INDEX fk_action_person_fiche ON action_person USING btree (f_id);
-CREATE INDEX fk_stock_good_repository_r_id ON stock_goods USING btree (r_id);
-CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id);
-CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id);
-CREATE INDEX fki_f_end_date ON forecast USING btree (f_end_date);
-CREATE INDEX fki_f_start_date ON forecast USING btree (f_start_date);
-CREATE INDEX fki_jrn_jr_grpt_id ON jrn USING btree (jr_grpt_id);
-CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id);
-CREATE INDEX fki_jrnx_j_grpt ON jrnx USING btree (j_grpt);
-CREATE INDEX fki_profile_menu_me_code ON profile_menu USING btree (me_code);
-CREATE INDEX fki_profile_menu_profile ON profile_menu USING btree (p_id);
-CREATE INDEX fki_profile_menu_type_fkey ON profile_menu USING btree
(p_type_display);
-CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal);
-CREATE INDEX jnt_fic_att_value_fd_id_idx ON fiche_detail USING btree (f_id);
-CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id);
-CREATE INDEX jrnx_j_qcode_ix ON jrnx USING btree (j_qcode);
-CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref);
-CREATE INDEX link_action_type_fki ON action_gestion_related USING btree
(aga_type);
-CREATE UNIQUE INDEX qcode_idx ON fiche_detail USING btree (ad_value) WHERE
(ad_id = 23);
-CREATE UNIQUE INDEX qf_jr_id ON quant_fin USING btree (jr_id);
-CREATE UNIQUE INDEX qp_j_id ON quant_purchase USING btree (j_id);
-CREATE UNIQUE INDEX qs_j_id ON quant_sold USING btree (j_id);
-CREATE INDEX quant_purchase_jrn_fki ON quant_purchase USING btree
(qp_internal);
-CREATE INDEX quant_sold_jrn_fki ON quant_sold USING btree (qs_internal);
-CREATE UNIQUE INDEX uj_login_uj_jrn_id ON user_sec_jrn USING btree (uj_login,
uj_jrn_id);
-CREATE UNIQUE INDEX ux_po_name ON poste_analytique USING btree (po_name);
-CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id);
-CREATE INDEX x_mt ON jrn USING btree (jr_mt);
-CREATE UNIQUE INDEX x_periode ON parm_periode USING btree (p_start, p_end);
-CREATE INDEX x_poste ON jrnx USING btree (j_poste);
+CREATE UNIQUE INDEX fd_id_ad_id_x ON public.jnt_fic_attr USING btree (fd_id,
ad_id);
+CREATE INDEX fiche_detail_attr_ix ON public.fiche_detail USING btree (ad_id);
+CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON public.fiche_detail USING btree
(f_id, ad_id);
+CREATE INDEX fk_action_person_action_gestion ON public.action_person USING
btree (ag_id);
+CREATE INDEX fk_action_person_fiche ON public.action_person USING btree (f_id);
+CREATE INDEX fk_stock_good_repository_r_id ON public.stock_goods USING btree
(r_id);
+CREATE INDEX fk_stock_goods_f_id ON public.stock_goods USING btree (f_id);
+CREATE INDEX fk_stock_goods_j_id ON public.stock_goods USING btree (j_id);
+CREATE INDEX fki_f_end_date ON public.forecast USING btree (f_end_date);
+CREATE INDEX fki_f_start_date ON public.forecast USING btree (f_start_date);
+CREATE INDEX fki_jrn_jr_grpt_id ON public.jrn USING btree (jr_grpt_id);
+CREATE INDEX fki_jrnx_f_id ON public.jrnx USING btree (f_id);
+CREATE INDEX fki_jrnx_j_grpt ON public.jrnx USING btree (j_grpt);
+CREATE INDEX fki_profile_menu_me_code ON public.profile_menu USING btree
(me_code);
+CREATE INDEX fki_profile_menu_profile ON public.profile_menu USING btree
(p_id);
+CREATE INDEX fki_profile_menu_type_fkey ON public.profile_menu USING btree
(p_type_display);
+CREATE INDEX idx_qs_internal ON public.quant_sold USING btree (qs_internal);
+CREATE INDEX jnt_fic_att_value_fd_id_idx ON public.fiche_detail USING btree
(f_id);
+CREATE INDEX jnt_fic_attr_fd_id_idx ON public.jnt_fic_attr USING btree (fd_id);
+CREATE INDEX jrnx_j_qcode_ix ON public.jrnx USING btree (j_qcode);
+CREATE UNIQUE INDEX k_ag_ref ON public.action_gestion USING btree (ag_ref);
+CREATE INDEX link_action_type_fki ON public.action_gestion_related USING btree
(aga_type);
+CREATE UNIQUE INDEX qcode_idx ON public.fiche_detail USING btree (ad_value)
WHERE (ad_id = 23);
+CREATE UNIQUE INDEX qf_jr_id ON public.quant_fin USING btree (jr_id);
+CREATE UNIQUE INDEX qp_j_id ON public.quant_purchase USING btree (j_id);
+CREATE UNIQUE INDEX qs_j_id ON public.quant_sold USING btree (j_id);
+CREATE INDEX quant_purchase_jrn_fki ON public.quant_purchase USING btree
(qp_internal);
+CREATE INDEX quant_sold_jrn_fki ON public.quant_sold USING btree (qs_internal);
+CREATE UNIQUE INDEX uj_login_uj_jrn_id ON public.user_sec_jrn USING btree
(uj_login, uj_jrn_id);
+CREATE UNIQUE INDEX ux_po_name ON public.poste_analytique USING btree
(po_name);
+CREATE UNIQUE INDEX x_jrn_jr_id ON public.jrn USING btree (jr_id);
+CREATE INDEX x_mt ON public.jrn USING btree (jr_mt);
+CREATE UNIQUE INDEX x_periode ON public.parm_periode USING btree (p_start,
p_end);
+CREATE INDEX x_poste ON public.jrnx USING btree (j_poste);
diff --git a/include/sql/mod1/make-sql b/include/sql/mod1/make-sql
index 9f1c0a78b..b5af61be6 100755
--- a/include/sql/mod1/make-sql
+++ b/include/sql/mod1/make-sql
@@ -12,33 +12,7 @@ psql -X $TEMPLATE -c "delete from user_local_pref"
pg_dump -O -U dany -s $TEMPLATE|grep -v "COMMENT ON SCHEMA public IS 'Standard
public schema';" |sed "/^--/d" > schema.sql
sed -i -e "/COMMENT ON EXTENSION/d" schema.sql
sed -i -e "/CREATE EXTENSION/d" schema.sql
-awk '/SEQUENCE/,/;/ { print $0;}' < schema.sql > sequence.sql
-awk '/CREATE DOMAIN/,/;/ { print $0;}' < schema.sql > table.sql
-awk '/CREATE TABLE/,/;/ { print $0;}' < schema.sql >> table.sql
-awk '/CREATE VIEW/,/;/ { print $0;}' < schema.sql > view.sql
-awk '/INDEX/,/;/ { print $0;}' < schema.sql > index.sql
-(
-echo " SET client_encoding = 'utf8';"
-echo " SET check_function_bodies = false;"
-echo " SET client_min_messages = warning;"
-echo "SET search_path = public, pg_catalog;"
-)> constraint.sql
-
-awk '/ALTER TABLE/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/CREATE TRIGGER/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/COMMENT ON CONSTRAINT/,/;/ { print $0;}' < schema.sql >> constraint.sql
-awk '/COMMENT ON TRIGGER/,/;/ { print $0;}' < schema.sql >> constraint.sql
-
-# function in XML
-## awk 'BEGIN{print "<PROCEDURES>";} /CREATE FUNCTION/,/\$\$;/ { if (/CREATE
FUNCTION/) {print "<procedure>";} if (/\$\$;/) {print "</procedure>";} print
$0;} END { print "</PROCEDURES>";}' < schema.sql
-awk '/CREATE FUNCTION/,/\$\$;/ { print $0;}' < schema.sql > function.sql
-awk '/COMMENT/,/;/ {print $0;}' < schema.sql > comment.sql
-
-sed -i -e "/REVOKE /d" -e "/GRANT /d" -e "/ALTER TABLE.*/d" -e "/ADD
CONSTRAINT/d" -e "/CREATE PROCEDURAL/d" -e "/CREATE TRIGGER/d" -e "/COMMENT ON
CONSTRAINT/d" -e "/COMMENT ON TRIGGER/d" schema.sql
-
-
-grep setval schema.sql >> sequence.sql
echo "set search_path = public,comptaproc,pg_catalog ;" > data.sql
pg_dump -O -U dany --data-only --column-inserts -O ${TEMPLATE}|sed "/^--/d" |
sed -e "/SET search_path/d" >> data.sql
diff --git a/include/sql/mod1/schema.sql b/include/sql/mod1/schema.sql
index 6a0d2abc1..fbb43b7b4 100644
--- a/include/sql/mod1/schema.sql
+++ b/include/sql/mod1/schema.sql
@@ -1,28 +1,26 @@
+
SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
+SET xmloption = content;
SET client_min_messages = warning;
+SET row_security = off;
CREATE SCHEMA comptaproc;
+CREATE DOMAIN public.account_type AS character varying(40);
-
-
-SET search_path = public, pg_catalog;
-
-
-CREATE DOMAIN account_type AS character varying(40);
-
-
-
-CREATE TYPE anc_table_account_type AS (
+CREATE TYPE public.anc_table_account_type AS (
po_id bigint,
pa_id bigint,
po_name text,
@@ -34,7 +32,7 @@ CREATE TYPE anc_table_account_type AS (
-CREATE TYPE anc_table_card_type AS (
+CREATE TYPE public.anc_table_card_type AS (
po_id bigint,
pa_id bigint,
po_name text,
@@ -47,37 +45,36 @@ CREATE TYPE anc_table_card_type AS (
-CREATE TYPE menu_tree AS (
+CREATE TYPE public.menu_tree AS (
code text,
description text
);
-SET search_path = comptaproc, pg_catalog;
-
-CREATE FUNCTION account_add(p_id public.account_type, p_name character
varying) RETURNS text
+CREATE FUNCTION comptaproc.account_add(p_id public.account_type, p_name
character varying) RETURNS text
LANGUAGE plpgsql
AS $$
declare
- nParent tmp_pcmn.pcm_val_parent%type;
- nCount integer;
- sReturn text;
+ nParent tmp_pcmn.pcm_val_parent%type;
+ nCount integer;
+ sReturn text;
begin
- sReturn:= format_account(p_id);
- select count(*) into nCount from tmp_pcmn where pcm_val=sReturn;
- if nCount = 0 then
- nParent=account_parent(p_id);
- insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent)
- values (p_id, p_name,nParent) returning pcm_val into
sReturn;
- end if;
-return sReturn;
+ -- patch 189
+ sReturn:= format_account(p_id);
+ select count(*) into nCount from tmp_pcmn where pcm_val=sReturn;
+ if nCount = 0 then
+ nParent=account_parent(p_id);
+ insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent)
+ values (p_id, p_name,nParent) returning pcm_val into sReturn;
+ end if;
+ return sReturn;
end ;
$$;
-CREATE FUNCTION account_alphanum() RETURNS boolean
+CREATE FUNCTION comptaproc.account_alphanum() RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -94,7 +91,7 @@ $$;
-CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean
+CREATE FUNCTION comptaproc.account_auto(p_fd_id integer) RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -111,145 +108,176 @@ $$;
-CREATE FUNCTION account_compute(p_f_id integer) RETURNS public.account_type
+CREATE FUNCTION comptaproc.account_compute(p_f_id integer) RETURNS
public.account_type
LANGUAGE plpgsql
AS $$
declare
- class_base fiche_def.fd_class_base%type;
- maxcode numeric;
- sResult text;
- bAlphanum bool;
- sName text;
+ class_base fiche_def.fd_class_base%type;
+ maxcode numeric;
+ sResult account_type;
+ bAlphanum bool;
+ sName text;
+ nCount integer;
+ sNumber text;
begin
- select fd_class_base into class_base
- from
- fiche_def join fiche using (fd_id)
- where
- f_id=p_f_id;
- raise notice 'account_compute class base %',class_base;
- bAlphanum := account_alphanum();
- if bAlphanum = false then
- raise info 'account_compute : Alphanum is false';
- select count (pcm_val) into maxcode from tmp_pcmn where
pcm_val_parent = class_base;
- if maxcode = 0 then
- maxcode:=class_base::numeric;
- else
- select max (pcm_val) into maxcode from tmp_pcmn where
pcm_val_parent = class_base;
- maxcode:=maxcode::numeric;
- end if;
- if maxcode::text = class_base then
- maxcode:=class_base::numeric*1000;
- end if;
- maxcode:=maxcode+1;
- raise notice 'account_compute Max code %',maxcode;
- sResult:=maxcode::account_type;
- else
- raise info 'account_compute : Alphanum is true';
- -- if alphanum, use name
- select ad_value into sName from fiche_detail where f_id=p_f_id
and ad_id=1;
- raise info 'name is %',sName;
- if sName is null then
- raise exception 'Cannot compute an accounting without
the name of the card for %',p_f_id;
- end if;
- sResult := class_base||sName;
- sResult := substr(sResult,1,40);
- raise info 'Result is %',sResult;
- end if;
- return sResult::account_type;
+ -- patch 189
+ select fd_class_base into class_base
+ from
+ fiche_def join fiche using (fd_id)
+ where
+ f_id=p_f_id;
+
+ bAlphanum := account_alphanum();
+ if bAlphanum = false then
+ select max (pcm_val::numeric) into maxcode
+ from tmp_pcmn
+ where pcm_val_parent = class_base and pcm_val !~* '[[:alpha:]]' ;
+ if maxcode is null or length(maxcode::text) < length(class_base)+4
then
+ maxcode:=class_base::numeric*10000+1;
+ else
+ select max (pcm_val::numeric) into maxcode
+ from tmp_pcmn
+ where pcm_val !~* '[[:alpha:]]'
+ and pcm_val_parent = class_base
+ and substr(pcm_val::text,1,length(class_base))=class_base;
+
+ sNumber := substr(maxcode::text,length(class_base)+1);
+ nCount := sNumber::numeric+1;
+ sNumber := lpad (nCount::text,4,'0');
+
+ maxcode:=class_base||sNumber;
+ end if;
+ sResult:=maxcode::account_type;
+ else
+ -- if alphanum, use name
+ select ad_value into sName from fiche_detail where f_id=p_f_id and
ad_id=1;
+ if sName is null then
+ raise exception 'Cannot compute an accounting without the name of
the card for %',p_f_id;
+ end if;
+ sResult := account_compute_alpha(class_base,sName);
+ end if;
+ return sResult;
end;
$$;
-CREATE FUNCTION account_insert(p_f_id integer, p_account text) RETURNS text
+CREATE FUNCTION comptaproc.account_compute_alpha(p_class text, p_name text)
RETURNS public.account_type
LANGUAGE plpgsql
AS $$
declare
- nParent tmp_pcmn.pcm_val_parent%type;
- sName varchar;
- sNew tmp_pcmn.pcm_val%type;
- bAuto bool;
- nFd_id integer;
- sClass_Base fiche_def.fd_class_base%TYPE;
- nCount integer;
- first text;
- second text;
- s_account text;
+ sResult account_type;
+ sAccount account_type;
+ sFormatedAccount account_type;
+ nCount int;
+ idx int :=0;
begin
+ sFormatedAccount := comptaproc.format_account(p_name);
+
+ sAccount := p_class||substring(sFormatedAccount for 5);
+ nCount := 0;
+ loop
+ select count(*) into nCount from tmp_pcmn where pcm_val =
comptaproc.format_account(sAccount);
+
+ exit when nCount = 0;
+ idx := idx + 1;
+ sAccount := p_class || substring(sFormatedAccount for 5)||idx::text;
+ end loop;
+ sResult := comptaproc.format_account(sAccount);
+ return sResult;
+end;
+$$;
- if p_account is not null and length(trim(p_account)) != 0 then
- -- if there is coma in p_account, treat normally
- if position (',' in p_account) = 0 then
- raise info 'p_account is not empty';
- s_account := substr( p_account,1 , 40);
- select count(*) into nCount from tmp_pcmn
where pcm_val=s_account::account_type;
- raise notice 'found in tmp_pcm %',nCount;
- if nCount !=0 then
- raise info 'this account exists in
tmp_pcmn ';
- perform
attribut_insert(p_f_id,5,s_account);
- else
- -- account doesn't exist, create it
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
-
nParent:=account_parent(s_account::account_type);
- insert into
tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values
(s_account::account_type,sName,nParent);
- perform
attribut_insert(p_f_id,5,s_account);
- end if;
- else
- raise info 'presence of a comma';
- -- there is 2 accounts separated by a comma
- first := split_part(p_account,',',1);
- second := split_part(p_account,',',2);
- -- check there is no other coma
- raise info 'first value % second value %', first, second;
-
- if position (',' in first) != 0 or position (',' in second) !=
0 then
- raise exception 'Too many comas, invalid account';
- end if;
- perform attribut_insert(p_f_id,5,p_account);
- end if;
- else
- raise info 'A000 : p_account is empty';
- select fd_id into nFd_id from fiche where f_id=p_f_id;
- bAuto:= account_auto(nFd_id);
-
- select fd_class_base into sClass_base from fiche_def where
fd_id=nFd_id;
-raise info 'sClass_Base : %',sClass_base;
- if bAuto = true and sClass_base similar to '[[:digit:]]*' then
- raise info 'account generated automatically';
- sNew:=account_compute(p_f_id);
- raise info 'sNew %', sNew;
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
- nParent:=account_parent(sNew);
- sNew := account_add (sNew,sName);
- perform attribut_insert(p_f_id,5,sNew);
+CREATE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text)
RETURNS text
+ LANGUAGE plpgsql
+ AS $$
+declare
+ nParent tmp_pcmn.pcm_val_parent%type;
+ sName varchar;
+ sNew tmp_pcmn.pcm_val%type;
+ bAuto bool;
+ nFd_id integer;
+ sClass_Base fiche_def.fd_class_base%TYPE;
+ nCount integer;
+ first text;
+ second text;
+ s_account text;
+begin
+ -- patch 189
+ -- accouting is given
+ if p_account is not null and length(trim(p_account)) != 0 then
+ -- if there is coma in p_account, treat normally
+ if position (',' in p_account) = 0 then
+ s_account := format_account(substr( p_account,1 ,
40)::account_type);
+ select count(*) into nCount from tmp_pcmn where
pcm_val=s_account::account_type;
+ if nCount !=0 then
+ perform attribut_insert(p_f_id,5,s_account);
+ else
+ -- account doesn't exist, create it
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ -- retrieve parent account from card
+ select fd_class_base::account_type into nParent from fiche_def
where fd_id=(select fd_id from fiche where f_id=p_f_id);
+ if nParent = null or nParent = '' then
+ nParent:=account_parent(s_account::account_type);
+ end if;
+ insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values
(s_account::account_type,sName,nParent);
+ perform attribut_insert(p_f_id,5,s_account);
- else
- -- if there is an account_base then it is the default
- select fd_class_base::account_type into sNew from
fiche_def join fiche using (fd_id) where f_id=p_f_id;
- if sNew is null or length(trim(sNew)) = 0 then
- raise notice 'count is null';
- perform attribut_insert(p_f_id,5,null);
- else
- perform attribut_insert(p_f_id,5,sNew);
- end if;
- end if;
- end if;
+ end if;
+ return s_account;
+ else
+ -- there is 2 accounts separated by a comma
+ first := split_part(p_account,',',1);
+ second := split_part(p_account,',',2);
+ -- check there is no other coma
+
+ if position (',' in first) != 0 or position (',' in second) != 0
then
+ raise exception 'Too many comas, invalid account';
+ end if;
+ perform attribut_insert(p_f_id,5,p_account);
+
+ end if;
+ return s_account;
+ end if;
+
+ select fd_id into nFd_id from fiche where f_id=p_f_id;
+ bAuto:= account_auto(nFd_id);
+
+ select fd_class_base into sClass_base from fiche_def where fd_id=nFd_id;
+ if bAuto = true and sClass_base similar to '[[:digit:]]*' then
+ sNew:=account_compute(p_f_id);
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ nParent:=sClass_Base::account_type;
+ sNew := account_add (sNew,sName);
+ update tmp_pcmn set pcm_val_parent=nParent where pcm_val=sNew;
+ perform attribut_insert(p_f_id,5,sNew);
+ return sNew;
+ else
+ -- if there is an account_base then it is the default
+ if trim(coalesce(sClass_base::text,'')) = '' then
+ perform attribut_insert(p_f_id,5,null);
+ else
+ perform attribut_insert(p_f_id,5,sClass_base);
+ end if;
+ return sClass_base;
+ end if;
+
+ raise notice 'ai89.account_insert nothing done : error';
-return 0;
end;
$$;
-CREATE FUNCTION account_parent(p_account public.account_type) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.account_parent(p_account public.account_type)
RETURNS public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -283,7 +311,7 @@ $$;
-CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type)
RETURNS integer
+CREATE FUNCTION comptaproc.account_update(p_f_id integer, p_account
public.account_type) RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -298,32 +326,35 @@ begin
if length(trim(p_account)) != 0 then
-- 2 accounts in card separated by comma
if position (',' in p_account) = 0 then
+ p_account := format_account(p_account);
select count(*) into nCount from tmp_pcmn where
pcm_val=p_account;
if nCount = 0 then
- select ad_value into sName from
- fiche_detail
- where
- ad_id=1 and f_id=p_f_id;
- nParent:=account_parent(p_account);
- insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent)
values (p_account,sName,nParent);
- end if;
+ select ad_value into sName from
+ fiche_detail
+ where
+ ad_id=1 and f_id=p_f_id;
+ nParent:=account_parent(p_account);
+ raise notice 'insert into tmp_pcmn %
%',p_account,sName;
+ insert into
tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account,sName,nParent);
+ end if;
else
- raise info 'presence of a comma';
- -- there is 2 accounts separated by a comma
- first := split_part(p_account,',',1);
- second := split_part(p_account,',',2);
- -- check there is no other coma
- raise info 'first value % second value %', first, second;
-
- if position (',' in first) != 0 or position (',' in second) !=
0 then
- raise exception 'Too many comas, invalid account';
- end if;
- -- check that both account are in PCMN
+ raise info 'presence of a comma';
+ -- there is 2 accounts separated by a comma
+ first := split_part(p_account,',',1);
+ second := split_part(p_account,',',2);
+ -- check there is no other coma
+ raise info 'first value % second value %', first,
second;
+
+ if position (',' in first) != 0 or position (',' in
second) != 0 then
+ raise exception 'Too many comas, invalid
account';
+ end if;
+ -- check that both account are in PCMN
end if;
else
-- account is null
update fiche_detail set ad_value=null where f_id=p_f_id and
ad_id=5 ;
+ return 0;
end if;
update fiche_detail set ad_value=p_account where f_id=p_f_id and
ad_id=5 ;
@@ -334,7 +365,7 @@ $$;
-CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.action_gestion_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -347,7 +378,7 @@ $$;
-CREATE FUNCTION action_gestion_related_ins_up() RETURNS trigger
+CREATE FUNCTION comptaproc.action_gestion_related_ins_up() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -371,7 +402,7 @@ $$;
-CREATE FUNCTION anc_correct_tvand() RETURNS void
+CREATE FUNCTION comptaproc.anc_correct_tvand() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -402,19 +433,24 @@ end;
-CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value
character varying) RETURNS void
+CREATE FUNCTION comptaproc.attribut_insert(p_f_id integer, p_ad_id integer,
p_value character varying) RETURNS void
LANGUAGE plpgsql
AS $$
+declare
+ nResult bigint;
begin
- insert into fiche_detail (f_id,ad_id, ad_value) values
(p_f_id,p_ad_id,p_value);
-
+ update fiche_detail set ad_value=p_value where ad_id=p_ad_id and
f_id=p_f_id returning jft_id into nResult;
+ if nResult is null then
+ insert into fiche_detail (f_id,ad_id, ad_value) values
(p_f_id,p_ad_id,p_value);
+ end if;
+
return;
end;
$$;
-CREATE FUNCTION attribute_correct_order() RETURNS void
+CREATE FUNCTION comptaproc.attribute_correct_order() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -437,7 +473,7 @@ $$;
-CREATE FUNCTION card_after_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.card_after_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -451,7 +487,7 @@ $$;
-CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text
+CREATE FUNCTION comptaproc.card_class_base(p_f_id integer) RETURNS text
LANGUAGE plpgsql
AS $$
declare
@@ -470,7 +506,7 @@ $$;
-CREATE FUNCTION category_card_before_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.category_card_before_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -485,7 +521,7 @@ $$;
-CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric
+CREATE FUNCTION comptaproc.check_balance(p_grpt integer) RETURNS numeric
LANGUAGE plpgsql
AS $$
declare
@@ -524,30 +560,40 @@ $$;
-CREATE FUNCTION check_periode() RETURNS trigger
+CREATE FUNCTION comptaproc.check_periode() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
nPeriode int;
+ nExerciceLabel int;
begin
-if periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) <> -1 then
- nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) ;
- raise info 'Overlap periode start % periode %',NEW.p_start,nPeriode;
- return null;
-end if;
+ nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id);
+ if nPeriode <> -1 then
+ raise info 'Overlap periode start % periode %',NEW.p_start,nPeriode;
+ return null;
+ end if;
+ if new.p_exercice_label is null or trim (new.p_exercice_label ) = ''
then
+ new.p_exercice_label := new.p_exercice;
+ end if;
+ select count(*) into nExerciceLabel
+ from parm_periode
+ where
+ (p_exercice =new.p_exercice and p_exercice_label <>
new.p_exercice_label)
+ or
+ (p_exercice <> new.p_exercice and p_exercice_label =
new.p_exercice_label);
+
+ if nExerciceLabel > 0 then
+ raise exception 'a label cannot be on two exercices';
+ return null;
+ end if;
-if periode_exist(to_char(NEW.p_end,'DD.MM.YYYY'),NEW.p_id) <> -1 then
- nPeriode:=periode_exist(to_char(NEW.p_start,'DD.MM.YYYY'),NEW.p_id) ;
- raise info 'Overlap periode end % periode %',NEW.p_end,nPeriode;
- return null;
-end if;
return NEW;
end;
$$;
-CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text)
RETURNS integer
+CREATE FUNCTION comptaproc.correct_sequence(p_sequence text, p_col text,
p_table text) RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -581,11 +627,11 @@ $$;
-COMMENT ON FUNCTION correct_sequence(p_sequence text, p_col text, p_table
text) IS ' Often the primary key is a sequence number and sometimes the value
of the sequence is not synchronized with the primary key ( p_sequence :
sequence name, p_col : col of the pk,p_table : concerned table';
+COMMENT ON FUNCTION comptaproc.correct_sequence(p_sequence text, p_col text,
p_table text) IS ' Often the primary key is a sequence number and sometimes the
value of the sequence is not synchronized with the primary key ( p_sequence :
sequence name, p_col : col of the pk,p_table : concerned table';
-CREATE FUNCTION create_missing_sequence() RETURNS integer
+CREATE FUNCTION comptaproc.create_missing_sequence() RETURNS integer
LANGUAGE plpgsql
AS $$
declare
@@ -611,7 +657,7 @@ $$;
-CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void
+CREATE FUNCTION comptaproc.drop_index(p_constraint character varying) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -626,7 +672,7 @@ $$;
-CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void
+CREATE FUNCTION comptaproc.drop_it(p_constraint character varying) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -641,7 +687,7 @@ $$;
-CREATE FUNCTION extension_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.extension_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -671,7 +717,7 @@ $$;
-CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.fiche_account_parent(p_f_id integer) RETURNS
public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -687,7 +733,7 @@ $$;
-CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void
+CREATE FUNCTION comptaproc.fiche_attribut_synchro(p_fd_id integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -712,7 +758,7 @@ $$;
-CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.fiche_def_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -726,34 +772,47 @@ end;$$;
-CREATE FUNCTION fiche_detail_qcode_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.fiche_detail_check() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+ BEGIN
+ if new.ad_id = 23 and coalesce (new.ad_value,'') = '' then
+ raise exception 'QUICKCODE can not be empty';
+ end if;
+ if new.ad_id = 1 and coalesce (new.ad_value,'') = '' then
+ raise exception 'NAME can not be empty';
+ end if;
+ return new;
+ END;
+
+$$;
+
+
+
+CREATE FUNCTION comptaproc.fiche_detail_check_qcode() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
- i record;
+ i record;
begin
- if NEW.ad_id=23 and NEW.ad_value != OLD.ad_value then
- RAISE NOTICE 'new qcode [%] old qcode
[%]',NEW.ad_value,OLD.ad_value;
- update jrnx set j_qcode=NEW.ad_value where j_qcode =
OLD.ad_value;
- update op_predef_detail set opd_poste=NEW.ad_value where
opd_poste=OLD.ad_value;
- raise notice 'TRG fiche_detail update op_predef_detail set
opd_poste=% where opd_poste=%;',NEW.ad_value,OLD.ad_value;
- for i in select ad_id from attr_def where ad_type = 'card' or
ad_id=25 loop
- update fiche_detail set ad_value=NEW.ad_value where
ad_value=OLD.ad_value and ad_id=i.ad_id;
- RAISE NOTICE 'change for ad_id [%] ',i.ad_id;
- if i.ad_id=19 then
- RAISE NOTICE 'Change in stock_goods OLD[%] by
NEW[%]',OLD.ad_value,NEW.ad_value;
- update stock_goods set sg_code=NEW.ad_value
where sg_code=OLD.ad_value;
- end if;
-
- end loop;
- end if;
-return NEW;
+ if NEW.ad_id=23 and NEW.ad_value != OLD.ad_value then
+ update jrnx set j_qcode=NEW.ad_value where j_qcode = OLD.ad_value;
+ update op_predef_detail set opd_poste=NEW.ad_value where
opd_poste=OLD.ad_value;
+ for i in select ad_id from attr_def where ad_type = 'card' or ad_id=25
loop
+ update fiche_detail set ad_value=NEW.ad_value where
ad_value=OLD.ad_value and ad_id=i.ad_id;
+ if i.ad_id=19 then
+ update stock_goods set sg_code=NEW.ad_value where
sg_code=OLD.ad_value;
+ end if;
+
+ end loop;
+ end if;
+ return NEW;
end;
$$;
-CREATE FUNCTION fill_quant_fin() RETURNS void
+CREATE FUNCTION comptaproc.fill_quant_fin() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -910,7 +969,7 @@ $$;
-CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text
+CREATE FUNCTION comptaproc.find_pcm_type(pp_value public.account_type) RETURNS
text
LANGUAGE plpgsql
AS $$
declare
@@ -920,9 +979,23 @@ declare
begin
str_value:=pp_value;
nLength:=length(str_value::text);
+
while nLength > 0 loop
select p_type into str_type from parm_poste where
p_value=str_value;
if FOUND then
+ raise info 'Type of %s is %s',str_value,str_type;
+ return str_type;
+ end if;
+ nLength:=nLength-1;
+ str_value:=substring(str_value::text from 1 for
nLength)::account_type;
+ end loop;
+ str_value := pp_value;
+ nLength:=length(str_value::text);
+ str_value:=substring(str_value::text from 1 for nLength)::account_type;
+ while nLength > 0 loop
+ select pcm_type into str_type from tmp_pcmn tp where
pcm_val=str_value;
+ if FOUND then
+ raise info 'Type of %s is %s',str_value,str_type;
return str_type;
end if;
nLength:=nLength-1;
@@ -934,7 +1007,7 @@ $$;
-CREATE FUNCTION find_periode(p_date text) RETURNS integer
+CREATE FUNCTION comptaproc.find_periode(p_date text) RETURNS integer
LANGUAGE plpgsql
AS $$
@@ -958,7 +1031,7 @@ end;$$;
-CREATE FUNCTION format_account(p_account public.account_type) RETURNS
public.account_type
+CREATE FUNCTION comptaproc.format_account(p_account public.account_type)
RETURNS public.account_type
LANGUAGE plpgsql
AS $_$
@@ -979,14 +1052,78 @@ $_$;
-COMMENT ON FUNCTION format_account(p_account public.account_type) IS 'format
the accounting :
+COMMENT ON FUNCTION comptaproc.format_account(p_account public.account_type)
IS 'format the accounting :
- upper case
- remove space and special char.
';
-CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint
+CREATE FUNCTION comptaproc.format_quickcode(p_qcode text) RETURNS text
+ LANGUAGE plpgsql
+ AS $_$
+declare
+ tText text;
+BEGIN
+ tText := lower(trim(p_qcode));
+ tText := replace(tText,' ','');
+ tText:= translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
+ tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+
+ return upper(tText);
+END;
+$_$;
+
+
+
+COMMENT ON FUNCTION comptaproc.format_quickcode(p_qcode text) IS 'Put in upper
case and remove invalid char';
+
+
+
+CREATE FUNCTION comptaproc.four_upper_letter() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ new.dc_code=transform_to_code(new.dc_code);
+ new.dc_code:=substr(new.dc_code,1,4);
+ return new;
+END;
+$$;
+
+
+
+COMMENT ON FUNCTION comptaproc.four_upper_letter() IS 'Cut to the 4 first
letter in uppercase';
+
+
+
+CREATE FUNCTION comptaproc.get_follow_up_tree(action_gestion_id integer)
RETURNS SETOF integer
+ LANGUAGE plpgsql
+ AS $$
+declare
+ i int;
+ x int;
+ e int;
+begin
+ for x in select aga_least
+ from action_gestion_related
+ where
+ aga_greatest = action_gestion_id
+ loop
+ return next x;
+
+ for e in select * from comptaproc.get_follow_up_tree(x)
+ loop
+ return next e;
+ end loop;
+
+ end loop;
+ return;
+end;
+$$;
+
+
+
+CREATE FUNCTION comptaproc.get_letter_jnt(a bigint) RETURNS bigint
LANGUAGE plpgsql
AS $$
declare
@@ -1005,7 +1142,7 @@ $$;
-CREATE FUNCTION get_menu_dependency(profile_menu_id integer) RETURNS SETOF
integer
+CREATE FUNCTION comptaproc.get_menu_dependency(profile_menu_id integer)
RETURNS SETOF integer
LANGUAGE plpgsql
AS $$
declare
@@ -1032,7 +1169,7 @@ $$;
-CREATE FUNCTION get_menu_tree(p_code text, p_profile integer) RETURNS SETOF
public.menu_tree
+CREATE FUNCTION comptaproc.get_menu_tree(p_code text, p_profile integer)
RETURNS SETOF public.menu_tree
LANGUAGE plpgsql
AS $$
declare
@@ -1066,7 +1203,7 @@ $$;
-CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF
public.account_type
+CREATE FUNCTION comptaproc.get_pcm_tree(source public.account_type) RETURNS
SETOF public.account_type
LANGUAGE plpgsql
AS $$
declare
@@ -1088,7 +1225,7 @@ $$;
-CREATE FUNCTION get_profile_menu(p_profile integer) RETURNS SETOF
public.menu_tree
+CREATE FUNCTION comptaproc.get_profile_menu(p_profile integer) RETURNS SETOF
public.menu_tree
LANGUAGE plpgsql
AS $$
declare
@@ -1112,7 +1249,7 @@ $$;
-CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.group_analytic_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1127,7 +1264,7 @@ end;$$;
-CREATE FUNCTION group_analytique_del() RETURNS trigger
+CREATE FUNCTION comptaproc.group_analytique_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -1138,7 +1275,7 @@ end;$$;
-CREATE FUNCTION html_quote(p_string text) RETURNS text
+CREATE FUNCTION comptaproc.html_quote(p_string text) RETURNS text
LANGUAGE plpgsql
AS $$
declare
@@ -1153,11 +1290,11 @@ end;$$;
-COMMENT ON FUNCTION html_quote(p_string text) IS 'remove harmfull HTML char';
+COMMENT ON FUNCTION comptaproc.html_quote(p_string text) IS 'remove harmfull
HTML char';
-CREATE FUNCTION info_def_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.info_def_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1179,7 +1316,7 @@ $$;
-CREATE FUNCTION insert_jrnx(p_date character varying, p_montant numeric,
p_poste public.account_type, p_grpt integer, p_jrn_def integer, p_debit
boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment text)
RETURNS void
+CREATE FUNCTION comptaproc.insert_jrnx(p_date character varying, p_montant
numeric, p_poste public.account_type, p_grpt integer, p_jrn_def integer,
p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment
text) RETURNS void
LANGUAGE plpgsql
AS $$
begin
@@ -1215,7 +1352,7 @@ $$;
-CREATE FUNCTION insert_quant_purchase(p_internal text, p_j_id numeric, p_fiche
character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code
integer, p_nd_amount numeric, p_nd_tva numeric, p_nd_tva_recup numeric,
p_dep_priv numeric, p_client character varying, p_tva_sided numeric,
p_price_unit numeric) RETURNS void
+CREATE FUNCTION comptaproc.insert_quant_purchase(p_internal text, p_j_id
numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat
numeric, p_vat_code integer, p_nd_amount numeric, p_nd_tva numeric,
p_nd_tva_recup numeric, p_dep_priv numeric, p_client character varying,
p_tva_sided numeric, p_price_unit numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -1225,7 +1362,7 @@ declare
fid_good_account account_type;
n_dep_priv numeric;
begin
- n_dep_priv := 0;
+ n_dep_priv := p_dep_priv;
select p_value into account_priv from parm_code where
p_code='DEP_PRIV';
select f_id into fid_client from
fiche_detail where ad_id=23 and ad_value=upper(trim(p_client));
@@ -1268,11 +1405,11 @@ begin
p_price_unit);
return;
end;
- $$;
+$$;
-CREATE FUNCTION insert_quant_sold(p_internal text, p_jid numeric, p_fiche
character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code
integer, p_client character varying, p_tva_sided numeric, p_price_unit numeric)
RETURNS void
+CREATE FUNCTION comptaproc.insert_quant_sold(p_internal text, p_jid numeric,
p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric,
p_vat_code integer, p_client character varying, p_tva_sided numeric,
p_price_unit numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -1294,73 +1431,69 @@ end;
-CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer
+CREATE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text)
RETURNS integer
LANGUAGE plpgsql
- AS $_$
- declare
- ns integer;
- nExist integer;
- tText text;
- tBase text;
- tName text;
- nCount Integer;
- nDuplicate Integer;
- begin
- tText := lower(trim(tav_text));
- tText := replace(tText,' ','');
- tText:= translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- nDuplicate := 0;
- tBase := tText;
- loop
- -- take the next sequence
- select nextval('s_jnt_fic_att_value') into ns;
- if length (tText) = 0 or tText is null then
- select count(*) into nCount from fiche_detail where
f_id=nf_id and ad_id=1;
- if nCount = 0 then
- tText := 'FICHE'||ns::text;
- else
- select ad_value into tName from fiche_detail
where f_id=nf_id and ad_id=1;
-
- tName := lower(trim(tName));
- tName := substr(tName,1,6);
- tName := replace(tName,' ','');
- tName:= translate(tName,E'
$€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tName :=
translate(tName,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- tBase := tName;
- if nDuplicate = 0 then
- tText := tName;
- else
- tText := tName||nDuplicate::text;
- end if;
- end if;
- end if;
- -- av_text already used ?
- select count(*) into nExist
- from fiche_detail
- where
- ad_id=23 and ad_value=upper(tText);
+ AS $$
+declare
+ ns integer;
+ nExist integer;
+ tText text;
+ tBase text;
+ tName text;
+ nCount Integer;
+ nDuplicate Integer;
+begin
+ tText := comptaproc.format_quickcode(tav_text);
+ nDuplicate := 0;
+ tBase := tText;
+ -- take the next sequence
+ select nextval('s_jnt_fic_att_value') into ns;
+ loop
+ if length (tText) = 0 or tText is null then
+ select count(*) into nCount from fiche_detail where f_id=nf_id and
ad_id=1;
+ if nCount = 0 then
+ tBase := 'CRD';
+ else
+ select ad_value into tName from fiche_detail where f_id=nf_id
and ad_id=1;
+ tName := comptaproc.format_quickcode(tName);
+ tName := substr(tName,1,6);
+ tBase := tName;
+ if nDuplicate = 0 then
+ tText := tName;
+ else
+ tText := tBase||nDuplicate::text;
+ end if;
+ end if;
+ end if;
+ if coalesce(tText,'') = '' then
+ tText := 'CRD';
+ end if;
+ -- av_text already used ?
+ select count(*) into nExist
+ from fiche_detail
+ where
+ ad_id=23 and ad_value=tText;
- if nExist = 0 then
- exit;
- end if;
- nDuplicate := nDuplicate + 1 ;
- tText := tBase || nDuplicate::text;
-
- if nDuplicate > 9999 then
- raise Exception 'too many duplicate % duplicate#
%',tText,nDuplicate;
- end if;
- end loop;
+ if nExist = 0 then
+ exit;
+ end if;
+ nDuplicate := nDuplicate + 1 ;
+ tText := tBase || nDuplicate::text;
+ if nDuplicate > 99999 then
+ raise Exception 'too many duplicate % duplicate#
%',tText,nDuplicate;
+ end if;
+ end loop;
- insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values
(ns,nf_id,23,upper(tText));
- return ns;
- end;
-$_$;
+
+ insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values
(ns,nf_id,23,upper(tText));
+ return ns;
+end;
+$$;
-CREATE FUNCTION is_closed(p_periode integer, p_jrn_def_id integer) RETURNS
boolean
+CREATE FUNCTION comptaproc.is_closed(p_periode integer, p_jrn_def_id integer)
RETURNS boolean
LANGUAGE plpgsql
AS $$
declare
@@ -1386,7 +1519,7 @@ $$;
-CREATE FUNCTION jnt_fic_attr_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.jnt_fic_attr_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1404,7 +1537,7 @@ $$;
-CREATE FUNCTION jrn_add_note(p_jrid bigint, p_note text) RETURNS void
+CREATE FUNCTION comptaproc.jrn_add_note(p_jrid bigint, p_note text) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -1430,7 +1563,7 @@ $$;
-CREATE FUNCTION jrn_check_periode() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_check_periode() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1441,41 +1574,57 @@ ljr_def_id jrn.jr_def_id%TYPE;
lreturn jrn%ROWTYPE;
begin
if TG_OP='UPDATE' then
- ljr_tech_per :=OLD.jr_tech_per ;
- NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
- ljr_def_id :=OLD.jr_def_id;
- lreturn :=NEW;
- if NEW.jr_date = OLD.jr_date then
- return NEW;
- end if;
- if comptaproc.is_closed(NEW.jr_tech_per,NEW.jr_def_id) = true then
- raise exception 'Periode fermee';
- end if;
+ ljr_tech_per :=OLD.jr_tech_per ;
+ NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
+ ljr_def_id :=OLD.jr_def_id;
+ lreturn :=NEW;
+ if NEW.jr_date = OLD.jr_date then
+ return NEW;
+ end if;
+ if comptaproc.is_closed(NEW.jr_tech_per,NEW.jr_def_id) = true then
+ raise exception 'Periode fermee';
+ end if;
end if;
if TG_OP='INSERT' then
- NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
- ljr_tech_per :=NEW.jr_tech_per ;
- ljr_def_id :=NEW.jr_def_id;
- lreturn :=NEW;
+ NEW.jr_tech_per :=
comptaproc.find_periode(to_char(NEW.jr_date,'DD.MM.YYYY'));
+ ljr_tech_per :=NEW.jr_tech_per ;
+ ljr_def_id :=NEW.jr_def_id;
+ lreturn :=NEW;
end if;
if TG_OP='DELETE' then
- ljr_tech_per :=OLD.jr_tech_per;
- ljr_def_id :=OLD.jr_def_id;
- lreturn :=OLD;
+ ljr_tech_per :=OLD.jr_tech_per;
+ ljr_def_id :=OLD.jr_def_id;
+ lreturn :=OLD;
end if;
-if comptaproc.is_closed (ljr_def_id,ljr_def_id) = true then
- raise exception 'Periode fermee';
+if comptaproc.is_closed (ljr_tech_per,ljr_def_id) = true then
+ raise exception 'Periode fermee';
end if;
return lreturn;
-end;$$;
+end;
+$$;
+
+
+
+CREATE FUNCTION comptaproc.jrn_currency() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ if new.currency_id is null then
+ new.currency_id := 0;
+ new.currency_rate := 1;
+ new.currency_rate_ref := 1;
+ end if;
+ return new;
+end;
+$$;
-CREATE FUNCTION jrn_def_add() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_def_add() RETURNS trigger
LANGUAGE plpgsql
AS $$begin
execute 'insert into jrn_periode(p_id,jrn_def_id,status) select
p_id,'||NEW.jrn_def_id||',
@@ -1490,7 +1639,7 @@ end;$$;
-CREATE FUNCTION jrn_def_delete() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_def_delete() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1506,7 +1655,7 @@ end;$$;
-CREATE FUNCTION jrn_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrn_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1559,7 +1708,7 @@ $$;
-CREATE FUNCTION jrnx_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1580,7 +1729,7 @@ $$;
-CREATE FUNCTION jrnx_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1631,7 +1780,7 @@ $$;
-CREATE FUNCTION jrnx_letter_del() RETURNS trigger
+CREATE FUNCTION comptaproc.jrnx_letter_del() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1647,7 +1796,7 @@ $$;
-CREATE FUNCTION menu_complete_dependency(n_profile numeric) RETURNS void
+CREATE FUNCTION comptaproc.menu_complete_dependency(n_profile numeric) RETURNS
void
LANGUAGE plpgsql
AS $$
declare
@@ -1697,7 +1846,7 @@ $$;
-CREATE FUNCTION opd_limit_description() RETURNS trigger
+CREATE FUNCTION comptaproc.opd_limit_description() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1711,7 +1860,7 @@ $$;
-CREATE FUNCTION periode_exist(p_date text, p_periode_id bigint) RETURNS integer
+CREATE FUNCTION comptaproc.periode_exist(p_date text, p_periode_id bigint)
RETURNS integer
LANGUAGE plpgsql
AS $$
@@ -1737,7 +1886,7 @@ end;$$;
-CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.plan_analytic_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1753,7 +1902,7 @@ $$;
-CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.poste_analytique_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
name text;
@@ -1782,7 +1931,7 @@ end;$$;
-CREATE FUNCTION proc_check_balance() RETURNS trigger
+CREATE FUNCTION comptaproc.proc_check_balance() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1802,7 +1951,7 @@ $$;
-CREATE FUNCTION quant_purchase_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.quant_purchase_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -1816,7 +1965,7 @@ $$;
-CREATE FUNCTION quant_sold_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.quant_sold_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
begin
@@ -1830,7 +1979,27 @@ $$;
-CREATE FUNCTION t_document_modele_validate() RETURNS trigger
+CREATE FUNCTION comptaproc.set_tech_user() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+declare
+ /* variable */
+ noalyss_user text;
+begin
+ new.tech_user := current_setting('noalyss.user_login');
+ new.tech_date := now();
+ return NEW;
+
+exception when others then
+ new.tech_date := now();
+ new.tech_user := current_user;
+ return NEW;
+end ;
+$$;
+
+
+
+CREATE FUNCTION comptaproc.t_document_modele_validate() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1846,7 +2015,7 @@ $$;
-CREATE FUNCTION t_document_type_insert() RETURNS trigger
+CREATE FUNCTION comptaproc.t_document_type_insert() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1862,7 +2031,7 @@ $$;
-CREATE FUNCTION t_document_validate() RETURNS trigger
+CREATE FUNCTION comptaproc.t_document_validate() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1877,7 +2046,7 @@ $$;
-CREATE FUNCTION t_jrn_def_description() RETURNS trigger
+CREATE FUNCTION comptaproc.t_jrn_def_description() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1892,7 +2061,7 @@ $$;
-CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger
+CREATE FUNCTION comptaproc.t_jrn_def_sequence() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1912,7 +2081,18 @@ $$;
-CREATE FUNCTION tmp_pcmn_alphanum_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.t_parameter_extra_code() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+begin
+ new.pe_code := comptaproc.transform_to_code (new.pe_code);
+ return new;
+end;
+$$;
+
+
+
+CREATE FUNCTION comptaproc.tmp_pcmn_alphanum_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1927,7 +2107,7 @@ $$;
-CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger
+CREATE FUNCTION comptaproc.tmp_pcmn_ins() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -1944,7 +2124,28 @@ $$;
-CREATE FUNCTION trg_profile_user_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.transform_to_code(p_account text) RETURNS text
+ LANGUAGE plpgsql
+ AS $_$
+
+declare
+
+sResult text;
+
+begin
+sResult := lower(p_account);
+
+sResult := translate(sResult,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+sResult := translate(sResult,E' $€µ£%.+-/\\!(){}(),;&|"#''^<>*','');
+
+return upper(sResult);
+
+end;
+$_$;
+
+
+
+CREATE FUNCTION comptaproc.trg_profile_user_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1958,7 +2159,21 @@ $$;
-CREATE FUNCTION trg_todo_list_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_remove_script_tag() RETURNS trigger
+ LANGUAGE plpgsql
+ AS $$
+
+begin
+
+ NEW.agc_comment_raw:= regexp_replace(NEW.agc_comment_raw, '<script',
'scritp', 'i');
+ return NEW;
+
+end;
+$$;
+
+
+
+CREATE FUNCTION comptaproc.trg_todo_list_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1972,7 +2187,7 @@ $$;
-CREATE FUNCTION trg_todo_list_shared_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_todo_list_shared_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -1986,7 +2201,7 @@ $$;
-CREATE FUNCTION trg_user_sec_act_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_user_sec_act_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -2000,7 +2215,7 @@ $$;
-CREATE FUNCTION trg_user_sec_jrn_ins_upd() RETURNS trigger
+CREATE FUNCTION comptaproc.trg_user_sec_jrn_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$
@@ -2014,7 +2229,7 @@ $$;
-CREATE FUNCTION trim_cvs_quote() RETURNS trigger
+CREATE FUNCTION comptaproc.trim_cvs_quote() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -2032,7 +2247,7 @@ $$;
-CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger
+CREATE FUNCTION comptaproc.trim_space_format_csv_banque() RETURNS trigger
LANGUAGE plpgsql
AS $$
declare
@@ -2053,7 +2268,7 @@ $$;
-CREATE FUNCTION tva_delete(integer) RETURNS void
+CREATE FUNCTION comptaproc.tva_delete(integer) RETURNS void
LANGUAGE plpgsql
AS $_$
declare
@@ -2079,7 +2294,7 @@ $_$;
-CREATE FUNCTION tva_insert(text, numeric, text, text, integer) RETURNS integer
+CREATE FUNCTION comptaproc.tva_insert(text, numeric, text, text, integer)
RETURNS integer
LANGUAGE plpgsql
AS $_$
declare
@@ -2116,7 +2331,7 @@ $_$;
-CREATE FUNCTION tva_modify(integer, text, numeric, text, text, integer)
RETURNS integer
+CREATE FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text,
integer) RETURNS integer
LANGUAGE plpgsql
AS $_$
declare
@@ -2152,75 +2367,72 @@ $_$;
-CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS
integer
+CREATE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text)
RETURNS integer
LANGUAGE plpgsql
- AS $_$
- declare
- ns integer;
- nExist integer;
- tText text;
- tBase text;
- old_qcode varchar;
- num_rows_jrnx integer;
- num_rows_predef integer;
- begin
- -- get current value
- select ad_value into old_qcode from fiche_detail where jft_id=njft_id;
- -- av_text didn't change so no update
- if tav_text = upper( trim(old_qcode)) then
- raise notice 'nothing to change % %' , tav_text,old_qcode;
- return 0;
- end if;
-
- tText := trim(lower(tav_text));
- tText := replace(tText,' ','');
- -- valid alpha is [ . : - _ ]
- tText := translate(tText,E' $€µ£%+/\\!(){}(),;&|"#''^<>*','');
- tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
- tText := upper(tText);
- if length ( tText) = 0 or tText is null then
- return 0;
- end if;
+ AS $$
+declare
+ ns integer;
+ nExist integer;
+ tText text;
+ tBase text;
+ old_qcode varchar;
+ num_rows_jrnx integer;
+ num_rows_predef integer;
+ n_count integer;
+begin
+ n_count := 0;
+ -- get current value
+ select ad_value into old_qcode from fiche_detail where jft_id=njft_id;
+ -- av_text didn't change so no update
+ if tav_text = upper( trim(old_qcode)) then
+ raise notice 'nothing to change % %' , tav_text,old_qcode;
+ return 0;
+ end if;
- ns := njft_id;
- tBase := tText;
- loop
- -- av_text already used ?
- select count(*) into nExist
- from fiche_detail
- where
- ad_id=23 and ad_value=tText
- and jft_id <> njft_id;
+ tText := comptaproc.format_quickcode(tav_text);
- if nExist = 0 then
- exit;
- end if;
- if tText = tBase||ns then
- -- take the next sequence
- select nextval('s_jnt_fic_att_value') into ns;
- end if;
- tText :=tBase||ns;
+ if length ( tText) = 0 or tText is null then
+ return 0;
+ end if;
- end loop;
- update fiche_detail set ad_value = tText where jft_id=njft_id;
+ ns := njft_id;
+ tBase := tText;
+ loop
+ -- av_text already used ?
+ select count(*) into nExist
+ from fiche_detail
+ where
+ ad_id=23 and ad_value=tText
+ and jft_id <> njft_id;
- -- update also the contact
- update fiche_detail set ad_value = tText
- where jft_id in
- ( select jft_id
- from fiche_detail
- where ad_id=25 and ad_value=old_qcode);
+ if nExist = 0 then
+ exit;
+ end if;
+ tText := tBase || n_count::text;
+ n_count := n_count + 1 ;
+ end loop;
+ update fiche_detail set ad_value = tText where jft_id=njft_id;
- return ns;
- end;
-$_$;
+ -- update also the contact
+ update fiche_detail set ad_value = tText
+ where jft_id in
+ ( select jft_id
+ from fiche_detail
+ where ad_id in (select ad_id from attr_def where ad_type='card')
and ad_value=old_qcode);
+
+
+ return ns;
+end;
+$$;
-SET search_path = public, pg_catalog;
+COMMENT ON FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text
text) IS 'update the qcode + related columns in other cards';
-CREATE FUNCTION bud_card_ins_upd() RETURNS trigger
+
+
+CREATE FUNCTION public.bud_card_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
sCode text;
@@ -2235,7 +2447,7 @@ end;$$;
-CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger
+CREATE FUNCTION public.bud_detail_ins_upd() RETURNS trigger
LANGUAGE plpgsql
AS $$declare
mline bud_detail%ROWTYPE;
@@ -2249,7 +2461,7 @@ end;$$;
-CREATE FUNCTION correct_quant_purchase() RETURNS void
+CREATE FUNCTION public.correct_quant_purchase() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2301,7 +2513,7 @@ $$;
-CREATE FUNCTION correct_quant_sale() RETURNS void
+CREATE FUNCTION public.correct_quant_sale() RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2353,7 +2565,21 @@ $$;
-CREATE FUNCTION modify_menu_system(n_profile numeric) RETURNS void
+CREATE FUNCTION public.isdate(text, text) RETURNS boolean
+ LANGUAGE plpgsql
+ AS $_$
+DECLARE x timestamp;
+BEGIN
+ x := to_date($1,$2);
+ RETURN TRUE;
+EXCEPTION WHEN others THEN
+ RETURN FALSE;
+END;
+$_$;
+
+
+
+CREATE FUNCTION public.modify_menu_system(n_profile numeric) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2423,7 +2649,22 @@ $$;
-CREATE FUNCTION upgrade_repo(p_version integer) RETURNS void
+CREATE FUNCTION public.replace_menu_code(code_source text, code_destination
text) RETURNS void
+ LANGUAGE plpgsql
+ AS $$
+begin
+ /*code */
+
+ update bookmark set b_action =
replace(b_action,code_source,code_destination) where b_action ~ code_source;
+ update menu_ref set me_code =code_destination where me_code = code_source;
+ update profile_menu set me_code=code_destination where me_code =
code_source;
+ update profile_menu set me_code_dep=code_destination where me_code_dep =
code_source;
+end ;
+$$;
+
+
+
+CREATE FUNCTION public.upgrade_repo(p_version integer) RETURNS void
LANGUAGE plpgsql
AS $$
declare
@@ -2441,9 +2682,54 @@ $$;
SET default_tablespace = '';
+SET default_table_access_method = heap;
+
+
+CREATE TABLE public.acc_other_tax (
+ ac_id integer NOT NULL,
+ ac_label text NOT NULL,
+ ac_rate numeric(5,2) NOT NULL,
+ ajrn_def_id integer[],
+ ac_accounting public.account_type NOT NULL
+);
+
+
+
+COMMENT ON TABLE public.acc_other_tax IS 'Additional tax for Sale or Purchase
';
+
+
+
+COMMENT ON COLUMN public.acc_other_tax.ac_label IS 'Label of the tax';
+
-CREATE TABLE action (
+COMMENT ON COLUMN public.acc_other_tax.ac_rate IS 'rate of the tax in percent';
+
+
+
+COMMENT ON COLUMN public.acc_other_tax.ajrn_def_id IS 'array of to FK jrn_def
(jrn_def_id)';
+
+
+
+COMMENT ON COLUMN public.acc_other_tax.ac_accounting IS 'FK tmp_pcmn
(pcm_val)';
+
+
+
+CREATE SEQUENCE public.acc_other_tax_ac_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.acc_other_tax_ac_id_seq OWNED BY
public.acc_other_tax.ac_id;
+
+
+
+CREATE TABLE public.action (
ac_id integer NOT NULL,
ac_description text NOT NULL,
ac_module text,
@@ -2452,16 +2738,34 @@ CREATE TABLE action (
-COMMENT ON TABLE action IS 'The different privileges';
+COMMENT ON TABLE public.action IS 'The different privileges';
+
+
+
+COMMENT ON COLUMN public.action.ac_code IS 'this code will be used in the code
with the function User::check_action ';
+
+CREATE TABLE public.action_comment_document (
+ acd_id bigint NOT NULL,
+ document_id bigint,
+ action_gestion_comment_id bigint
+);
+
-COMMENT ON COLUMN action.ac_code IS 'this code will be used in the code with
the function User::check_action ';
+ALTER TABLE public.action_comment_document ALTER COLUMN acd_id ADD GENERATED
BY DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.action_comment_document_acd_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
-CREATE TABLE action_detail (
+CREATE TABLE public.action_detail (
ad_id integer NOT NULL,
f_id bigint,
ad_text text,
@@ -2475,39 +2779,39 @@ CREATE TABLE action_detail (
-COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class
Action_Detail';
+COMMENT ON TABLE public.action_detail IS 'Detail of action_gestion, see class
Action_Detail';
-COMMENT ON COLUMN action_detail.f_id IS 'the concerned card';
+COMMENT ON COLUMN public.action_detail.f_id IS 'the concerned card';
-COMMENT ON COLUMN action_detail.ad_text IS ' Description ';
+COMMENT ON COLUMN public.action_detail.ad_text IS ' Description ';
-COMMENT ON COLUMN action_detail.ad_pu IS ' price per unit ';
+COMMENT ON COLUMN public.action_detail.ad_pu IS ' price per unit ';
-COMMENT ON COLUMN action_detail.ad_quant IS 'quantity ';
+COMMENT ON COLUMN public.action_detail.ad_quant IS 'quantity ';
-COMMENT ON COLUMN action_detail.ad_tva_id IS ' tva_id ';
+COMMENT ON COLUMN public.action_detail.ad_tva_id IS ' tva_id ';
-COMMENT ON COLUMN action_detail.ad_tva_amount IS ' tva_amount ';
+COMMENT ON COLUMN public.action_detail.ad_tva_amount IS ' tva_amount ';
-COMMENT ON COLUMN action_detail.ad_total_amount IS ' total amount';
+COMMENT ON COLUMN public.action_detail.ad_total_amount IS ' total amount';
-CREATE SEQUENCE action_detail_ad_id_seq
+CREATE SEQUENCE public.action_detail_ad_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2516,11 +2820,11 @@ CREATE SEQUENCE action_detail_ad_id_seq
-ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id;
+ALTER SEQUENCE public.action_detail_ad_id_seq OWNED BY
public.action_detail.ad_id;
-CREATE SEQUENCE action_gestion_ag_id_seq
+CREATE SEQUENCE public.action_gestion_ag_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2529,9 +2833,8 @@ CREATE SEQUENCE action_gestion_ag_id_seq
-
-CREATE TABLE action_gestion (
- ag_id integer DEFAULT nextval('action_gestion_ag_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.action_gestion (
+ ag_id integer DEFAULT nextval('public.action_gestion_ag_id_seq'::regclass)
NOT NULL,
ag_type integer,
f_id_dest integer,
ag_title text,
@@ -2539,7 +2842,7 @@ CREATE TABLE action_gestion (
ag_ref text,
ag_hour text,
ag_priority integer DEFAULT 2,
- ag_dest bigint DEFAULT (-1) NOT NULL,
+ ag_dest bigint DEFAULT '-1'::integer NOT NULL,
ag_owner text,
ag_contact bigint,
ag_state integer,
@@ -2548,78 +2851,78 @@ CREATE TABLE action_gestion (
-COMMENT ON TABLE action_gestion IS 'Contains the details for the follow-up of
customer, supplier, administration';
+COMMENT ON TABLE public.action_gestion IS 'Contains the details for the
follow-up of customer, supplier, administration';
-COMMENT ON COLUMN action_gestion.ag_type IS ' type of action: see
document_type ';
+COMMENT ON COLUMN public.action_gestion.ag_type IS ' type of action: see
document_type ';
-COMMENT ON COLUMN action_gestion.f_id_dest IS ' third party ';
+COMMENT ON COLUMN public.action_gestion.f_id_dest IS 'third party';
-COMMENT ON COLUMN action_gestion.ag_title IS ' title ';
+COMMENT ON COLUMN public.action_gestion.ag_title IS 'title';
-COMMENT ON COLUMN action_gestion.ag_timestamp IS ' ';
+COMMENT ON COLUMN public.action_gestion.ag_ref IS 'its reference';
-COMMENT ON COLUMN action_gestion.ag_ref IS 'its reference ';
+COMMENT ON COLUMN public.action_gestion.ag_priority IS 'Low, medium,
important';
-COMMENT ON COLUMN action_gestion.ag_priority IS 'Low, medium, important ';
+COMMENT ON COLUMN public.action_gestion.ag_dest IS 'is the profile which has
to take care of this action';
-COMMENT ON COLUMN action_gestion.ag_dest IS ' is the profile which has to take
care of this action ';
+COMMENT ON COLUMN public.action_gestion.ag_owner IS 'is the owner of this
action';
-COMMENT ON COLUMN action_gestion.ag_owner IS ' is the owner of this action ';
+COMMENT ON COLUMN public.action_gestion.ag_contact IS 'contact of the third
part';
-COMMENT ON COLUMN action_gestion.ag_contact IS ' contact of the third part ';
+COMMENT ON COLUMN public.action_gestion.ag_state IS 'state of the action same
as document_state';
-COMMENT ON COLUMN action_gestion.ag_state IS 'state of the action same as
document_state ';
-
-
-
-
-CREATE TABLE action_gestion_comment (
+CREATE TABLE public.action_gestion_comment (
agc_id bigint NOT NULL,
ag_id bigint,
agc_date timestamp with time zone DEFAULT now(),
agc_comment text,
- tech_user text
+ tech_user text,
+ agc_comment_raw text
);
-COMMENT ON COLUMN action_gestion_comment.agc_id IS 'PK';
+COMMENT ON TABLE public.action_gestion_comment IS 'comment on action
management';
+
+
+
+COMMENT ON COLUMN public.action_gestion_comment.agc_id IS 'PK';
-COMMENT ON COLUMN action_gestion_comment.ag_id IS 'FK to action_gestion';
+COMMENT ON COLUMN public.action_gestion_comment.ag_id IS 'FK to
action_gestion';
-COMMENT ON COLUMN action_gestion_comment.agc_comment IS 'comment';
+COMMENT ON COLUMN public.action_gestion_comment.agc_comment IS 'comment';
-COMMENT ON COLUMN action_gestion_comment.tech_user IS 'user_login';
+COMMENT ON COLUMN public.action_gestion_comment.tech_user IS 'user_login';
-CREATE SEQUENCE action_gestion_comment_agc_id_seq
+CREATE SEQUENCE public.action_gestion_comment_agc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2628,11 +2931,31 @@ CREATE SEQUENCE action_gestion_comment_agc_id_seq
-ALTER SEQUENCE action_gestion_comment_agc_id_seq OWNED BY
action_gestion_comment.agc_id;
+ALTER SEQUENCE public.action_gestion_comment_agc_id_seq OWNED BY
public.action_gestion_comment.agc_id;
+
+
+
+CREATE TABLE public.action_gestion_filter (
+ af_id bigint NOT NULL,
+ af_user text NOT NULL,
+ af_name text NOT NULL,
+ af_search text NOT NULL
+);
+
+
+
+ALTER TABLE public.action_gestion_filter ALTER COLUMN af_id ADD GENERATED
ALWAYS AS IDENTITY (
+ SEQUENCE NAME public.action_gestion_filter_af_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
-CREATE TABLE action_gestion_operation (
+CREATE TABLE public.action_gestion_operation (
ago_id bigint NOT NULL,
ag_id bigint,
jr_id bigint
@@ -2640,19 +2963,23 @@ CREATE TABLE action_gestion_operation (
-COMMENT ON COLUMN action_gestion_operation.ago_id IS 'pk';
+COMMENT ON TABLE public.action_gestion_operation IS 'Operation linked on
action';
-COMMENT ON COLUMN action_gestion_operation.ag_id IS 'fk to action_gestion';
+COMMENT ON COLUMN public.action_gestion_operation.ago_id IS 'pk';
-COMMENT ON COLUMN action_gestion_operation.jr_id IS 'fk to jrn';
+COMMENT ON COLUMN public.action_gestion_operation.ag_id IS 'fk to
action_gestion';
-CREATE SEQUENCE action_gestion_operation_ago_id_seq
+COMMENT ON COLUMN public.action_gestion_operation.jr_id IS 'fk to jrn';
+
+
+
+CREATE SEQUENCE public.action_gestion_operation_ago_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2661,11 +2988,11 @@ CREATE SEQUENCE action_gestion_operation_ago_id_seq
-ALTER SEQUENCE action_gestion_operation_ago_id_seq OWNED BY
action_gestion_operation.ago_id;
+ALTER SEQUENCE public.action_gestion_operation_ago_id_seq OWNED BY
public.action_gestion_operation.ago_id;
-CREATE TABLE action_gestion_related (
+CREATE TABLE public.action_gestion_related (
aga_id bigint NOT NULL,
aga_least bigint NOT NULL,
aga_greatest bigint NOT NULL,
@@ -2674,23 +3001,27 @@ CREATE TABLE action_gestion_related (
-COMMENT ON COLUMN action_gestion_related.aga_id IS 'pk';
+COMMENT ON TABLE public.action_gestion_related IS 'link between action';
+
+COMMENT ON COLUMN public.action_gestion_related.aga_id IS 'pk';
-COMMENT ON COLUMN action_gestion_related.aga_least IS 'fk to action_gestion,
smallest ag_id';
+COMMENT ON COLUMN public.action_gestion_related.aga_least IS 'fk to
action_gestion, smallest ag_id';
-COMMENT ON COLUMN action_gestion_related.aga_greatest IS 'fk to action_gestion
greatest ag_id';
+COMMENT ON COLUMN public.action_gestion_related.aga_greatest IS 'fk to
action_gestion greatest ag_id';
-COMMENT ON COLUMN action_gestion_related.aga_type IS 'Type de liens';
+COMMENT ON COLUMN public.action_gestion_related.aga_type IS 'Type de liens';
-CREATE SEQUENCE action_gestion_related_aga_id_seq
+
+
+CREATE SEQUENCE public.action_gestion_related_aga_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2699,11 +3030,11 @@ CREATE SEQUENCE action_gestion_related_aga_id_seq
-ALTER SEQUENCE action_gestion_related_aga_id_seq OWNED BY
action_gestion_related.aga_id;
+ALTER SEQUENCE public.action_gestion_related_aga_id_seq OWNED BY
public.action_gestion_related.aga_id;
-CREATE TABLE action_person (
+CREATE TABLE public.action_person (
ap_id integer NOT NULL,
ag_id integer NOT NULL,
f_id integer NOT NULL
@@ -2711,19 +3042,57 @@ CREATE TABLE action_person (
-COMMENT ON TABLE action_person IS 'Person involved in the action';
+COMMENT ON TABLE public.action_person IS 'Person involved in the action';
+
+
+
+COMMENT ON COLUMN public.action_person.ap_id IS 'pk';
+
+
+
+COMMENT ON COLUMN public.action_person.ag_id IS 'fk to fiche';
+
+
+
+CREATE SEQUENCE public.action_person_ap_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.action_person_ap_id_seq OWNED BY
public.action_person.ap_id;
+
+
+
+CREATE TABLE public.action_person_option (
+ ap_id bigint NOT NULL,
+ ap_value character varying,
+ contact_option_ref_id bigint NOT NULL,
+ action_person_id bigint NOT NULL
+);
+
+
+
+COMMENT ON TABLE public.action_person_option IS 'option for each contact';
+
+
+COMMENT ON COLUMN public.action_person_option.ap_value IS 'Value of the
option';
-COMMENT ON COLUMN action_person.ap_id IS 'pk';
+COMMENT ON COLUMN public.action_person_option.contact_option_ref_id IS 'FK to
contact_option';
-COMMENT ON COLUMN action_person.ag_id IS 'fk to fiche';
+COMMENT ON COLUMN public.action_person_option.action_person_id IS 'FK to
action_person';
-CREATE SEQUENCE action_person_ap_id_seq
+
+CREATE SEQUENCE public.action_person_option_ap_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2732,11 +3101,11 @@ CREATE SEQUENCE action_person_ap_id_seq
-ALTER SEQUENCE action_person_ap_id_seq OWNED BY action_person.ap_id;
+ALTER SEQUENCE public.action_person_option_ap_id_seq OWNED BY
public.action_person_option.ap_id;
-CREATE TABLE action_tags (
+CREATE TABLE public.action_tags (
at_id integer NOT NULL,
t_id integer,
ag_id integer
@@ -2744,7 +3113,11 @@ CREATE TABLE action_tags (
-CREATE SEQUENCE action_tags_at_id_seq
+COMMENT ON TABLE public.action_tags IS 'Tags link to action';
+
+
+
+CREATE SEQUENCE public.action_tags_at_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2753,37 +3126,46 @@ CREATE SEQUENCE action_tags_at_id_seq
-ALTER SEQUENCE action_tags_at_id_seq OWNED BY action_tags.at_id;
+ALTER SEQUENCE public.action_tags_at_id_seq OWNED BY public.action_tags.at_id;
-
-CREATE TABLE attr_def (
+CREATE TABLE public.attr_def (
ad_id integer DEFAULT nextval(('s_attr_def'::text)::regclass) NOT NULL,
ad_text text,
ad_type text,
ad_size text NOT NULL,
- ad_extra text
+ ad_extra text,
+ ad_search_followup integer DEFAULT 1,
+ ad_default_order integer
);
-COMMENT ON TABLE attr_def IS 'The available attributs for the cards';
+COMMENT ON TABLE public.attr_def IS 'The available attributs for the cards';
+
+
+
+COMMENT ON COLUMN public.attr_def.ad_search_followup IS '1 : search available
from followup , 0 : search not available in followup';
-CREATE TABLE attr_min (
+COMMENT ON COLUMN public.attr_def.ad_default_order IS 'Default order of the
attribute';
+
+
+
+CREATE TABLE public.attr_min (
frd_id integer NOT NULL,
ad_id integer NOT NULL
);
-COMMENT ON TABLE attr_min IS 'The value of attributs for the cards';
+COMMENT ON TABLE public.attr_min IS 'The value of attributs for the cards';
-CREATE SEQUENCE bilan_b_id_seq
+CREATE SEQUENCE public.bilan_b_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2792,9 +3174,8 @@ CREATE SEQUENCE bilan_b_id_seq
-
-CREATE TABLE bilan (
- b_id integer DEFAULT nextval('bilan_b_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.bilan (
+ b_id integer DEFAULT nextval('public.bilan_b_id_seq'::regclass) NOT NULL,
b_name text NOT NULL,
b_file_template text NOT NULL,
b_file_form text,
@@ -2803,31 +3184,31 @@ CREATE TABLE bilan (
-COMMENT ON TABLE bilan IS 'contains the template and the data for generating
different documents ';
+COMMENT ON TABLE public.bilan IS 'contains the template and the data for
generating different documents ';
-COMMENT ON COLUMN bilan.b_id IS 'primary key';
+COMMENT ON COLUMN public.bilan.b_id IS 'primary key';
-COMMENT ON COLUMN bilan.b_name IS 'Name of the document';
+COMMENT ON COLUMN public.bilan.b_name IS 'Name of the document';
-COMMENT ON COLUMN bilan.b_file_template IS 'path of the template
(document/...)';
+COMMENT ON COLUMN public.bilan.b_file_template IS 'path of the template
(document/...)';
-COMMENT ON COLUMN bilan.b_file_form IS 'path of the file with forms';
+COMMENT ON COLUMN public.bilan.b_file_form IS 'path of the file with forms';
-COMMENT ON COLUMN bilan.b_type IS 'type = ODS, RTF...';
+COMMENT ON COLUMN public.bilan.b_type IS 'type = ODS, RTF...';
-CREATE TABLE bookmark (
+CREATE TABLE public.bookmark (
b_id integer NOT NULL,
b_order integer DEFAULT 1,
b_action text,
@@ -2836,11 +3217,11 @@ CREATE TABLE bookmark (
-COMMENT ON TABLE bookmark IS 'Bookmark of the connected user';
+COMMENT ON TABLE public.bookmark IS 'Bookmark of the connected user';
-CREATE SEQUENCE bookmark_b_id_seq
+CREATE SEQUENCE public.bookmark_b_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2849,11 +3230,11 @@ CREATE SEQUENCE bookmark_b_id_seq
-ALTER SEQUENCE bookmark_b_id_seq OWNED BY bookmark.b_id;
+ALTER SEQUENCE public.bookmark_b_id_seq OWNED BY public.bookmark.b_id;
-CREATE SEQUENCE bud_card_bc_id_seq
+CREATE SEQUENCE public.bud_card_bc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2862,7 +3243,7 @@ CREATE SEQUENCE bud_card_bc_id_seq
-CREATE SEQUENCE bud_detail_bd_id_seq
+CREATE SEQUENCE public.bud_detail_bd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2871,7 +3252,7 @@ CREATE SEQUENCE bud_detail_bd_id_seq
-CREATE SEQUENCE bud_detail_periode_bdp_id_seq
+CREATE SEQUENCE public.bud_detail_periode_bdp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2880,8 +3261,7 @@ CREATE SEQUENCE bud_detail_periode_bdp_id_seq
-
-CREATE TABLE centralized (
+CREATE TABLE public.centralized (
c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL,
c_j_id integer,
c_date date NOT NULL,
@@ -2889,7 +3269,7 @@ CREATE TABLE centralized (
c_montant numeric(20,4) NOT NULL,
c_debit boolean DEFAULT true,
c_jrn_def integer NOT NULL,
- c_poste account_type,
+ c_poste public.account_type,
c_description text,
c_grp integer NOT NULL,
c_comment text,
@@ -2900,12 +3280,125 @@ CREATE TABLE centralized (
-COMMENT ON TABLE centralized IS 'The centralized journal';
+COMMENT ON TABLE public.centralized IS 'The centralized journal';
+
+
+
+CREATE TABLE public.contact_option_ref (
+ cor_id bigint NOT NULL,
+ cor_label character varying NOT NULL,
+ cor_type integer DEFAULT 0 NOT NULL,
+ cor_value_select character varying
+);
+
+
+
+COMMENT ON TABLE public.contact_option_ref IS 'Option for the contact';
+
+
+
+COMMENT ON COLUMN public.contact_option_ref.cor_label IS 'Label de l''option';
+
+
+
+COMMENT ON COLUMN public.contact_option_ref.cor_type IS '0 text , 1 select ,2
nombre , 3 date';
+
+
+
+COMMENT ON COLUMN public.contact_option_ref.cor_value_select IS 'Select
values';
+
+
+
+CREATE SEQUENCE public.contact_option_ref_cor_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.contact_option_ref_cor_id_seq OWNED BY
public.contact_option_ref.cor_id;
+
+
+
+CREATE TABLE public.currency (
+ id integer NOT NULL,
+ cr_code_iso character varying(10),
+ cr_name character varying(80)
+);
+
+
+
+COMMENT ON TABLE public.currency IS 'currency';
+
+
+
+COMMENT ON COLUMN public.currency.cr_code_iso IS 'Code ISO';
+
+
+
+COMMENT ON COLUMN public.currency.cr_name IS 'Name of the currency';
+
+
+
+CREATE TABLE public.currency_history (
+ id integer NOT NULL,
+ ch_value numeric(20,8) NOT NULL,
+ ch_from date NOT NULL,
+ currency_id integer NOT NULL,
+ CONSTRAINT currency_history_check CHECK ((ch_value > (0)::numeric))
+);
+
+
+
+COMMENT ON TABLE public.currency_history IS 'currency values history';
+
+
+
+COMMENT ON COLUMN public.currency_history.id IS 'pk';
+
+
+
+COMMENT ON COLUMN public.currency_history.ch_value IS 'rate of currency
depending of currency of the folder';
+
+
+
+COMMENT ON COLUMN public.currency_history.ch_from IS 'Date when the rate is
available';
+
+
+
+COMMENT ON COLUMN public.currency_history.currency_id IS 'FK to currency';
+
+
+CREATE SEQUENCE public.currency_history_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.currency_history_id_seq OWNED BY
public.currency_history.id;
+
+
+
+CREATE SEQUENCE public.currency_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
-CREATE TABLE del_action (
+ALTER SEQUENCE public.currency_id_seq OWNED BY public.currency.id;
+
+
+
+CREATE TABLE public.del_action (
del_id integer NOT NULL,
del_name text NOT NULL,
del_time timestamp without time zone
@@ -2913,7 +3406,11 @@ CREATE TABLE del_action (
-CREATE SEQUENCE del_action_del_id_seq
+COMMENT ON TABLE public.del_action IS 'deleted actions';
+
+
+
+CREATE SEQUENCE public.del_action_del_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2922,11 +3419,11 @@ CREATE SEQUENCE del_action_del_id_seq
-ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id;
+ALTER SEQUENCE public.del_action_del_id_seq OWNED BY public.del_action.del_id;
-CREATE TABLE del_jrn (
+CREATE TABLE public.del_jrn (
jr_id integer NOT NULL,
jr_def_id integer,
jr_montant numeric(20,4),
@@ -2952,7 +3449,11 @@ CREATE TABLE del_jrn (
-CREATE SEQUENCE del_jrn_dj_id_seq
+COMMENT ON TABLE public.del_jrn IS 'deleted operation';
+
+
+
+CREATE SEQUENCE public.del_jrn_dj_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2961,15 +3462,15 @@ CREATE SEQUENCE del_jrn_dj_id_seq
-ALTER SEQUENCE del_jrn_dj_id_seq OWNED BY del_jrn.dj_id;
+ALTER SEQUENCE public.del_jrn_dj_id_seq OWNED BY public.del_jrn.dj_id;
-CREATE TABLE del_jrnx (
+CREATE TABLE public.del_jrnx (
j_id integer NOT NULL,
j_date date,
j_montant numeric(20,4),
- j_poste account_type,
+ j_poste public.account_type,
j_grpt integer,
j_rapt text,
j_jrn_def integer,
@@ -2987,7 +3488,11 @@ CREATE TABLE del_jrnx (
-CREATE SEQUENCE del_jrnx_djx_id_seq
+COMMENT ON TABLE public.del_jrnx IS 'delete operation details';
+
+
+
+CREATE SEQUENCE public.del_jrnx_djx_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -2996,11 +3501,11 @@ CREATE SEQUENCE del_jrnx_djx_id_seq
-ALTER SEQUENCE del_jrnx_djx_id_seq OWNED BY del_jrnx.djx_id;
+ALTER SEQUENCE public.del_jrnx_djx_id_seq OWNED BY public.del_jrnx.djx_id;
-CREATE SEQUENCE document_d_id_seq
+CREATE SEQUENCE public.document_d_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3009,9 +3514,8 @@ CREATE SEQUENCE document_d_id_seq
-
-CREATE TABLE document (
- d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.document (
+ d_id integer DEFAULT nextval('public.document_d_id_seq'::regclass) NOT
NULL,
ag_id integer NOT NULL,
d_lob oid,
d_number bigint NOT NULL,
@@ -3022,49 +3526,46 @@ CREATE TABLE document (
-COMMENT ON TABLE document IS 'This table contains all the documents : summary
and lob files';
+COMMENT ON TABLE public.document IS 'This table contains all the documents :
summary and lob files';
-CREATE SEQUENCE document_modele_md_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
+CREATE TABLE public.document_component (
+ dc_id integer NOT NULL,
+ dc_code text NOT NULL,
+ dc_comment text NOT NULL
+);
-CREATE TABLE document_modele (
- md_id integer DEFAULT nextval('document_modele_md_id_seq'::regclass) NOT
NULL,
- md_name text NOT NULL,
- md_lob oid,
- md_type integer NOT NULL,
- md_filename text,
- md_mimetype text,
- md_affect character varying(3) NOT NULL
-);
+COMMENT ON TABLE public.document_component IS 'Give the component of NOALYSS
that is using is';
+
+
+
+COMMENT ON COLUMN public.document_component.dc_id IS 'PK';
+
+
+
+COMMENT ON COLUMN public.document_component.dc_code IS 'Code used in
document_modele';
-COMMENT ON TABLE document_modele IS ' contains all the template for the
documents';
+COMMENT ON COLUMN public.document_component.dc_comment IS 'Code used in
document_modele';
-CREATE SEQUENCE document_seq
+ALTER TABLE public.document_component ALTER COLUMN dc_id ADD GENERATED BY
DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.document_component_dc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
- CACHE 1;
-
-
-
-COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the
document modele';
+ CACHE 1
+);
-CREATE SEQUENCE document_state_s_id_seq
+CREATE SEQUENCE public.document_modele_md_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3073,45 +3574,125 @@ CREATE SEQUENCE document_state_s_id_seq
-CREATE TABLE document_state (
- s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL,
- s_value character varying(50) NOT NULL,
- s_status character(1)
+CREATE TABLE public.document_modele (
+ md_id integer DEFAULT
nextval('public.document_modele_md_id_seq'::regclass) NOT NULL,
+ md_name text NOT NULL,
+ md_lob oid,
+ md_type integer NOT NULL,
+ md_filename text,
+ md_mimetype text,
+ md_affect character varying(3) NOT NULL
);
-COMMENT ON TABLE document_state IS 'State of the document';
+COMMENT ON TABLE public.document_modele IS ' contains all the template for the
documents';
-CREATE SEQUENCE document_type_dt_id_seq
- START WITH 25
- INCREMENT BY 1
- NO MINVALUE
+CREATE TABLE public.document_option (
+ do_id bigint NOT NULL,
+ do_code character varying(20) NOT NULL,
+ document_type_id bigint,
+ do_enable integer DEFAULT 1 NOT NULL,
+ do_option character varying
+);
+
+
+
+COMMENT ON TABLE public.document_option IS 'Reference of option addable to
document_type';
+
+
+
+COMMENT ON COLUMN public.document_option.do_code IS 'Code of the option to
add';
+
+
+
+COMMENT ON COLUMN public.document_option.document_type_id IS 'FK to
document_type';
+
+
+
+COMMENT ON COLUMN public.document_option.do_enable IS '1 the option is
activated, 0 is inativated';
+
+
+
+COMMENT ON COLUMN public.document_option.do_option IS 'Option for the detail';
+
+
+
+CREATE SEQUENCE public.document_option_do_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE TABLE document_type (
- dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT
NULL,
+ALTER SEQUENCE public.document_option_do_id_seq OWNED BY
public.document_option.do_id;
+
+
+
+CREATE SEQUENCE public.document_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+COMMENT ON SEQUENCE public.document_seq IS 'Sequence for the sequence bound to
the document modele';
+
+
+
+CREATE SEQUENCE public.document_state_s_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+CREATE TABLE public.document_state (
+ s_id integer DEFAULT nextval('public.document_state_s_id_seq'::regclass)
NOT NULL,
+ s_value character varying(50) NOT NULL,
+ s_status character(1)
+);
+
+
+
+COMMENT ON TABLE public.document_state IS 'State of the document';
+
+
+
+CREATE SEQUENCE public.document_type_dt_id_seq
+ START WITH 25
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+CREATE TABLE public.document_type (
+ dt_id integer DEFAULT nextval('public.document_type_dt_id_seq'::regclass)
NOT NULL,
dt_value character varying(80),
dt_prefix text
);
-COMMENT ON TABLE document_type IS 'Type of document : meeting, invoice,...';
-
+COMMENT ON TABLE public.document_type IS 'Type of document : meeting,
invoice,...';
-COMMENT ON COLUMN document_type.dt_prefix IS 'Prefix for ag_ref';
+COMMENT ON COLUMN public.document_type.dt_prefix IS 'Prefix for ag_ref';
-CREATE TABLE extension (
+CREATE TABLE public.extension (
ex_id integer NOT NULL,
ex_name character varying(30) NOT NULL,
ex_code character varying(15) NOT NULL,
@@ -3122,35 +3703,35 @@ CREATE TABLE extension (
-COMMENT ON TABLE extension IS 'Content the needed information for the
extension';
+COMMENT ON TABLE public.extension IS 'Content the needed information for the
extension';
-COMMENT ON COLUMN extension.ex_id IS 'Primary key';
+COMMENT ON COLUMN public.extension.ex_id IS 'Primary key';
-COMMENT ON COLUMN extension.ex_name IS 'code of the extension ';
+COMMENT ON COLUMN public.extension.ex_name IS 'code of the extension ';
-COMMENT ON COLUMN extension.ex_code IS 'code of the extension ';
+COMMENT ON COLUMN public.extension.ex_code IS 'code of the extension ';
-COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension ';
+COMMENT ON COLUMN public.extension.ex_desc IS 'Description of the extension ';
-COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include';
+COMMENT ON COLUMN public.extension.ex_file IS 'path to the extension to
include';
-COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled N : disabled ';
+COMMENT ON COLUMN public.extension.ex_enable IS 'Y : enabled N : disabled ';
-CREATE SEQUENCE extension_ex_id_seq
+CREATE SEQUENCE public.extension_ex_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3159,23 +3740,28 @@ CREATE SEQUENCE extension_ex_id_seq
-ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id;
+ALTER SEQUENCE public.extension_ex_id_seq OWNED BY public.extension.ex_id;
-
-CREATE TABLE fiche (
+CREATE TABLE public.fiche (
f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL,
- fd_id integer
+ fd_id integer,
+ f_enable character(1) NOT NULL,
+ CONSTRAINT f_enable_ck CHECK ((f_enable = ANY (ARRAY['0'::bpchar,
'1'::bpchar])))
);
-COMMENT ON TABLE fiche IS 'Cards';
+COMMENT ON TABLE public.fiche IS 'Cards';
+
+
+
+COMMENT ON COLUMN public.fiche.f_enable IS 'value = 1 if card enable ,
otherwise 0 ';
-CREATE TABLE fiche_def (
+CREATE TABLE public.fiche_def (
fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL,
fd_class_base text,
fd_label text NOT NULL,
@@ -3186,23 +3772,23 @@ CREATE TABLE fiche_def (
-COMMENT ON TABLE fiche_def IS 'Cards definition';
+COMMENT ON TABLE public.fiche_def IS 'Cards definition';
-CREATE TABLE fiche_def_ref (
+CREATE TABLE public.fiche_def_ref (
frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT
NULL,
frd_text text,
- frd_class_base account_type
+ frd_class_base public.account_type
);
-COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition';
+COMMENT ON TABLE public.fiche_def_ref IS 'Family Cards definition';
-CREATE TABLE fiche_detail (
+CREATE TABLE public.fiche_detail (
jft_id integer DEFAULT nextval(('s_jnt_fic_att_value'::text)::regclass)
NOT NULL,
f_id integer,
ad_id integer,
@@ -3211,12 +3797,11 @@ CREATE TABLE fiche_detail (
-COMMENT ON TABLE fiche_detail IS 'join between the card and the attribut
definition';
+COMMENT ON TABLE public.fiche_detail IS 'join between the card and the
attribut definition';
-
-CREATE TABLE forecast (
+CREATE TABLE public.forecast (
f_id integer NOT NULL,
f_name text NOT NULL,
f_start_date bigint,
@@ -3225,36 +3810,40 @@ CREATE TABLE forecast (
-COMMENT ON TABLE forecast IS 'contains the name of the forecast';
+COMMENT ON TABLE public.forecast IS 'contains the name of the forecast';
-CREATE TABLE forecast_cat (
+CREATE TABLE public.forecast_category (
fc_id integer NOT NULL,
fc_desc text NOT NULL,
- f_id bigint,
+ f_id bigint NOT NULL,
fc_order integer DEFAULT 0 NOT NULL
);
-COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key';
+COMMENT ON TABLE public.forecast_category IS 'Category of forecast';
+
+COMMENT ON COLUMN public.forecast_category.fc_id IS 'primary key';
-COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category';
+COMMENT ON COLUMN public.forecast_category.fc_desc IS 'text of the category';
-COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the
table forecast';
+COMMENT ON COLUMN public.forecast_category.f_id IS 'Foreign key, it is the
parent from the table forecast';
-COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when
displaid';
+COMMENT ON COLUMN public.forecast_category.fc_order IS 'Order of the category,
used when displaid';
-CREATE SEQUENCE forecast_cat_fc_id_seq
+
+
+CREATE SEQUENCE public.forecast_cat_fc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3263,11 +3852,11 @@ CREATE SEQUENCE forecast_cat_fc_id_seq
-ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id;
+ALTER SEQUENCE public.forecast_cat_fc_id_seq OWNED BY
public.forecast_category.fc_id;
-CREATE SEQUENCE forecast_f_id_seq
+CREATE SEQUENCE public.forecast_f_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3276,57 +3865,52 @@ CREATE SEQUENCE forecast_f_id_seq
-ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id;
+ALTER SEQUENCE public.forecast_f_id_seq OWNED BY public.forecast.f_id;
-CREATE TABLE forecast_item (
+CREATE TABLE public.forecast_item (
fi_id integer NOT NULL,
fi_text text,
fi_account text,
- fi_card integer,
fi_order integer,
fc_id integer,
fi_amount numeric(20,4) DEFAULT 0,
- fi_debit "char" DEFAULT 'd'::"char" NOT NULL,
- fi_pid integer
+ fi_pid integer,
+ fi_amount_initial numeric(20,4) DEFAULT 0
);
-COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key';
-
+COMMENT ON TABLE public.forecast_item IS 'items of forecast';
-COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem';
+COMMENT ON COLUMN public.forecast_item.fi_id IS 'Primary key';
-COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry';
+COMMENT ON COLUMN public.forecast_item.fi_text IS 'Label of the i tem';
-COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)';
+COMMENT ON COLUMN public.forecast_item.fi_account IS 'Accountancy entry';
-COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)';
+COMMENT ON COLUMN public.forecast_item.fi_order IS 'Order of showing (not
used)';
-COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount';
+COMMENT ON COLUMN public.forecast_item.fi_amount IS 'Amount';
-COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C';
+COMMENT ON COLUMN public.forecast_item.fi_pid IS '0 for every month, or the
value parm_periode.p_id ';
-COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value
parm_periode.p_id ';
-
-
-CREATE SEQUENCE forecast_item_fi_id_seq
+CREATE SEQUENCE public.forecast_item_fi_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3335,34 +3919,36 @@ CREATE SEQUENCE forecast_item_fi_id_seq
-ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id;
-
+ALTER SEQUENCE public.forecast_item_fi_id_seq OWNED BY
public.forecast_item.fi_id;
-CREATE TABLE form (
- fo_id integer DEFAULT nextval(('s_form'::text)::regclass) NOT NULL,
- fo_fr_id integer,
- fo_pos integer,
- fo_label text,
- fo_formula text
+CREATE TABLE public.form_definition (
+ fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL,
+ fr_label text
);
-COMMENT ON TABLE form IS 'Forms content';
+COMMENT ON TABLE public.form_definition IS 'Simple Report name';
-CREATE TABLE formdef (
- fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL,
- fr_label text
+CREATE TABLE public.form_detail (
+ fo_id integer DEFAULT nextval(('s_form'::text)::regclass) NOT NULL,
+ fo_fr_id integer NOT NULL,
+ fo_pos integer,
+ fo_label text,
+ fo_formula text
);
+COMMENT ON TABLE public.form_detail IS 'Simple report details with formula';
+
-CREATE TABLE groupe_analytique (
+
+CREATE TABLE public.groupe_analytique (
ga_id character varying(10) NOT NULL,
pa_id integer,
ga_description text
@@ -3370,7 +3956,11 @@ CREATE TABLE groupe_analytique (
-CREATE SEQUENCE historique_analytique_ha_id_seq
+COMMENT ON TABLE public.groupe_analytique IS 'Group of analytic accountancy';
+
+
+
+CREATE SEQUENCE public.historique_analytique_ha_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3379,18 +3969,32 @@ CREATE SEQUENCE historique_analytique_ha_id_seq
-CREATE TABLE info_def (
+CREATE TABLE public.info_def (
id_type text NOT NULL,
id_description text
);
-COMMENT ON TABLE info_def IS 'Contains the types of additionnal info we can
add to a operation';
+COMMENT ON TABLE public.info_def IS 'Contains the types of additionnal info we
can add to a operation';
+
+
+
+CREATE TABLE public.jnt_document_option_contact (
+ jdoc_id bigint NOT NULL,
+ jdoc_enable integer NOT NULL,
+ document_type_id bigint,
+ contact_option_ref_id bigint,
+ CONSTRAINT jnt_document_option_contact_check CHECK ((jdoc_enable = ANY
(ARRAY[0, 1])))
+);
+
+
+
+COMMENT ON TABLE public.jnt_document_option_contact IS 'Many to many table
between document and contact option';
-CREATE SEQUENCE s_jnt_id
+CREATE SEQUENCE public.jnt_document_option_contact_jdoc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3399,28 +4003,43 @@ CREATE SEQUENCE s_jnt_id
+ALTER SEQUENCE public.jnt_document_option_contact_jdoc_id_seq OWNED BY
public.jnt_document_option_contact.jdoc_id;
+
-CREATE TABLE jnt_fic_attr (
+
+CREATE SEQUENCE public.s_jnt_id
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+CREATE TABLE public.jnt_fic_attr (
fd_id integer,
ad_id integer,
- jnt_id bigint DEFAULT nextval('s_jnt_id'::regclass) NOT NULL,
+ jnt_id bigint DEFAULT nextval('public.s_jnt_id'::regclass) NOT NULL,
jnt_order integer NOT NULL
);
-COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the
attribut definition';
+COMMENT ON TABLE public.jnt_fic_attr IS 'join between the family card and the
attribut definition';
-
-CREATE TABLE jnt_letter (
+CREATE TABLE public.jnt_letter (
jl_id integer NOT NULL
);
-CREATE SEQUENCE jnt_letter_jl_id_seq
+COMMENT ON TABLE public.jnt_letter IS 'm2m tables for lettering';
+
+
+
+CREATE SEQUENCE public.jnt_letter_jl_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3429,12 +4048,37 @@ CREATE SEQUENCE jnt_letter_jl_id_seq
-ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id;
+ALTER SEQUENCE public.jnt_letter_jl_id_seq OWNED BY public.jnt_letter.jl_id;
+
+
+
+CREATE TABLE public.jnt_tag_group_tag (
+ tag_group_id bigint NOT NULL,
+ tag_id bigint NOT NULL,
+ jt_id integer NOT NULL
+);
+
+
+
+COMMENT ON TABLE public.jnt_tag_group_tag IS 'Many to Many table betwwen tag
and tag group';
+
+
+
+CREATE SEQUENCE public.jnt_tag_group_tag_jt_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.jnt_tag_group_tag_jt_id_seq OWNED BY
public.jnt_tag_group_tag.jt_id;
-CREATE TABLE jrn (
+
+
+CREATE TABLE public.jrn (
jr_id integer DEFAULT nextval(('s_jrn'::text)::regclass) NOT NULL,
jr_def_id integer NOT NULL,
jr_montant numeric(20,4) NOT NULL,
@@ -3456,20 +4100,23 @@ CREATE TABLE jrn (
jr_pj_number text,
jr_mt text,
jr_date_paid date,
- jr_optype character varying(3) DEFAULT 'NOR'::character varying
+ jr_optype character varying(3) DEFAULT 'NOR'::character varying,
+ currency_id bigint DEFAULT 0 NOT NULL,
+ currency_rate numeric(20,6) DEFAULT 1 NOT NULL,
+ currency_rate_ref numeric(20,6) DEFAULT 1 NOT NULL
);
-COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy
writing';
+COMMENT ON TABLE public.jrn IS 'Journal: content one line for a group of
accountancy writing';
-COMMENT ON COLUMN jrn.jr_optype IS 'Type of operation , NOR = NORMAL , OPE
opening , EXT extourne, CLO closing';
+COMMENT ON COLUMN public.jrn.jr_optype IS 'Type of operation , NOR = NORMAL ,
OPE opening , EXT extourne, CLO closing';
-CREATE TABLE jrn_def (
+CREATE TABLE public.jrn_def (
jrn_def_id integer DEFAULT nextval(('s_jrn_def'::text)::regclass) NOT NULL,
jrn_def_name text NOT NULL,
jrn_def_class_deb text,
@@ -3486,21 +4133,41 @@ CREATE TABLE jrn_def (
jrn_def_bank bigint,
jrn_def_num_op integer,
jrn_def_description text,
- jrn_enable integer DEFAULT 1
+ jrn_enable integer DEFAULT 1,
+ currency_id integer DEFAULT 0 NOT NULL,
+ jrn_def_negative_amount character(1) DEFAULT '0'::bpchar NOT NULL,
+ jrn_def_negative_warning text,
+ jrn_def_quantity smallint DEFAULT 1 NOT NULL,
+ CONSTRAINT negative_amount_ck CHECK ((jrn_def_negative_amount = ANY
(ARRAY['1'::bpchar, '0'::bpchar])))
);
-COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties';
+COMMENT ON TABLE public.jrn_def IS 'Definition of a journal, his properties';
+
+
+
+COMMENT ON COLUMN public.jrn_def.jrn_enable IS 'Set to 1 if the ledger is
enable ';
-COMMENT ON COLUMN jrn_def.jrn_enable IS 'Set to 1 if the ledger is enable ';
+COMMENT ON COLUMN public.jrn_def.currency_id IS 'Default currency for
financial ledger';
+COMMENT ON COLUMN public.jrn_def.jrn_def_negative_amount IS '1 echo a warning
if you are not using an negative amount, default 0 for no warning';
-CREATE TABLE jrn_info (
+
+
+COMMENT ON COLUMN public.jrn_def.jrn_def_negative_warning IS 'Yell a warning
if the amount if not negative , in the case of jrn_def_negative_amount is Y';
+
+
+
+COMMENT ON COLUMN public.jrn_def.jrn_def_quantity IS 'Use the quantity column,
0->disable,1->enable,used only with Sale and Purchase otherwise ignored';
+
+
+
+CREATE TABLE public.jrn_info (
ji_id integer NOT NULL,
jr_id integer NOT NULL,
id_type text NOT NULL,
@@ -3509,7 +4176,11 @@ CREATE TABLE jrn_info (
-CREATE SEQUENCE jrn_info_ji_id_seq
+COMMENT ON TABLE public.jrn_info IS 'extra info for operation';
+
+
+
+CREATE SEQUENCE public.jrn_info_ji_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3518,11 +4189,11 @@ CREATE SEQUENCE jrn_info_ji_id_seq
-ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id;
+ALTER SEQUENCE public.jrn_info_ji_id_seq OWNED BY public.jrn_info.ji_id;
-CREATE TABLE jrn_note (
+CREATE TABLE public.jrn_note (
n_id integer NOT NULL,
n_text text,
jr_id bigint NOT NULL
@@ -3530,11 +4201,11 @@ CREATE TABLE jrn_note (
-COMMENT ON TABLE jrn_note IS 'Note about operation';
+COMMENT ON TABLE public.jrn_note IS 'Note about operation';
-CREATE SEQUENCE jrn_note_n_id_seq
+CREATE SEQUENCE public.jrn_note_n_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3543,11 +4214,11 @@ CREATE SEQUENCE jrn_note_n_id_seq
-ALTER SEQUENCE jrn_note_n_id_seq OWNED BY jrn_note.n_id;
+ALTER SEQUENCE public.jrn_note_n_id_seq OWNED BY public.jrn_note.n_id;
-CREATE SEQUENCE jrn_periode_id_seq
+CREATE SEQUENCE public.jrn_periode_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3556,17 +4227,20 @@ CREATE SEQUENCE jrn_periode_id_seq
-CREATE TABLE jrn_periode (
+CREATE TABLE public.jrn_periode (
jrn_def_id integer NOT NULL,
p_id integer NOT NULL,
status text,
- id bigint DEFAULT nextval('jrn_periode_id_seq'::regclass) NOT NULL
+ id bigint DEFAULT nextval('public.jrn_periode_id_seq'::regclass) NOT NULL
);
+COMMENT ON TABLE public.jrn_periode IS 'Period by ledger';
-CREATE TABLE jrn_rapt (
+
+
+CREATE TABLE public.jrn_rapt (
jra_id integer DEFAULT nextval(('s_jrn_rapt'::text)::regclass) NOT NULL,
jr_id integer NOT NULL,
jra_concerned integer NOT NULL
@@ -3574,26 +4248,58 @@ CREATE TABLE jrn_rapt (
-COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation';
+COMMENT ON TABLE public.jrn_rapt IS 'Rapprochement between operation';
+
+
+
+CREATE TABLE public.jrn_tax (
+ jt_id integer NOT NULL,
+ j_id bigint NOT NULL,
+ pcm_val public.account_type NOT NULL,
+ ac_id integer NOT NULL
+);
+
+
+
+COMMENT ON COLUMN public.jrn_tax.j_id IS 'fk jrnx';
+
+COMMENT ON COLUMN public.jrn_tax.pcm_val IS 'FK tmp_pcmn';
-CREATE TABLE jrn_type (
+
+
+COMMENT ON COLUMN public.jrn_tax.ac_id IS 'FK to acc_other_tax';
+
+
+
+ALTER TABLE public.jrn_tax ALTER COLUMN jt_id ADD GENERATED ALWAYS AS IDENTITY
(
+ SEQUENCE NAME public.jrn_tax_jt_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+
+
+
+CREATE TABLE public.jrn_type (
jrn_type_id character(3) NOT NULL,
jrn_desc text
);
-COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)';
+COMMENT ON TABLE public.jrn_type IS 'Type of journal (Sell, Buy,
Financial...)';
-CREATE TABLE jrnx (
+CREATE TABLE public.jrnx (
j_id integer DEFAULT nextval(('s_jrn_op'::text)::regclass) NOT NULL,
j_date date DEFAULT now(),
j_montant numeric(20,4) DEFAULT 0,
- j_poste account_type NOT NULL,
+ j_poste public.account_type NOT NULL,
j_grpt integer NOT NULL,
j_rapt text,
j_jrn_def integer NOT NULL,
@@ -3610,12 +4316,11 @@ CREATE TABLE jrnx (
-COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy
writing';
-
+COMMENT ON TABLE public.jrnx IS 'Journal: content one line for each
accountancy writing';
-CREATE TABLE key_distribution (
+CREATE TABLE public.key_distribution (
kd_id integer NOT NULL,
kd_name text,
kd_description text
@@ -3623,23 +4328,23 @@ CREATE TABLE key_distribution (
-COMMENT ON TABLE key_distribution IS 'Distribution key for analytic';
+COMMENT ON TABLE public.key_distribution IS 'Distribution key for analytic';
-COMMENT ON COLUMN key_distribution.kd_id IS 'PK';
+COMMENT ON COLUMN public.key_distribution.kd_id IS 'PK';
-COMMENT ON COLUMN key_distribution.kd_name IS 'Name of the key';
+COMMENT ON COLUMN public.key_distribution.kd_name IS 'Name of the key';
-COMMENT ON COLUMN key_distribution.kd_description IS 'Description of the key';
+COMMENT ON COLUMN public.key_distribution.kd_description IS 'Description of
the key';
-CREATE TABLE key_distribution_activity (
+CREATE TABLE public.key_distribution_activity (
ka_id integer NOT NULL,
ke_id bigint NOT NULL,
po_id bigint,
@@ -3648,27 +4353,27 @@ CREATE TABLE key_distribution_activity (
-COMMENT ON TABLE key_distribution_activity IS 'Contains the analytic account';
+COMMENT ON TABLE public.key_distribution_activity IS 'Contains the analytic
account';
-COMMENT ON COLUMN key_distribution_activity.ka_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_activity.ka_id IS 'pk';
-COMMENT ON COLUMN key_distribution_activity.ke_id IS 'fk to
key_distribution_detail';
+COMMENT ON COLUMN public.key_distribution_activity.ke_id IS 'fk to
key_distribution_detail';
-COMMENT ON COLUMN key_distribution_activity.po_id IS 'fk to poste_analytique';
+COMMENT ON COLUMN public.key_distribution_activity.po_id IS 'fk to
poste_analytique';
-COMMENT ON COLUMN key_distribution_activity.pa_id IS 'fk to plan_analytique';
+COMMENT ON COLUMN public.key_distribution_activity.pa_id IS 'fk to
plan_analytique';
-CREATE SEQUENCE key_distribution_activity_ka_id_seq
+CREATE SEQUENCE public.key_distribution_activity_ka_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3677,11 +4382,11 @@ CREATE SEQUENCE key_distribution_activity_ka_id_seq
-ALTER SEQUENCE key_distribution_activity_ka_id_seq OWNED BY
key_distribution_activity.ka_id;
+ALTER SEQUENCE public.key_distribution_activity_ka_id_seq OWNED BY
public.key_distribution_activity.ka_id;
-CREATE TABLE key_distribution_detail (
+CREATE TABLE public.key_distribution_detail (
ke_id integer NOT NULL,
kd_id bigint NOT NULL,
ke_row integer NOT NULL,
@@ -3690,23 +4395,23 @@ CREATE TABLE key_distribution_detail (
-COMMENT ON TABLE key_distribution_detail IS 'Row of activity and percent';
+COMMENT ON TABLE public.key_distribution_detail IS 'Row of activity and
percent';
-COMMENT ON COLUMN key_distribution_detail.ke_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_detail.ke_id IS 'pk';
-COMMENT ON COLUMN key_distribution_detail.kd_id IS 'fk to key_distribution';
+COMMENT ON COLUMN public.key_distribution_detail.kd_id IS 'fk to
key_distribution';
-COMMENT ON COLUMN key_distribution_detail.ke_row IS 'group order';
+COMMENT ON COLUMN public.key_distribution_detail.ke_row IS 'group order';
-CREATE SEQUENCE key_distribution_detail_ke_id_seq
+CREATE SEQUENCE public.key_distribution_detail_ke_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3715,11 +4420,11 @@ CREATE SEQUENCE key_distribution_detail_ke_id_seq
-ALTER SEQUENCE key_distribution_detail_ke_id_seq OWNED BY
key_distribution_detail.ke_id;
+ALTER SEQUENCE public.key_distribution_detail_ke_id_seq OWNED BY
public.key_distribution_detail.ke_id;
-CREATE SEQUENCE key_distribution_kd_id_seq
+CREATE SEQUENCE public.key_distribution_kd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3728,11 +4433,11 @@ CREATE SEQUENCE key_distribution_kd_id_seq
-ALTER SEQUENCE key_distribution_kd_id_seq OWNED BY key_distribution.kd_id;
+ALTER SEQUENCE public.key_distribution_kd_id_seq OWNED BY
public.key_distribution.kd_id;
-CREATE TABLE key_distribution_ledger (
+CREATE TABLE public.key_distribution_ledger (
kl_id integer NOT NULL,
kd_id bigint NOT NULL,
jrn_def_id bigint NOT NULL
@@ -3740,23 +4445,23 @@ CREATE TABLE key_distribution_ledger (
-COMMENT ON TABLE key_distribution_ledger IS 'Legder where the distribution key
can be used';
+COMMENT ON TABLE public.key_distribution_ledger IS 'Legder where the
distribution key can be used';
-COMMENT ON COLUMN key_distribution_ledger.kl_id IS 'pk';
+COMMENT ON COLUMN public.key_distribution_ledger.kl_id IS 'pk';
-COMMENT ON COLUMN key_distribution_ledger.kd_id IS 'fk to key_distribution';
+COMMENT ON COLUMN public.key_distribution_ledger.kd_id IS 'fk to
key_distribution';
-COMMENT ON COLUMN key_distribution_ledger.jrn_def_id IS 'fk to jrnd_def,
ledger where this key is available';
+COMMENT ON COLUMN public.key_distribution_ledger.jrn_def_id IS 'fk to
jrnd_def, ledger where this key is available';
-CREATE SEQUENCE key_distribution_ledger_kl_id_seq
+CREATE SEQUENCE public.key_distribution_ledger_kl_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3765,11 +4470,11 @@ CREATE SEQUENCE key_distribution_ledger_kl_id_seq
-ALTER SEQUENCE key_distribution_ledger_kl_id_seq OWNED BY
key_distribution_ledger.kl_id;
+ALTER SEQUENCE public.key_distribution_ledger_kl_id_seq OWNED BY
public.key_distribution_ledger.kl_id;
-CREATE TABLE letter_cred (
+CREATE TABLE public.letter_cred (
lc_id integer NOT NULL,
j_id bigint NOT NULL,
jl_id bigint NOT NULL
@@ -3777,7 +4482,11 @@ CREATE TABLE letter_cred (
-CREATE SEQUENCE letter_cred_lc_id_seq
+COMMENT ON TABLE public.letter_cred IS 'Letter cred';
+
+
+
+CREATE SEQUENCE public.letter_cred_lc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3786,11 +4495,11 @@ CREATE SEQUENCE letter_cred_lc_id_seq
-ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id;
+ALTER SEQUENCE public.letter_cred_lc_id_seq OWNED BY public.letter_cred.lc_id;
-CREATE TABLE letter_deb (
+CREATE TABLE public.letter_deb (
ld_id integer NOT NULL,
j_id bigint NOT NULL,
jl_id bigint NOT NULL
@@ -3798,7 +4507,11 @@ CREATE TABLE letter_deb (
-CREATE SEQUENCE letter_deb_ld_id_seq
+COMMENT ON TABLE public.letter_deb IS 'letter deb';
+
+
+
+CREATE SEQUENCE public.letter_deb_ld_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3807,18 +4520,18 @@ CREATE SEQUENCE letter_deb_ld_id_seq
-ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id;
+ALTER SEQUENCE public.letter_deb_ld_id_seq OWNED BY public.letter_deb.ld_id;
-CREATE TABLE link_action_type (
+CREATE TABLE public.link_action_type (
l_id bigint NOT NULL,
l_desc character varying
);
-CREATE SEQUENCE link_action_type_l_id_seq
+CREATE SEQUENCE public.link_action_type_l_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3827,11 +4540,11 @@ CREATE SEQUENCE link_action_type_l_id_seq
-ALTER SEQUENCE link_action_type_l_id_seq OWNED BY link_action_type.l_id;
+ALTER SEQUENCE public.link_action_type_l_id_seq OWNED BY
public.link_action_type.l_id;
-CREATE TABLE menu_default (
+CREATE TABLE public.menu_default (
md_id integer NOT NULL,
md_code text NOT NULL,
me_code text NOT NULL
@@ -3839,7 +4552,11 @@ CREATE TABLE menu_default (
-CREATE SEQUENCE menu_default_md_id_seq
+COMMENT ON TABLE public.menu_default IS 'default menu for certains actions';
+
+
+
+CREATE SEQUENCE public.menu_default_md_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3848,11 +4565,11 @@ CREATE SEQUENCE menu_default_md_id_seq
-ALTER SEQUENCE menu_default_md_id_seq OWNED BY menu_default.md_id;
+ALTER SEQUENCE public.menu_default_md_id_seq OWNED BY
public.menu_default.md_id;
-CREATE TABLE menu_ref (
+CREATE TABLE public.menu_ref (
me_code text NOT NULL,
me_menu text,
me_file text,
@@ -3866,30 +4583,34 @@ CREATE TABLE menu_ref (
-COMMENT ON COLUMN menu_ref.me_code IS 'Menu Code ';
+COMMENT ON TABLE public.menu_ref IS 'Definition of all the menu';
+
+
+COMMENT ON COLUMN public.menu_ref.me_code IS 'Menu Code ';
-COMMENT ON COLUMN menu_ref.me_menu IS 'Label to display';
+COMMENT ON COLUMN public.menu_ref.me_menu IS 'Label to display';
-COMMENT ON COLUMN menu_ref.me_file IS 'if not empty file to include';
+COMMENT ON COLUMN public.menu_ref.me_file IS 'if not empty file to include';
-COMMENT ON COLUMN menu_ref.me_url IS 'url ';
+COMMENT ON COLUMN public.menu_ref.me_url IS 'url ';
-COMMENT ON COLUMN menu_ref.me_type IS 'ME for menu
+
+COMMENT ON COLUMN public.menu_ref.me_type IS 'ME for menu
PR for Printing
SP for special meaning (ex: return to line)
PL for plugin';
-CREATE TABLE mod_payment (
+CREATE TABLE public.payment_method (
mp_id integer NOT NULL,
mp_lib text NOT NULL,
mp_jrn_def_id integer NOT NULL,
@@ -3900,15 +4621,15 @@ CREATE TABLE mod_payment (
-COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and
the corresponding ledger';
+COMMENT ON TABLE public.payment_method IS 'Contains the different media of
payment and the corresponding ledger';
-COMMENT ON COLUMN mod_payment.jrn_def_id IS 'Ledger using this payment method';
+COMMENT ON COLUMN public.payment_method.jrn_def_id IS 'Ledger using this
payment method';
-CREATE SEQUENCE mod_payment_mp_id_seq
+CREATE SEQUENCE public.mod_payment_mp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3917,11 +4638,11 @@ CREATE SEQUENCE mod_payment_mp_id_seq
-ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id;
+ALTER SEQUENCE public.mod_payment_mp_id_seq OWNED BY
public.payment_method.mp_id;
-CREATE SEQUENCE op_def_op_seq
+CREATE SEQUENCE public.op_def_op_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3930,8 +4651,8 @@ CREATE SEQUENCE op_def_op_seq
-CREATE TABLE op_predef (
- od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL,
+CREATE TABLE public.op_predef (
+ od_id integer DEFAULT nextval('public.op_def_op_seq'::regclass) NOT NULL,
jrn_def_id integer NOT NULL,
od_name text NOT NULL,
od_item integer NOT NULL,
@@ -3942,19 +4663,19 @@ CREATE TABLE op_predef (
-COMMENT ON TABLE op_predef IS 'predefined operation';
+COMMENT ON TABLE public.op_predef IS 'predefined operation';
-COMMENT ON COLUMN op_predef.jrn_def_id IS 'jrn_id';
+COMMENT ON COLUMN public.op_predef.jrn_def_id IS 'jrn_id';
-COMMENT ON COLUMN op_predef.od_name IS 'name of the operation';
+COMMENT ON COLUMN public.op_predef.od_name IS 'name of the operation';
-CREATE SEQUENCE op_predef_detail_opd_id_seq
+CREATE SEQUENCE public.op_predef_detail_opd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3963,12 +4684,12 @@ CREATE SEQUENCE op_predef_detail_opd_id_seq
-CREATE TABLE op_predef_detail (
- opd_id integer DEFAULT nextval('op_predef_detail_opd_id_seq'::regclass)
NOT NULL,
+CREATE TABLE public.op_predef_detail (
+ opd_id integer DEFAULT
nextval('public.op_predef_detail_opd_id_seq'::regclass) NOT NULL,
od_id integer NOT NULL,
opd_poste text NOT NULL,
opd_amount numeric(20,4),
- opd_tva_id integer,
+ opd_tva_id text,
opd_quantity numeric(20,4),
opd_debit boolean NOT NULL,
opd_tva_amount numeric(20,4),
@@ -3978,11 +4699,11 @@ CREATE TABLE op_predef_detail (
-COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined
operations';
+COMMENT ON TABLE public.op_predef_detail IS 'contains the detail of predefined
operations';
-CREATE SEQUENCE s_oa_group
+CREATE SEQUENCE public.s_oa_group
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -3991,14 +4712,14 @@ CREATE SEQUENCE s_oa_group
-CREATE TABLE operation_analytique (
- oa_id integer DEFAULT nextval('historique_analytique_ha_id_seq'::regclass)
NOT NULL,
+CREATE TABLE public.operation_analytique (
+ oa_id integer DEFAULT
nextval('public.historique_analytique_ha_id_seq'::regclass) NOT NULL,
po_id integer NOT NULL,
oa_amount numeric(20,4) NOT NULL,
oa_description text,
oa_debit boolean DEFAULT true NOT NULL,
j_id integer,
- oa_group integer DEFAULT nextval('s_oa_group'::regclass) NOT NULL,
+ oa_group integer DEFAULT nextval('public.s_oa_group'::regclass) NOT NULL,
oa_date date NOT NULL,
oa_row integer,
oa_jrnx_id_source bigint,
@@ -4009,35 +4730,198 @@ CREATE TABLE operation_analytique (
-COMMENT ON TABLE operation_analytique IS 'History of the analytic account';
+COMMENT ON TABLE public.operation_analytique IS 'History of the analytic
account';
+
+
+
+COMMENT ON COLUMN public.operation_analytique.oa_jrnx_id_source IS 'jrnx.j_id
source of this amount, this amount is computed from an amount giving a ND
VAT.Normally NULL is there is no ND VAT.';
+
+
+
+COMMENT ON COLUMN public.operation_analytique.oa_positive IS 'Sign of the
amount';
+
+
+
+COMMENT ON COLUMN public.operation_analytique.f_id IS 'FK to fiche.f_id , used
only with ODS';
+
+
+
+CREATE TABLE public.operation_currency (
+ id bigint NOT NULL,
+ oc_amount numeric(20,6) NOT NULL,
+ oc_vat_amount numeric(20,6) DEFAULT 0,
+ oc_price_unit numeric(20,6),
+ j_id bigint NOT NULL
+);
+
+
+
+COMMENT ON TABLE public.operation_currency IS 'Information about currency';
+
+
+COMMENT ON COLUMN public.operation_currency.oc_amount IS 'amount in currency';
-COMMENT ON COLUMN operation_analytique.oa_jrnx_id_source IS 'jrnx.j_id source
of this amount, this amount is computed from an amount giving a ND VAT.Normally
NULL is there is no ND VAT.';
+COMMENT ON COLUMN public.operation_currency.oc_vat_amount IS 'vat amount in
currency';
-COMMENT ON COLUMN operation_analytique.oa_positive IS 'Sign of the amount';
+COMMENT ON COLUMN public.operation_currency.oc_price_unit IS 'unit price in
currency';
-COMMENT ON COLUMN operation_analytique.f_id IS 'FK to fiche.f_id , used only
with ODS';
+COMMENT ON COLUMN public.operation_currency.j_id IS 'fk to jrnx';
-CREATE TABLE parameter (
+CREATE SEQUENCE public.operation_currency_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.operation_currency_id_seq OWNED BY
public.operation_currency.id;
+
+
+
+CREATE TABLE public.operation_exercice (
+ oe_id bigint NOT NULL,
+ oe_date date,
+ oe_type text NOT NULL,
+ oe_text text,
+ oe_dossier_id integer NOT NULL,
+ oe_exercice integer NOT NULL,
+ jr_internal text,
+ oe_transfer_date timestamp without time zone,
+ tech_user text,
+ tech_date timestamp without time zone DEFAULT now(),
+ CONSTRAINT operation_exercice_oe_type_check CHECK (((oe_type =
'opening'::text) OR (oe_type = 'closing'::text)))
+);
+
+
+
+CREATE TABLE public.operation_exercice_detail (
+ oed_id bigint NOT NULL,
+ oe_id bigint NOT NULL,
+ oed_poste public.account_type,
+ oed_qcode text,
+ oed_label text,
+ oed_amount numeric(20,4),
+ oed_debit boolean
+);
+
+
+
+ALTER TABLE public.operation_exercice_detail ALTER COLUMN oed_id ADD GENERATED
BY DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.operation_exercice_detail_oed_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+
+
+
+ALTER TABLE public.operation_exercice ALTER COLUMN oe_id ADD GENERATED BY
DEFAULT AS IDENTITY (
+ SEQUENCE NAME public.operation_exercice_oe_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+
+
+
+CREATE TABLE public.operation_tag (
+ opt_id bigint NOT NULL,
+ jrn_id bigint,
+ tag_id integer
+);
+
+
+
+COMMENT ON TABLE public.operation_tag IS 'Tag for operation';
+
+
+
+CREATE SEQUENCE public.operation_tag_opt_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.operation_tag_opt_id_seq OWNED BY
public.operation_tag.opt_id;
+
+
+
+CREATE TABLE public.parameter (
pr_id text NOT NULL,
pr_value text
);
-COMMENT ON TABLE parameter IS 'parameter of the company';
+COMMENT ON TABLE public.parameter IS 'parameter of the company';
+
+
+
+CREATE TABLE public.parameter_extra (
+ id integer NOT NULL,
+ pe_code text,
+ pe_label text,
+ pe_value text
+);
+
+
+
+COMMENT ON TABLE public.parameter_extra IS 'Extra parameter for the folder';
+
+
+
+COMMENT ON COLUMN public.parameter_extra.pe_code IS 'Code used in the
Document:generate';
-CREATE TABLE parm_code (
+COMMENT ON COLUMN public.parameter_extra.pe_label IS 'Label description';
+
+
+
+COMMENT ON COLUMN public.parameter_extra.pe_value IS 'Value which will replace
the tag in Document:generate';
+
+
+
+CREATE SEQUENCE public.parameter_extra_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.parameter_extra_id_seq OWNED BY
public.parameter_extra.id;
+
+
+
+CREATE TABLE public.parm_appearance (
+ a_code text NOT NULL,
+ a_value text NOT NULL
+);
+
+
+
+CREATE TABLE public.parm_code (
p_code text NOT NULL,
p_value text,
p_comment text
@@ -4045,7 +4929,11 @@ CREATE TABLE parm_code (
-CREATE TABLE parm_money (
+COMMENT ON TABLE public.parm_code IS 'Parameter code and accountancy';
+
+
+
+CREATE TABLE public.parm_money (
pm_id integer DEFAULT nextval(('s_currency'::text)::regclass),
pm_code character(3) NOT NULL,
pm_rate numeric(20,4)
@@ -4053,39 +4941,63 @@ CREATE TABLE parm_money (
-COMMENT ON TABLE parm_money IS 'Currency conversion';
+COMMENT ON TABLE public.parm_money IS 'Currency conversion';
-CREATE TABLE parm_periode (
+CREATE TABLE public.parm_periode (
p_id integer DEFAULT nextval(('s_periode'::text)::regclass) NOT NULL,
p_start date NOT NULL,
p_end date NOT NULL,
p_exercice text DEFAULT to_char(now(), 'YYYY'::text) NOT NULL,
p_closed boolean DEFAULT false,
p_central boolean DEFAULT false,
+ p_exercice_label text NOT NULL,
CONSTRAINT parm_periode_check CHECK ((p_end >= p_start))
);
-COMMENT ON TABLE parm_periode IS 'Periode definition';
+COMMENT ON TABLE public.parm_periode IS 'Periode definition';
+
+
+
+COMMENT ON COLUMN public.parm_periode.p_start IS 'Start date of periode';
+
+
+
+COMMENT ON COLUMN public.parm_periode.p_end IS 'End date of periode';
+
+
+
+COMMENT ON COLUMN public.parm_periode.p_exercice IS 'Exercice';
+
+COMMENT ON COLUMN public.parm_periode.p_closed IS 'is closed';
-CREATE TABLE parm_poste (
- p_value account_type NOT NULL,
+
+COMMENT ON COLUMN public.parm_periode.p_central IS 'is centralized (obsolete)';
+
+
+
+COMMENT ON COLUMN public.parm_periode.p_exercice_label IS 'label of the
exercice';
+
+
+
+CREATE TABLE public.parm_poste (
+ p_value public.account_type NOT NULL,
p_type text NOT NULL
);
-COMMENT ON TABLE parm_poste IS 'Contains data for finding is the type of the
account (asset)';
+COMMENT ON TABLE public.parm_poste IS 'Contains data for finding is the type
of the account (asset)';
-CREATE SEQUENCE plan_analytique_pa_id_seq
+CREATE SEQUENCE public.plan_analytique_pa_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4094,19 +5006,19 @@ CREATE SEQUENCE plan_analytique_pa_id_seq
-CREATE TABLE plan_analytique (
- pa_id integer DEFAULT nextval('plan_analytique_pa_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.plan_analytique (
+ pa_id integer DEFAULT
nextval('public.plan_analytique_pa_id_seq'::regclass) NOT NULL,
pa_name text DEFAULT 'Sans Nom'::text NOT NULL,
pa_description text
);
-COMMENT ON TABLE plan_analytique IS 'Plan Analytique (max 5)';
+COMMENT ON TABLE public.plan_analytique IS 'Plan Analytique (max 5)';
-CREATE SEQUENCE poste_analytique_po_id_seq
+CREATE SEQUENCE public.poste_analytique_po_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4115,95 +5027,164 @@ CREATE SEQUENCE poste_analytique_po_id_seq
-CREATE TABLE poste_analytique (
- po_id integer DEFAULT nextval('poste_analytique_po_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.poste_analytique (
+ po_id integer DEFAULT
nextval('public.poste_analytique_po_id_seq'::regclass) NOT NULL,
po_name text NOT NULL,
pa_id integer NOT NULL,
po_amount numeric(20,4) DEFAULT 0.0 NOT NULL,
po_description text,
- ga_id character varying(10)
+ ga_id character varying(10),
+ po_state integer DEFAULT 1 NOT NULL
);
-COMMENT ON TABLE poste_analytique IS 'Poste Analytique';
+COMMENT ON TABLE public.poste_analytique IS 'Poste Analytique';
+
+
+COMMENT ON COLUMN public.poste_analytique.po_state IS 'Analytic Account state
: 0 disabled 0 enabled ';
-CREATE TABLE profile (
+
+CREATE TABLE public.profile (
p_name text NOT NULL,
p_id integer NOT NULL,
p_desc text,
with_calc boolean DEFAULT true,
- with_direct_form boolean DEFAULT true
+ with_direct_form boolean DEFAULT true,
+ with_search_card integer
);
-COMMENT ON TABLE profile IS 'Available profile ';
+COMMENT ON TABLE public.profile IS 'Available profile ';
+
+
+
+COMMENT ON COLUMN public.profile.p_name IS 'Name of the profile';
+
+
+
+COMMENT ON COLUMN public.profile.p_desc IS 'description of the profile';
+
+
+
+COMMENT ON COLUMN public.profile.with_calc IS 'show the calculator';
+
+
+
+COMMENT ON COLUMN public.profile.with_direct_form IS 'show the direct form';
+
+
+
+COMMENT ON COLUMN public.profile.with_search_card IS 'Display a icon for
searching card : 1 display, 0 not displaid';
+
+
+
+CREATE TABLE public.profile_menu (
+ pm_id integer NOT NULL,
+ me_code text,
+ me_code_dep text,
+ p_id integer,
+ p_order integer,
+ p_type_display text NOT NULL,
+ pm_default integer,
+ pm_id_dep bigint
+);
+
+
+
+COMMENT ON TABLE public.profile_menu IS 'Join between the profile and the
menu ';
+
+
+
+COMMENT ON COLUMN public.profile_menu.me_code_dep IS 'menu code dependency';
+
+
+
+COMMENT ON COLUMN public.profile_menu.p_id IS 'link to profile';
+
+
+
+COMMENT ON COLUMN public.profile_menu.p_order IS 'order of displaying menu';
+
+
+
+COMMENT ON COLUMN public.profile_menu.p_type_display IS 'M is a module
+E is a menu
+S is a select (for plugin)';
+
+
+
+COMMENT ON COLUMN public.profile_menu.pm_default IS 'default menu';
-COMMENT ON COLUMN profile.p_name IS 'Name of the profile';
+COMMENT ON COLUMN public.profile_menu.pm_id_dep IS 'parent of this menu item';
-COMMENT ON COLUMN profile.p_desc IS 'description of the profile';
+CREATE SEQUENCE public.profile_menu_pm_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
-COMMENT ON COLUMN profile.with_calc IS 'show the calculator';
+ALTER SEQUENCE public.profile_menu_pm_id_seq OWNED BY
public.profile_menu.pm_id;
-COMMENT ON COLUMN profile.with_direct_form IS 'show the direct form';
+CREATE TABLE public.profile_menu_type (
+ pm_type text NOT NULL,
+ pm_desc text
+);
-CREATE TABLE profile_menu (
- pm_id integer NOT NULL,
- me_code text,
- me_code_dep text,
- p_id integer,
- p_order integer,
- p_type_display text NOT NULL,
- pm_default integer,
- pm_id_dep bigint
-);
+COMMENT ON TABLE public.profile_menu_type IS 'Type of menu';
-COMMENT ON TABLE profile_menu IS 'Join between the profile and the menu ';
+CREATE TABLE public.profile_mobile (
+ pmo_id integer NOT NULL,
+ me_code text NOT NULL,
+ pmo_order integer NOT NULL,
+ p_id integer NOT NULL,
+ pmo_default character(1) DEFAULT '1'::bpchar
+);
-COMMENT ON COLUMN profile_menu.me_code_dep IS 'menu code dependency';
+COMMENT ON TABLE public.profile_mobile IS 'Menu for mobile device';
-COMMENT ON COLUMN profile_menu.p_id IS 'link to profile';
+COMMENT ON COLUMN public.profile_mobile.pmo_id IS 'primary key';
-COMMENT ON COLUMN profile_menu.p_order IS 'order of displaying menu';
+COMMENT ON COLUMN public.profile_mobile.me_code IS 'Code of menu_ref to
execute';
-COMMENT ON COLUMN profile_menu.p_type_display IS 'M is a module
-E is a menu
-S is a select (for plugin)';
+COMMENT ON COLUMN public.profile_mobile.pmo_order IS 'item order in menu';
-COMMENT ON COLUMN profile_menu.pm_default IS 'default menu';
+COMMENT ON COLUMN public.profile_mobile.p_id IS 'Profile id ';
-COMMENT ON COLUMN profile_menu.pm_id_dep IS 'parent of this menu item';
+COMMENT ON COLUMN public.profile_mobile.pmo_default IS 'possible values are 1
, the default HTML header (javascript,CSS,...) is loaded , 0 nothing is
loaded from noalyss ';
-CREATE SEQUENCE profile_menu_pm_id_seq
+CREATE SEQUENCE public.profile_mobile_pmo_id_seq
+ AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4212,18 +5193,11 @@ CREATE SEQUENCE profile_menu_pm_id_seq
-ALTER SEQUENCE profile_menu_pm_id_seq OWNED BY profile_menu.pm_id;
+ALTER SEQUENCE public.profile_mobile_pmo_id_seq OWNED BY
public.profile_mobile.pmo_id;
-CREATE TABLE profile_menu_type (
- pm_type text NOT NULL,
- pm_desc text
-);
-
-
-
-CREATE SEQUENCE profile_p_id_seq
+CREATE SEQUENCE public.profile_p_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4232,11 +5206,11 @@ CREATE SEQUENCE profile_p_id_seq
-ALTER SEQUENCE profile_p_id_seq OWNED BY profile.p_id;
+ALTER SEQUENCE public.profile_p_id_seq OWNED BY public.profile.p_id;
-CREATE TABLE profile_sec_repository (
+CREATE TABLE public.profile_sec_repository (
ur_id bigint NOT NULL,
p_id bigint,
r_id bigint,
@@ -4246,27 +5220,27 @@ CREATE TABLE profile_sec_repository (
-COMMENT ON TABLE profile_sec_repository IS 'Available profile for user';
+COMMENT ON TABLE public.profile_sec_repository IS 'Available profile for user';
-COMMENT ON COLUMN profile_sec_repository.ur_id IS 'pk';
+COMMENT ON COLUMN public.profile_sec_repository.ur_id IS 'pk';
-COMMENT ON COLUMN profile_sec_repository.p_id IS 'fk to profile';
+COMMENT ON COLUMN public.profile_sec_repository.p_id IS 'fk to profile';
-COMMENT ON COLUMN profile_sec_repository.r_id IS 'fk to stock_repository';
+COMMENT ON COLUMN public.profile_sec_repository.r_id IS 'fk to
stock_repository';
-COMMENT ON COLUMN profile_sec_repository.ur_right IS 'Type of right : R for
readonly W for write';
+COMMENT ON COLUMN public.profile_sec_repository.ur_right IS 'Type of right : R
for readonly W for write';
-CREATE SEQUENCE profile_sec_repository_ur_id_seq
+CREATE SEQUENCE public.profile_sec_repository_ur_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4275,11 +5249,11 @@ CREATE SEQUENCE profile_sec_repository_ur_id_seq
-ALTER SEQUENCE profile_sec_repository_ur_id_seq OWNED BY
profile_sec_repository.ur_id;
+ALTER SEQUENCE public.profile_sec_repository_ur_id_seq OWNED BY
public.profile_sec_repository.ur_id;
-CREATE TABLE profile_user (
+CREATE TABLE public.profile_user (
user_name text NOT NULL,
pu_id integer NOT NULL,
p_id integer
@@ -4287,19 +5261,19 @@ CREATE TABLE profile_user (
-COMMENT ON TABLE profile_user IS 'Contains the available profile for users';
+COMMENT ON TABLE public.profile_user IS 'Contains the available profile for
users';
-COMMENT ON COLUMN profile_user.user_name IS 'fk to available_user : login';
+COMMENT ON COLUMN public.profile_user.user_name IS 'fk to available_user :
login';
-COMMENT ON COLUMN profile_user.p_id IS 'fk to profile';
+COMMENT ON COLUMN public.profile_user.p_id IS 'fk to profile';
-CREATE SEQUENCE profile_user_pu_id_seq
+CREATE SEQUENCE public.profile_user_pu_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4308,25 +5282,26 @@ CREATE SEQUENCE profile_user_pu_id_seq
-ALTER SEQUENCE profile_user_pu_id_seq OWNED BY profile_user.pu_id;
+ALTER SEQUENCE public.profile_user_pu_id_seq OWNED BY
public.profile_user.pu_id;
-CREATE TABLE quant_fin (
+CREATE TABLE public.quant_fin (
qf_id bigint NOT NULL,
qf_bank bigint,
jr_id bigint,
qf_other bigint,
- qf_amount numeric(20,4) DEFAULT 0
+ qf_amount numeric(20,4) DEFAULT 0,
+ j_id bigint
);
-COMMENT ON TABLE quant_fin IS 'Simple operation for financial';
+COMMENT ON TABLE public.quant_fin IS 'Simple operation for financial';
-CREATE SEQUENCE quant_fin_qf_id_seq
+CREATE SEQUENCE public.quant_fin_qf_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4335,11 +5310,11 @@ CREATE SEQUENCE quant_fin_qf_id_seq
-ALTER SEQUENCE quant_fin_qf_id_seq OWNED BY quant_fin.qf_id;
+ALTER SEQUENCE public.quant_fin_qf_id_seq OWNED BY public.quant_fin.qf_id;
-CREATE TABLE quant_purchase (
+CREATE TABLE public.quant_purchase (
qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL,
qp_internal text,
j_id integer NOT NULL,
@@ -4360,12 +5335,15 @@ CREATE TABLE quant_purchase (
-COMMENT ON COLUMN quant_purchase.qp_vat_sided IS 'amount of the VAT which
avoid VAT, case of the VAT which add the same amount at the deb and cred';
+COMMENT ON TABLE public.quant_purchase IS 'Supplemental info for purchase';
+
+
+COMMENT ON COLUMN public.quant_purchase.qp_vat_sided IS 'amount of the VAT
which avoid VAT, case of the VAT which add the same amount at the deb and cred';
-CREATE TABLE quant_sold (
+CREATE TABLE public.quant_sold (
qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL,
qs_internal text,
qs_fiche integer NOT NULL,
@@ -4382,11 +5360,11 @@ CREATE TABLE quant_sold (
-COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer';
+COMMENT ON TABLE public.quant_sold IS 'Contains about invoice for customer';
-CREATE SEQUENCE s_attr_def
+CREATE SEQUENCE public.s_attr_def
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4395,7 +5373,7 @@ CREATE SEQUENCE s_attr_def
-CREATE SEQUENCE s_cbc
+CREATE SEQUENCE public.s_cbc
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4404,7 +5382,7 @@ CREATE SEQUENCE s_cbc
-CREATE SEQUENCE s_central
+CREATE SEQUENCE public.s_central
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4413,7 +5391,7 @@ CREATE SEQUENCE s_central
-CREATE SEQUENCE s_central_order
+CREATE SEQUENCE public.s_central_order
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4422,7 +5400,7 @@ CREATE SEQUENCE s_central_order
-CREATE SEQUENCE s_centralized
+CREATE SEQUENCE public.s_centralized
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4431,7 +5409,7 @@ CREATE SEQUENCE s_centralized
-CREATE SEQUENCE s_currency
+CREATE SEQUENCE public.s_currency
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4440,7 +5418,7 @@ CREATE SEQUENCE s_currency
-CREATE SEQUENCE s_fdef
+CREATE SEQUENCE public.s_fdef
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4449,7 +5427,7 @@ CREATE SEQUENCE s_fdef
-CREATE SEQUENCE s_fiche
+CREATE SEQUENCE public.s_fiche
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4458,7 +5436,7 @@ CREATE SEQUENCE s_fiche
-CREATE SEQUENCE s_fiche_def_ref
+CREATE SEQUENCE public.s_fiche_def_ref
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4467,7 +5445,7 @@ CREATE SEQUENCE s_fiche_def_ref
-CREATE SEQUENCE s_form
+CREATE SEQUENCE public.s_form
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4476,7 +5454,7 @@ CREATE SEQUENCE s_form
-CREATE SEQUENCE s_formdef
+CREATE SEQUENCE public.s_formdef
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4485,7 +5463,7 @@ CREATE SEQUENCE s_formdef
-CREATE SEQUENCE s_grpt
+CREATE SEQUENCE public.s_grpt
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4494,7 +5472,7 @@ CREATE SEQUENCE s_grpt
-CREATE SEQUENCE s_idef
+CREATE SEQUENCE public.s_idef
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4503,7 +5481,7 @@ CREATE SEQUENCE s_idef
-CREATE SEQUENCE s_internal
+CREATE SEQUENCE public.s_internal
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4512,7 +5490,7 @@ CREATE SEQUENCE s_internal
-CREATE SEQUENCE s_invoice
+CREATE SEQUENCE public.s_invoice
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4521,7 +5499,7 @@ CREATE SEQUENCE s_invoice
-CREATE SEQUENCE s_isup
+CREATE SEQUENCE public.s_isup
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4530,7 +5508,7 @@ CREATE SEQUENCE s_isup
-CREATE SEQUENCE s_jnt_fic_att_value
+CREATE SEQUENCE public.s_jnt_fic_att_value
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4539,7 +5517,7 @@ CREATE SEQUENCE s_jnt_fic_att_value
-CREATE SEQUENCE s_jrn
+CREATE SEQUENCE public.s_jrn
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4548,7 +5526,7 @@ CREATE SEQUENCE s_jrn
-CREATE SEQUENCE s_jrn_1
+CREATE SEQUENCE public.s_jrn_1
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4557,7 +5535,7 @@ CREATE SEQUENCE s_jrn_1
-CREATE SEQUENCE s_jrn_2
+CREATE SEQUENCE public.s_jrn_2
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4566,7 +5544,7 @@ CREATE SEQUENCE s_jrn_2
-CREATE SEQUENCE s_jrn_3
+CREATE SEQUENCE public.s_jrn_3
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4575,7 +5553,7 @@ CREATE SEQUENCE s_jrn_3
-CREATE SEQUENCE s_jrn_4
+CREATE SEQUENCE public.s_jrn_4
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4584,7 +5562,7 @@ CREATE SEQUENCE s_jrn_4
-CREATE SEQUENCE s_jrn_def
+CREATE SEQUENCE public.s_jrn_def
START WITH 5
INCREMENT BY 1
NO MINVALUE
@@ -4593,7 +5571,7 @@ CREATE SEQUENCE s_jrn_def
-CREATE SEQUENCE s_jrn_op
+CREATE SEQUENCE public.s_jrn_op
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4602,7 +5580,7 @@ CREATE SEQUENCE s_jrn_op
-CREATE SEQUENCE s_jrn_pj1
+CREATE SEQUENCE public.s_jrn_pj1
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4611,7 +5589,7 @@ CREATE SEQUENCE s_jrn_pj1
-CREATE SEQUENCE s_jrn_pj2
+CREATE SEQUENCE public.s_jrn_pj2
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4620,7 +5598,7 @@ CREATE SEQUENCE s_jrn_pj2
-CREATE SEQUENCE s_jrn_pj3
+CREATE SEQUENCE public.s_jrn_pj3
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4629,7 +5607,7 @@ CREATE SEQUENCE s_jrn_pj3
-CREATE SEQUENCE s_jrn_pj4
+CREATE SEQUENCE public.s_jrn_pj4
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4638,7 +5616,7 @@ CREATE SEQUENCE s_jrn_pj4
-CREATE SEQUENCE s_jrn_rapt
+CREATE SEQUENCE public.s_jrn_rapt
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4647,7 +5625,7 @@ CREATE SEQUENCE s_jrn_rapt
-CREATE SEQUENCE s_jrnaction
+CREATE SEQUENCE public.s_jrnaction
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4656,7 +5634,7 @@ CREATE SEQUENCE s_jrnaction
-CREATE SEQUENCE s_jrnx
+CREATE SEQUENCE public.s_jrnx
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4665,7 +5643,7 @@ CREATE SEQUENCE s_jrnx
-CREATE SEQUENCE s_periode
+CREATE SEQUENCE public.s_periode
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4674,7 +5652,7 @@ CREATE SEQUENCE s_periode
-CREATE SEQUENCE s_quantity
+CREATE SEQUENCE public.s_quantity
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4683,7 +5661,7 @@ CREATE SEQUENCE s_quantity
-CREATE SEQUENCE s_stock_goods
+CREATE SEQUENCE public.s_stock_goods
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4692,7 +5670,7 @@ CREATE SEQUENCE s_stock_goods
-CREATE SEQUENCE s_tva
+CREATE SEQUENCE public.s_tva
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4701,7 +5679,7 @@ CREATE SEQUENCE s_tva
-CREATE SEQUENCE s_user_act
+CREATE SEQUENCE public.s_user_act
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4710,7 +5688,7 @@ CREATE SEQUENCE s_user_act
-CREATE SEQUENCE s_user_jrn
+CREATE SEQUENCE public.s_user_jrn
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4719,7 +5697,7 @@ CREATE SEQUENCE s_user_jrn
-CREATE SEQUENCE seq_bud_hypothese_bh_id
+CREATE SEQUENCE public.seq_bud_hypothese_bh_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4728,7 +5706,7 @@ CREATE SEQUENCE seq_bud_hypothese_bh_id
-CREATE SEQUENCE seq_doc_type_1
+CREATE SEQUENCE public.seq_doc_type_1
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4737,7 +5715,7 @@ CREATE SEQUENCE seq_doc_type_1
-CREATE SEQUENCE seq_doc_type_10
+CREATE SEQUENCE public.seq_doc_type_10
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4746,7 +5724,7 @@ CREATE SEQUENCE seq_doc_type_10
-CREATE SEQUENCE seq_doc_type_2
+CREATE SEQUENCE public.seq_doc_type_2
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4755,7 +5733,7 @@ CREATE SEQUENCE seq_doc_type_2
-CREATE SEQUENCE seq_doc_type_20
+CREATE SEQUENCE public.seq_doc_type_20
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4764,7 +5742,7 @@ CREATE SEQUENCE seq_doc_type_20
-CREATE SEQUENCE seq_doc_type_21
+CREATE SEQUENCE public.seq_doc_type_21
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4773,7 +5751,7 @@ CREATE SEQUENCE seq_doc_type_21
-CREATE SEQUENCE seq_doc_type_22
+CREATE SEQUENCE public.seq_doc_type_22
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4782,7 +5760,7 @@ CREATE SEQUENCE seq_doc_type_22
-CREATE SEQUENCE seq_doc_type_3
+CREATE SEQUENCE public.seq_doc_type_3
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4791,7 +5769,7 @@ CREATE SEQUENCE seq_doc_type_3
-CREATE SEQUENCE seq_doc_type_4
+CREATE SEQUENCE public.seq_doc_type_4
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4800,7 +5778,7 @@ CREATE SEQUENCE seq_doc_type_4
-CREATE SEQUENCE seq_doc_type_5
+CREATE SEQUENCE public.seq_doc_type_5
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4809,7 +5787,7 @@ CREATE SEQUENCE seq_doc_type_5
-CREATE SEQUENCE seq_doc_type_6
+CREATE SEQUENCE public.seq_doc_type_6
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4818,7 +5796,7 @@ CREATE SEQUENCE seq_doc_type_6
-CREATE SEQUENCE seq_doc_type_7
+CREATE SEQUENCE public.seq_doc_type_7
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4827,7 +5805,7 @@ CREATE SEQUENCE seq_doc_type_7
-CREATE SEQUENCE seq_doc_type_8
+CREATE SEQUENCE public.seq_doc_type_8
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4836,7 +5814,7 @@ CREATE SEQUENCE seq_doc_type_8
-CREATE SEQUENCE seq_doc_type_9
+CREATE SEQUENCE public.seq_doc_type_9
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4845,8 +5823,7 @@ CREATE SEQUENCE seq_doc_type_9
-
-CREATE TABLE stock_change (
+CREATE TABLE public.stock_change (
c_id bigint NOT NULL,
c_comment text,
c_date date,
@@ -4857,7 +5834,11 @@ CREATE TABLE stock_change (
-CREATE SEQUENCE stock_change_c_id_seq
+COMMENT ON TABLE public.stock_change IS 'Change of stock';
+
+
+
+CREATE SEQUENCE public.stock_change_c_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4866,12 +5847,11 @@ CREATE SEQUENCE stock_change_c_id_seq
-ALTER SEQUENCE stock_change_c_id_seq OWNED BY stock_change.c_id;
+ALTER SEQUENCE public.stock_change_c_id_seq OWNED BY public.stock_change.c_id;
-
-CREATE TABLE stock_goods (
+CREATE TABLE public.stock_goods (
sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL,
j_id integer,
f_id integer,
@@ -4890,12 +5870,11 @@ CREATE TABLE stock_goods (
-COMMENT ON TABLE stock_goods IS 'About the goods';
-
+COMMENT ON TABLE public.stock_goods IS 'About the goods';
-CREATE TABLE stock_repository (
+CREATE TABLE public.stock_repository (
r_id bigint NOT NULL,
r_name text,
r_adress text,
@@ -4906,35 +5885,63 @@ CREATE TABLE stock_repository (
-COMMENT ON TABLE stock_repository IS 'stock repository';
+COMMENT ON TABLE public.stock_repository IS 'stock repository';
+
+
+
+COMMENT ON COLUMN public.stock_repository.r_id IS 'pk';
+
+
+
+COMMENT ON COLUMN public.stock_repository.r_name IS 'name of the stock';
+
+
+
+COMMENT ON COLUMN public.stock_repository.r_adress IS 'adress of the stock';
+
+COMMENT ON COLUMN public.stock_repository.r_country IS 'country of the stock';
-COMMENT ON COLUMN stock_repository.r_id IS 'pk';
+COMMENT ON COLUMN public.stock_repository.r_city IS 'City of the stock';
-COMMENT ON COLUMN stock_repository.r_name IS 'name of the stock';
+COMMENT ON COLUMN public.stock_repository.r_phone IS 'Phone number';
-COMMENT ON COLUMN stock_repository.r_adress IS 'adress of the stock';
+CREATE SEQUENCE public.stock_repository_r_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+
+ALTER SEQUENCE public.stock_repository_r_id_seq OWNED BY
public.stock_repository.r_id;
-COMMENT ON COLUMN stock_repository.r_country IS 'country of the stock';
+CREATE TABLE public.tag_group (
+ tg_id bigint NOT NULL,
+ tg_name character varying NOT NULL
+);
+
-COMMENT ON COLUMN stock_repository.r_city IS 'City of the stock';
+COMMENT ON TABLE public.tag_group IS 'Group of tags';
-COMMENT ON COLUMN stock_repository.r_phone IS 'Phone number';
+COMMENT ON COLUMN public.tag_group.tg_name IS 'Nom du groupe';
-CREATE SEQUENCE stock_repository_r_id_seq
+
+CREATE SEQUENCE public.tag_group_tg_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4943,25 +5950,30 @@ CREATE SEQUENCE stock_repository_r_id_seq
-ALTER SEQUENCE stock_repository_r_id_seq OWNED BY stock_repository.r_id;
+ALTER SEQUENCE public.tag_group_tg_id_seq OWNED BY public.tag_group.tg_id;
-CREATE TABLE tags (
+CREATE TABLE public.tags (
t_id integer NOT NULL,
t_tag text NOT NULL,
t_description text,
t_actif character(1) DEFAULT 'Y'::bpchar,
+ t_color integer DEFAULT 1,
CONSTRAINT tags_check CHECK ((t_actif = ANY (ARRAY['N'::bpchar,
'Y'::bpchar])))
);
-COMMENT ON COLUMN tags.t_actif IS 'Y if the tag is activate and can be used ';
+COMMENT ON TABLE public.tags IS 'Tags name';
+
+COMMENT ON COLUMN public.tags.t_actif IS 'Y if the tag is activate and can be
used ';
-CREATE SEQUENCE tags_t_id_seq
+
+
+CREATE SEQUENCE public.tags_t_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4970,11 +5982,11 @@ CREATE SEQUENCE tags_t_id_seq
-ALTER SEQUENCE tags_t_id_seq OWNED BY tags.t_id;
+ALTER SEQUENCE public.tags_t_id_seq OWNED BY public.tags.t_id;
-CREATE SEQUENCE tmp_pcmn_id_seq
+CREATE SEQUENCE public.tmp_pcmn_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -4983,40 +5995,38 @@ CREATE SEQUENCE tmp_pcmn_id_seq
-
-CREATE TABLE tmp_pcmn (
- pcm_val account_type NOT NULL,
+CREATE TABLE public.tmp_pcmn (
+ pcm_val public.account_type NOT NULL,
pcm_lib text,
- pcm_val_parent account_type DEFAULT 0,
+ pcm_val_parent public.account_type DEFAULT 0,
pcm_type text,
- id bigint DEFAULT nextval('tmp_pcmn_id_seq'::regclass) NOT NULL,
+ id bigint DEFAULT nextval('public.tmp_pcmn_id_seq'::regclass) NOT NULL,
pcm_direct_use character varying(1) DEFAULT 'Y'::character varying NOT
NULL,
- CONSTRAINT pcm_direct_use_ck CHECK (((pcm_direct_use)::text = ANY
((ARRAY['Y'::character varying, 'N'::character varying])::text[])))
+ CONSTRAINT pcm_direct_use_ck CHECK (((pcm_direct_use)::text = ANY
(ARRAY[('Y'::character varying)::text, ('N'::character varying)::text])))
);
-COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé';
-
+COMMENT ON TABLE public.tmp_pcmn IS 'Plan comptable minimum normalisé';
-COMMENT ON COLUMN tmp_pcmn.id IS 'allow to identify the row, it is unique and
not null (pseudo pk)';
+COMMENT ON COLUMN public.tmp_pcmn.id IS 'allow to identify the row, it is
unique and not null (pseudo pk)';
-COMMENT ON COLUMN tmp_pcmn.pcm_direct_use IS 'Value are N or Y , N cannot be
used directly , not even through a card';
+COMMENT ON COLUMN public.tmp_pcmn.pcm_direct_use IS 'Value are N or Y , N
cannot be used directly , not even through a card';
-CREATE TABLE tmp_stockgood (
+CREATE TABLE public.tmp_stockgood (
s_id bigint NOT NULL,
s_date timestamp without time zone DEFAULT now()
);
-CREATE TABLE tmp_stockgood_detail (
+CREATE TABLE public.tmp_stockgood_detail (
d_id bigint NOT NULL,
s_id bigint,
sg_code text,
@@ -5028,7 +6038,7 @@ CREATE TABLE tmp_stockgood_detail (
-CREATE SEQUENCE tmp_stockgood_detail_d_id_seq
+CREATE SEQUENCE public.tmp_stockgood_detail_d_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5037,11 +6047,11 @@ CREATE SEQUENCE tmp_stockgood_detail_d_id_seq
-ALTER SEQUENCE tmp_stockgood_detail_d_id_seq OWNED BY
tmp_stockgood_detail.d_id;
+ALTER SEQUENCE public.tmp_stockgood_detail_d_id_seq OWNED BY
public.tmp_stockgood_detail.d_id;
-CREATE SEQUENCE tmp_stockgood_s_id_seq
+CREATE SEQUENCE public.tmp_stockgood_s_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5050,11 +6060,11 @@ CREATE SEQUENCE tmp_stockgood_s_id_seq
-ALTER SEQUENCE tmp_stockgood_s_id_seq OWNED BY tmp_stockgood.s_id;
+ALTER SEQUENCE public.tmp_stockgood_s_id_seq OWNED BY
public.tmp_stockgood.s_id;
-CREATE SEQUENCE todo_list_tl_id_seq
+CREATE SEQUENCE public.todo_list_tl_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5063,8 +6073,8 @@ CREATE SEQUENCE todo_list_tl_id_seq
-CREATE TABLE todo_list (
- tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.todo_list (
+ tl_id integer DEFAULT nextval('public.todo_list_tl_id_seq'::regclass) NOT
NULL,
tl_date date NOT NULL,
tl_title text NOT NULL,
tl_desc text,
@@ -5075,15 +6085,15 @@ CREATE TABLE todo_list (
-COMMENT ON TABLE todo_list IS 'Todo list';
+COMMENT ON TABLE public.todo_list IS 'Todo list';
-COMMENT ON COLUMN todo_list.is_public IS 'Flag for the public parameter';
+COMMENT ON COLUMN public.todo_list.is_public IS 'Flag for the public
parameter';
-CREATE TABLE todo_list_shared (
+CREATE TABLE public.todo_list_shared (
id integer NOT NULL,
todo_list_id integer NOT NULL,
use_login text NOT NULL
@@ -5091,19 +6101,19 @@ CREATE TABLE todo_list_shared (
-COMMENT ON TABLE todo_list_shared IS 'Note of todo list shared with other
users';
+COMMENT ON TABLE public.todo_list_shared IS 'Note of todo list shared with
other users';
-COMMENT ON COLUMN todo_list_shared.todo_list_id IS 'fk to todo_list';
+COMMENT ON COLUMN public.todo_list_shared.todo_list_id IS 'fk to todo_list';
-COMMENT ON COLUMN todo_list_shared.use_login IS 'user login';
+COMMENT ON COLUMN public.todo_list_shared.use_login IS 'user login';
-CREATE SEQUENCE todo_list_shared_id_seq
+CREATE SEQUENCE public.todo_list_shared_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5112,11 +6122,11 @@ CREATE SEQUENCE todo_list_shared_id_seq
-ALTER SEQUENCE todo_list_shared_id_seq OWNED BY todo_list_shared.id;
+ALTER SEQUENCE public.todo_list_shared_id_seq OWNED BY
public.todo_list_shared.id;
-CREATE SEQUENCE uos_pk_seq
+CREATE SEQUENCE public.uos_pk_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5125,53 +6135,89 @@ CREATE SEQUENCE uos_pk_seq
-CREATE TABLE tool_uos (
- uos_value bigint DEFAULT nextval('uos_pk_seq'::regclass) NOT NULL
+CREATE TABLE public.tool_uos (
+ uos_value bigint DEFAULT nextval('public.uos_pk_seq'::regclass) NOT NULL
);
-
-CREATE TABLE tva_rate (
- tva_id integer DEFAULT nextval('s_tva'::regclass) NOT NULL,
+CREATE TABLE public.tva_rate (
+ tva_id integer DEFAULT nextval('public.s_tva'::regclass) NOT NULL,
tva_label text NOT NULL,
tva_rate numeric(8,4) DEFAULT 0.0 NOT NULL,
tva_comment text,
tva_poste text,
- tva_both_side integer DEFAULT 0
+ tva_both_side integer DEFAULT 0,
+ tva_payment_sale character(1) DEFAULT 'O'::bpchar,
+ tva_payment_purchase character(1) DEFAULT 'O'::bpchar,
+ tva_code text NOT NULL,
+ CONSTRAINT tva_code_number_check CHECK ((tva_code !~ '^([0-9]+)$'::text)),
+ CONSTRAINT tva_rate_purchase_check CHECK ((tva_payment_purchase = ANY
(ARRAY['O'::bpchar, 'P'::bpchar]))),
+ CONSTRAINT tva_rate_sale_check CHECK ((tva_payment_sale = ANY
(ARRAY['O'::bpchar, 'P'::bpchar])))
);
-COMMENT ON TABLE tva_rate IS 'Rate of vat';
+COMMENT ON TABLE public.tva_rate IS 'Rate of vat';
+
+
+
+COMMENT ON COLUMN public.tva_rate.tva_label IS 'Label';
+
+
+
+COMMENT ON COLUMN public.tva_rate.tva_rate IS 'Rate';
+
+
+
+COMMENT ON COLUMN public.tva_rate.tva_comment IS 'Description of VAT';
+
+
+
+COMMENT ON COLUMN public.tva_rate.tva_poste IS 'accounting';
+
+
+
+COMMENT ON COLUMN public.tva_rate.tva_both_side IS 'If set to 1 , the amount
VAT will be reversed (autoliquidation)';
+COMMENT ON COLUMN public.tva_rate.tva_payment_sale IS 'Check if the VAT on
Sale must be declared when at the date of payment (P) or the date of operation
(O)';
-CREATE TABLE user_active_security (
+
+
+COMMENT ON COLUMN public.tva_rate.tva_payment_purchase IS 'Check if the VAT on
Purchase must be declared when at the date of payment (P) or the date of
operation (O)';
+
+
+
+CREATE TABLE public.user_active_security (
id integer NOT NULL,
us_login text NOT NULL,
us_ledger character varying(1) NOT NULL,
us_action character varying(1) NOT NULL,
- CONSTRAINT user_active_security_action_check CHECK (((us_action)::text =
ANY ((ARRAY['Y'::character varying, 'N'::character varying])::text[]))),
- CONSTRAINT user_active_security_ledger_check CHECK (((us_ledger)::text =
ANY ((ARRAY['Y'::character varying, 'N'::character varying])::text[])))
+ CONSTRAINT user_active_security_action_check CHECK (((us_action)::text =
ANY (ARRAY[('Y'::character varying)::text, ('N'::character varying)::text]))),
+ CONSTRAINT user_active_security_ledger_check CHECK (((us_ledger)::text =
ANY (ARRAY[('Y'::character varying)::text, ('N'::character varying)::text])))
);
-COMMENT ON COLUMN user_active_security.us_login IS 'user''s login';
+COMMENT ON TABLE public.user_active_security IS 'Security for user';
+
+
+
+COMMENT ON COLUMN public.user_active_security.us_login IS 'user''s login';
-COMMENT ON COLUMN user_active_security.us_ledger IS 'Flag Security for ledger';
+COMMENT ON COLUMN public.user_active_security.us_ledger IS 'Flag Security for
ledger';
-COMMENT ON COLUMN user_active_security.us_action IS 'Security for action';
+COMMENT ON COLUMN public.user_active_security.us_action IS 'Security for
action';
-CREATE SEQUENCE user_active_security_id_seq
+CREATE SEQUENCE public.user_active_security_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5180,11 +6226,11 @@ CREATE SEQUENCE user_active_security_id_seq
-ALTER SEQUENCE user_active_security_id_seq OWNED BY user_active_security.id;
+ALTER SEQUENCE public.user_active_security_id_seq OWNED BY
public.user_active_security.id;
-CREATE TABLE user_filter (
+CREATE TABLE public.user_filter (
id bigint NOT NULL,
login text,
nb_jrn integer,
@@ -5201,12 +6247,40 @@ CREATE TABLE user_filter (
ledger_type character varying(5),
all_ledger integer,
filter_name text NOT NULL,
- unpaid character varying
+ operation_filter text NOT NULL,
+ uf_tag text,
+ uf_tag_option integer,
+ uf_currency_code integer,
+ tva_id_search integer
);
-CREATE SEQUENCE user_filter_id_seq
+COMMENT ON TABLE public.user_filter IS 'Filter for the search';
+
+
+
+COMMENT ON COLUMN public.user_filter.operation_filter IS 'Status of the
operation : paid, unpaid or all operation';
+
+
+
+COMMENT ON COLUMN public.user_filter.uf_tag IS 'Tag list';
+
+
+
+COMMENT ON COLUMN public.user_filter.uf_tag_option IS '0 : all tags must be
present, 1: at least one';
+
+
+
+COMMENT ON COLUMN public.user_filter.uf_currency_code IS 'correspond to
currency.id';
+
+
+
+COMMENT ON COLUMN public.user_filter.tva_id_search IS 'VAT id ';
+
+
+
+CREATE SEQUENCE public.user_filter_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5215,12 +6289,11 @@ CREATE SEQUENCE user_filter_id_seq
-ALTER SEQUENCE user_filter_id_seq OWNED BY user_filter.id;
+ALTER SEQUENCE public.user_filter_id_seq OWNED BY public.user_filter.id;
-
-CREATE TABLE user_local_pref (
+CREATE TABLE public.user_local_pref (
user_id text NOT NULL,
parameter_type text NOT NULL,
parameter_value text
@@ -5228,23 +6301,23 @@ CREATE TABLE user_local_pref (
-COMMENT ON TABLE user_local_pref IS 'The user''s local parameter ';
+COMMENT ON TABLE public.user_local_pref IS 'The user''s local parameter ';
-COMMENT ON COLUMN user_local_pref.user_id IS 'user''s login ';
+COMMENT ON COLUMN public.user_local_pref.user_id IS 'user''s login ';
-COMMENT ON COLUMN user_local_pref.parameter_type IS 'the type of parameter ';
+COMMENT ON COLUMN public.user_local_pref.parameter_type IS 'the type of
parameter ';
-COMMENT ON COLUMN user_local_pref.parameter_value IS 'the value of parameter ';
+COMMENT ON COLUMN public.user_local_pref.parameter_value IS 'the value of
parameter ';
-CREATE TABLE user_sec_act (
+CREATE TABLE public.user_sec_act (
ua_id integer DEFAULT nextval(('s_user_act'::text)::regclass) NOT NULL,
ua_login text,
ua_act_id integer
@@ -5252,34 +6325,37 @@ CREATE TABLE user_sec_act (
+COMMENT ON TABLE public.user_sec_act IS 'Security on actions for user';
+
-CREATE TABLE user_sec_action_profile (
+
+CREATE TABLE public.user_sec_action_profile (
ua_id bigint NOT NULL,
p_id bigint,
p_granted bigint,
ua_right character(1),
- CONSTRAINT user_sec_action_profile_ua_right_check CHECK ((ua_right = ANY
(ARRAY['R'::bpchar, 'W'::bpchar])))
+ CONSTRAINT user_sec_action_profile_ua_right_check CHECK ((ua_right = ANY
(ARRAY['R'::bpchar, 'W'::bpchar, 'X'::bpchar, 'O'::bpchar])))
);
-COMMENT ON TABLE user_sec_action_profile IS 'Available profile for user';
+COMMENT ON TABLE public.user_sec_action_profile IS 'Available profile for
user';
-COMMENT ON COLUMN user_sec_action_profile.ua_id IS 'pk';
+COMMENT ON COLUMN public.user_sec_action_profile.ua_id IS 'pk';
-COMMENT ON COLUMN user_sec_action_profile.p_id IS 'fk to profile';
+COMMENT ON COLUMN public.user_sec_action_profile.p_id IS 'fk to profile';
-COMMENT ON COLUMN user_sec_action_profile.ua_right IS 'Type of right : R for
readonly W for write';
+COMMENT ON COLUMN public.user_sec_action_profile.ua_right IS 'Type of right :
R for readonly W for write';
-CREATE SEQUENCE user_sec_action_profile_ua_id_seq
+CREATE SEQUENCE public.user_sec_action_profile_ua_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
@@ -5288,12 +6364,11 @@ CREATE SEQUENCE user_sec_action_profile_ua_id_seq
-ALTER SEQUENCE user_sec_action_profile_ua_id_seq OWNED BY
user_sec_action_profile.ua_id;
-
+ALTER SEQUENCE public.user_sec_action_profile_ua_id_seq OWNED BY
public.user_sec_action_profile.ua_id;
-CREATE TABLE user_sec_jrn (
+CREATE TABLE public.user_sec_jrn (
uj_id integer DEFAULT nextval(('s_user_jrn'::text)::regclass) NOT NULL,
uj_login text,
uj_jrn_id integer,
@@ -5302,1097 +6377,2596 @@ CREATE TABLE user_sec_jrn (
-CREATE VIEW v_all_menu AS
- SELECT pm.me_code, pm.pm_id, pm.me_code_dep, pm.p_order,
pm.p_type_display, p.p_name, p.p_desc, mr.me_menu, mr.me_file, mr.me_url,
mr.me_parameter, mr.me_javascript, mr.me_type, pm.p_id, mr.me_description FROM
((profile_menu pm JOIN profile p ON ((p.p_id = pm.p_id))) JOIN menu_ref mr
USING (me_code)) ORDER BY pm.p_order;
+COMMENT ON TABLE public.user_sec_jrn IS 'Security on ledger for users';
+
+
+
+CREATE VIEW public.v_all_account_currency AS
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_fin q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
((q1.jr_id = x.jr_id)))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id
+UNION ALL
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_purchase q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste,
+ j.jr_internal
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
(((q1.qp_internal = x.jr_internal) AND ((x.f_id = q1.qp_fiche) OR (x.f_id =
q1.qp_supplier)))))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id
+UNION ALL
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_sold q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste,
+ j.jr_internal
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
(((q1.qs_internal = x.jr_internal) AND ((x.f_id = q1.qs_fiche) OR (x.f_id =
q1.qs_client)))))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id;
+
+
+
+CREATE VIEW public.v_all_card_currency AS
+ SELECT sum(operation_currency.oc_amount) AS sum_oc_amount,
+ sum(operation_currency.oc_vat_amount) AS sum_oc_vat_amount,
+ jrnx.f_id,
+ operation_currency.j_id
+ FROM (public.operation_currency
+ JOIN public.jrnx USING (j_id))
+ GROUP BY jrnx.f_id, operation_currency.j_id;
+
+
+
+CREATE VIEW public.v_all_menu AS
+ SELECT pm.me_code,
+ pm.pm_id,
+ pm.me_code_dep,
+ pm.p_order,
+ pm.p_type_display,
+ p.p_name,
+ p.p_desc,
+ mr.me_menu,
+ mr.me_file,
+ mr.me_url,
+ mr.me_parameter,
+ mr.me_javascript,
+ mr.me_type,
+ pm.p_id,
+ mr.me_description
+ FROM ((public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ ORDER BY pm.p_order;
+
+
+
+CREATE VIEW public.v_contact AS
+ WITH contact_data AS (
+ SELECT f.f_id,
+ f.f_enable,
+ f.fd_id
+ FROM (public.fiche f
+ JOIN public.fiche_def fd ON ((f.fd_id = fd.fd_id)))
+ WHERE (fd.frd_id = 16)
+ )
+ SELECT cd.f_id,
+ cd.f_enable,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 32) AND (fiche_detail.f_id = cd.f_id)))
AS contact_fname,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 1) AND (fiche_detail.f_id = cd.f_id)))
AS contact_name,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 23) AND (fiche_detail.f_id = cd.f_id)))
AS contact_qcode,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 25) AND (fiche_detail.f_id = cd.f_id)))
AS contact_company,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 27) AND (fiche_detail.f_id = cd.f_id)))
AS contact_mobile,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 17) AND (fiche_detail.f_id = cd.f_id)))
AS contact_phone,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 18) AND (fiche_detail.f_id = cd.f_id)))
AS contact_email,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 26) AND (fiche_detail.f_id = cd.f_id)))
AS contact_fax,
+ cd.fd_id AS card_category
+ FROM contact_data cd;
+
+
+
+CREATE VIEW public.v_currency_last_value AS
+ WITH recent_rate AS (
+ SELECT currency_history.currency_id,
+ max(currency_history.ch_from) AS rc_from
+ FROM public.currency_history
+ GROUP BY currency_history.currency_id
+ )
+ SELECT cr1.id AS currency_id,
+ cr1.cr_name,
+ cr1.cr_code_iso,
+ ch1.id AS currency_history_id,
+ ch1.ch_value,
+ to_char((recent_rate.rc_from)::timestamp with time zone,
'DD.MM.YYYY'::text) AS str_from
+ FROM ((public.currency cr1
+ JOIN recent_rate ON ((recent_rate.currency_id = cr1.id)))
+ JOIN public.currency_history ch1 ON (((recent_rate.currency_id =
ch1.currency_id) AND (recent_rate.rc_from = ch1.ch_from))));
+
+
+
+CREATE VIEW public.vw_fiche_attr AS
+ SELECT a.f_id,
+ a.fd_id,
+ a.ad_value AS vw_name,
+ k.ad_value AS vw_first_name,
+ b.ad_value AS vw_sell,
+ c.ad_value AS vw_buy,
+ d.ad_value AS tva_code,
+ tva_rate.tva_id,
+ tva_rate.tva_rate,
+ tva_rate.tva_label,
+ e.ad_value AS vw_addr,
+ f.ad_value AS vw_cp,
+ j.ad_value AS quick_code,
+ h.ad_value AS vw_description,
+ i.ad_value AS tva_num,
+ fiche_def.frd_id,
+ l.ad_value AS accounting,
+ a.f_enable
+ FROM ((((((((((((( SELECT fiche.f_id,
+ fiche.fd_id,
+ fiche.f_enable,
+ fiche_detail.ad_value
+ FROM (public.fiche
+ LEFT JOIN public.fiche_detail USING (f_id))
+ WHERE (fiche_detail.ad_id = 1)) a
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 6)) b ON ((a.f_id = b.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 7)) c ON ((a.f_id = c.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 2)) d ON ((a.f_id = d.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) e ON ((a.f_id = e.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) f ON ((a.f_id = f.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) j ON ((a.f_id = j.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 9)) h ON ((a.f_id = h.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) i ON ((a.f_id = i.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 32)) k ON ((a.f_id = k.f_id)))
+ LEFT JOIN public.tva_rate ON ((d.ad_value = (tva_rate.tva_id)::text)))
+ JOIN public.fiche_def USING (fd_id))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) l ON ((a.f_id = l.f_id)));
+
+
+
+COMMENT ON VIEW public.vw_fiche_attr IS 'Some attribute for all cards';
+
+
+
+CREATE VIEW public.vw_fiche_name AS
+ SELECT fiche_detail.f_id,
+ fiche_detail.ad_value AS name
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1);
+
+
+
+CREATE VIEW public.v_detail_purchase AS
+ WITH m AS (
+ SELECT sum(quant_purchase_1.qp_price) AS htva,
+ sum(quant_purchase_1.qp_vat) AS tot_vat,
+ sum(quant_purchase_1.qp_vat_sided) AS tot_tva_np,
+ jrn_1.jr_id
+ FROM ((public.quant_purchase quant_purchase_1
+ JOIN public.jrnx jrnx_1 USING (j_id))
+ JOIN public.jrn jrn_1 ON ((jrnx_1.j_grpt = jrn_1.jr_grpt_id)))
+ GROUP BY jrn_1.jr_id
+ ), other_tax AS (
+ SELECT jrnx_1.j_grpt,
+ sum(
+ CASE
+ WHEN (jrnx_1.j_debit IS FALSE) THEN ((0)::numeric -
jrnx_1.j_montant)
+ ELSE jrnx_1.j_montant
+ END) AS other_tax_amount
+ FROM (public.jrnx jrnx_1
+ JOIN public.jrn_tax USING (j_id))
+ GROUP BY jrnx_1.j_grpt
+ )
+ SELECT jrn.jr_id,
+ jrn.jr_date,
+ jrn.jr_date_paid,
+ jrn.jr_ech,
+ jrn.jr_tech_per,
+ jrn.jr_comment,
+ jrn.jr_pj_number,
+ jrn.jr_internal,
+ jrn.jr_def_id,
+ jrnx.j_poste,
+ jrnx.j_text,
+ jrnx.j_qcode,
+ jrn.jr_rapt,
+ quant_purchase.qp_fiche AS item_card,
+ a.name AS item_name,
+ quant_purchase.qp_supplier,
+ b.vw_name AS tiers_name,
+ b.quick_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ tva_rate.tva_both_side,
+ quant_purchase.qp_vat_sided AS vat_sided,
+ quant_purchase.qp_vat_code AS vat_code,
+ quant_purchase.qp_vat AS vat,
+ quant_purchase.qp_price AS price,
+ quant_purchase.qp_quantite AS quantity,
+ (quant_purchase.qp_price / quant_purchase.qp_quantite) AS price_per_unit,
+ quant_purchase.qp_nd_amount AS non_ded_amount,
+ quant_purchase.qp_nd_tva AS non_ded_tva,
+ quant_purchase.qp_nd_tva_recup AS non_ded_tva_recup,
+ m.htva,
+ m.tot_vat,
+ m.tot_tva_np,
+ ot.other_tax_amount,
+ oc.oc_amount,
+ oc.oc_vat_amount,
+ ( SELECT currency.cr_code_iso
+ FROM public.currency
+ WHERE (jrn.currency_id = currency.id)) AS cr_code_iso
+ FROM ((((((((public.jrn
+ JOIN public.jrnx ON ((jrn.jr_grpt_id = jrnx.j_grpt)))
+ JOIN public.quant_purchase USING (j_id))
+ JOIN public.vw_fiche_name a ON ((quant_purchase.qp_fiche = a.f_id)))
+ JOIN public.vw_fiche_attr b ON ((quant_purchase.qp_supplier = b.f_id)))
+ LEFT JOIN public.tva_rate ON ((quant_purchase.qp_vat_code =
tva_rate.tva_id)))
+ JOIN m ON ((m.jr_id = jrn.jr_id)))
+ LEFT JOIN public.operation_currency oc ON ((oc.j_id = jrnx.j_id)))
+ LEFT JOIN other_tax ot ON ((ot.j_grpt = jrn.jr_grpt_id)));
+
+
+
+CREATE VIEW public.v_detail_sale AS
+ WITH m AS (
+ SELECT sum(quant_sold_1.qs_price) AS htva,
+ sum(quant_sold_1.qs_vat) AS tot_vat,
+ sum(quant_sold_1.qs_vat_sided) AS tot_tva_np,
+ jrn_1.jr_id
+ FROM ((public.quant_sold quant_sold_1
+ JOIN public.jrnx jrnx_1 USING (j_id))
+ JOIN public.jrn jrn_1 ON ((jrnx_1.j_grpt = jrn_1.jr_grpt_id)))
+ GROUP BY jrn_1.jr_id
+ ), other_tax AS (
+ SELECT jrnx_1.j_grpt,
+ sum(
+ CASE
+ WHEN (jrnx_1.j_debit IS TRUE) THEN ((0)::numeric -
jrnx_1.j_montant)
+ ELSE jrnx_1.j_montant
+ END) AS other_tax_amount
+ FROM (public.jrnx jrnx_1
+ JOIN public.jrn_tax USING (j_id))
+ GROUP BY jrnx_1.j_grpt
+ )
+ SELECT jrn.jr_id,
+ jrn.jr_date,
+ jrn.jr_date_paid,
+ jrn.jr_ech,
+ jrn.jr_tech_per,
+ jrn.jr_comment,
+ jrn.jr_pj_number,
+ jrn.jr_internal,
+ jrn.jr_def_id,
+ jrnx.j_poste,
+ jrnx.j_text,
+ jrnx.j_qcode,
+ jrn.jr_rapt,
+ quant_sold.qs_fiche AS item_card,
+ a.name AS item_name,
+ quant_sold.qs_client,
+ b.vw_name AS tiers_name,
+ b.quick_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ tva_rate.tva_both_side,
+ quant_sold.qs_vat_sided AS vat_sided,
+ quant_sold.qs_vat_code AS vat_code,
+ quant_sold.qs_vat AS vat,
+ quant_sold.qs_price AS price,
+ quant_sold.qs_quantite AS quantity,
+ (quant_sold.qs_price / quant_sold.qs_quantite) AS price_per_unit,
+ m.htva,
+ m.tot_vat,
+ m.tot_tva_np,
+ ot.other_tax_amount,
+ oc.oc_amount,
+ oc.oc_vat_amount,
+ ( SELECT currency.cr_code_iso
+ FROM public.currency
+ WHERE (jrn.currency_id = currency.id)) AS cr_code_iso
+ FROM ((((((((public.jrn
+ JOIN public.jrnx ON ((jrn.jr_grpt_id = jrnx.j_grpt)))
+ JOIN public.quant_sold USING (j_id))
+ JOIN public.vw_fiche_name a ON ((quant_sold.qs_fiche = a.f_id)))
+ JOIN public.vw_fiche_attr b ON ((quant_sold.qs_client = b.f_id)))
+ LEFT JOIN public.tva_rate ON ((quant_sold.qs_vat_code = tva_rate.tva_id)))
+ JOIN m ON ((m.jr_id = jrn.jr_id)))
+ LEFT JOIN public.operation_currency oc ON ((oc.j_id = jrnx.j_id)))
+ LEFT JOIN other_tax ot ON ((ot.j_grpt = jrn.jr_grpt_id)));
+
+
+
+CREATE VIEW public.v_menu_dependency AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue,
+ p.p_id
+ FROM ((public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.pm_id,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (v2.pm_id IS NOT NULL) THEN v2.pm_id
+ WHEN (v3.pm_id IS NOT NULL) THEN v3.pm_id
+ ELSE NULL::integer
+ END AS higher_dep,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript,
+ v1.p_id,
+ v2.p_id AS v2pid,
+ v3.p_id AS v3pid
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE ((COALESCE(v2.p_id, v1.p_id) = v1.p_id) AND (COALESCE(v3.p_id,
v1.p_id) = v1.p_id) AND (v1.p_type_display <> 'P'::text))
+ ORDER BY v1.pm_id;
+
+
+
+CREATE VIEW public.v_menu_description AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ pm.pm_id_dep,
+ pm.p_id,
+ mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pu.user_name,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue
+ FROM (((public.profile_menu pm
+ JOIN public.profile_user pu ON ((pu.p_id = pm.p_id)))
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ v1.user_name,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript,
+ v1.pm_id,
+ v1.pm_id_dep,
+ v1.p_id
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE ((v1.p_type_display <> 'P'::text) AND ((COALESCE(v1.me_file, ''::text)
<> ''::text) OR (COALESCE(v1.me_javascript, ''::text) <> ''::text)));
+
+
+
+COMMENT ON VIEW public.v_menu_description IS 'Description des menus';
+
+
+
+CREATE VIEW public.v_menu_description_favori AS
+ WITH t_menu AS (
+ SELECT mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pu.user_name,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue
+ FROM (((public.profile_menu pm
+ JOIN public.profile_user pu ON ((pu.p_id = pm.p_id)))
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ v1.user_name,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE (v1.p_type_display <> 'P'::text);
+
+
+
+CREATE VIEW public.v_menu_profile AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ pm.pm_id_dep,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pm.p_id
+ FROM (public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v3.p_type_display,
+ COALESCE(v3.pm_id, 0) AS pm_id_v3,
+ COALESCE(v2.pm_id, 0) AS pm_id_v2,
+ v1.pm_id AS pm_id_v1,
+ v1.p_id
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.pm_id_dep = v2.pm_id)))
+ LEFT JOIN t_menu v3 ON ((v2.pm_id_dep = v3.pm_id)))
+ WHERE (v1.p_type_display <> 'P'::text);
+
+
+
+COMMENT ON VIEW public.v_menu_profile IS 'Give the profile and the menu +
dependencies';
+
+
+
+CREATE VIEW public.v_quant_detail AS
+ WITH quant AS (
+ SELECT quant_purchase.j_id,
+ quant_purchase.qp_fiche AS fiche_id,
+ quant_purchase.qp_supplier AS tiers,
+ quant_purchase.qp_vat AS vat_amount,
+ quant_purchase.qp_price AS price,
+ quant_purchase.qp_vat_code AS vat_code,
+ quant_purchase.qp_dep_priv AS dep_priv,
+ quant_purchase.qp_nd_tva AS nd_tva,
+ quant_purchase.qp_nd_tva_recup AS nd_tva_recup,
+ quant_purchase.qp_nd_amount AS nd_amount,
+ quant_purchase.qp_vat_sided AS vat_sided
+ FROM public.quant_purchase
+ UNION ALL
+ SELECT quant_sold.j_id,
+ quant_sold.qs_fiche,
+ quant_sold.qs_client,
+ quant_sold.qs_vat,
+ quant_sold.qs_price,
+ quant_sold.qs_vat_code,
+ 0,
+ 0,
+ 0,
+ 0,
+ quant_sold.qs_vat_sided
+ FROM public.quant_sold
+ )
+ SELECT jrn.jr_id,
+ quant.tiers,
+ jrn_def.jrn_def_name,
+ jrn_def.jrn_def_type,
+ vw_fiche_name.name,
+ jrn.jr_comment,
+ jrn.jr_montant,
+ sum(quant.price) AS price,
+ quant.vat_code,
+ sum(quant.vat_amount) AS vat_amount,
+ sum(quant.dep_priv) AS dep_priv,
+ sum(quant.nd_tva) AS nd_tva,
+ sum(quant.nd_tva_recup) AS nd_tva_recup,
+ sum(quant.nd_amount) AS nd_amount,
+ quant.vat_sided,
+ tva_rate.tva_label
+ FROM (((((public.jrn
+ JOIN public.jrnx ON ((jrnx.j_grpt = jrn.jr_grpt_id)))
+ JOIN quant USING (j_id))
+ LEFT JOIN public.vw_fiche_name ON ((quant.tiers = vw_fiche_name.f_id)))
+ JOIN public.jrn_def ON ((jrn_def.jrn_def_id = jrn.jr_def_id)))
+ JOIN public.tva_rate ON ((tva_rate.tva_id = quant.vat_code)))
+ GROUP BY jrn.jr_id, quant.tiers, jrn.jr_comment, jrn.jr_montant,
quant.vat_code, quant.vat_sided, vw_fiche_name.name, jrn_def.jrn_def_name,
jrn_def.jrn_def_type, tva_rate.tva_label;
+
+
+
+CREATE VIEW public.v_tva_rate AS
+ SELECT tva_rate.tva_id,
+ tva_rate.tva_rate,
+ tva_rate.tva_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ split_part(tva_rate.tva_poste, ','::text, 1) AS tva_purchase,
+ split_part(tva_rate.tva_poste, ','::text, 2) AS tva_sale,
+ tva_rate.tva_both_side,
+ tva_rate.tva_payment_purchase,
+ tva_rate.tva_payment_sale
+ FROM public.tva_rate;
+
+
+
+CREATE TABLE public.version (
+ val integer NOT NULL,
+ v_description text,
+ v_date timestamp without time zone DEFAULT now()
+);
+
+
+
+COMMENT ON TABLE public.version IS 'DB version';
+
+
+
+CREATE VIEW public.vw_client AS
+ SELECT fiche.f_id,
+ a1.ad_value AS name,
+ a.ad_value AS quick_code,
+ b.ad_value AS tva_num,
+ c.ad_value AS poste_comptable,
+ d.ad_value AS rue,
+ e.ad_value AS code_postal,
+ f.ad_value AS pays,
+ g.ad_value AS telephone,
+ h.ad_value AS email
+ FROM (((((((((((public.fiche
+ JOIN public.fiche_def USING (fd_id))
+ JOIN public.fiche_def_ref USING (frd_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) b USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) c USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) d USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) e USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 16)) f USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 17)) g USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 18)) h USING (f_id))
+ WHERE (fiche_def_ref.frd_id = 9);
+
+
+
+CREATE VIEW public.vw_fiche_def AS
+ SELECT jnt_fic_attr.fd_id,
+ jnt_fic_attr.ad_id,
+ attr_def.ad_text,
+ fiche_def.fd_class_base,
+ fiche_def.fd_label,
+ fiche_def.fd_create_account,
+ fiche_def.frd_id
+ FROM ((public.fiche_def
+ JOIN public.jnt_fic_attr USING (fd_id))
+ JOIN public.attr_def ON ((attr_def.ad_id = jnt_fic_attr.ad_id)));
+
+
+
+COMMENT ON VIEW public.vw_fiche_def IS 'all the attributs for card family';
+
+
+
+CREATE VIEW public.vw_fiche_min AS
+ SELECT attr_min.frd_id,
+ attr_min.ad_id,
+ attr_def.ad_text,
+ fiche_def_ref.frd_text,
+ fiche_def_ref.frd_class_base
+ FROM ((public.attr_min
+ JOIN public.attr_def USING (ad_id))
+ JOIN public.fiche_def_ref USING (frd_id));
+
+
+
+CREATE VIEW public.vw_poste_qcode AS
+ SELECT c.f_id,
+ a.ad_value AS j_poste,
+ b.ad_value AS j_qcode
+ FROM ((public.fiche c
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) b USING (f_id));
+
+
+
+CREATE VIEW public.vw_supplier AS
+ SELECT fiche.f_id,
+ a1.ad_value AS name,
+ a.ad_value AS quick_code,
+ b.ad_value AS tva_num,
+ c.ad_value AS poste_comptable,
+ d.ad_value AS rue,
+ e.ad_value AS code_postal,
+ f.ad_value AS pays,
+ g.ad_value AS telephone,
+ h.ad_value AS email
+ FROM (((((((((((public.fiche
+ JOIN public.fiche_def USING (fd_id))
+ JOIN public.fiche_def_ref USING (frd_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) b USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) c USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) d USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) e USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 16)) f USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 17)) g USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 18)) h USING (f_id))
+ WHERE (fiche_def_ref.frd_id = 8);
-CREATE VIEW vw_fiche_attr AS
- SELECT a.f_id, a.fd_id, a.ad_value AS vw_name, k.ad_value AS
vw_first_name, b.ad_value AS vw_sell, c.ad_value AS vw_buy, d.ad_value AS
tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.ad_value AS
vw_addr, f.ad_value AS vw_cp, j.ad_value AS quick_code, h.ad_value AS
vw_description, i.ad_value AS tva_num, fiche_def.frd_id, l.ad_value AS
accounting FROM (((((((((((((SELECT fiche.f_id, fiche.fd_id,
fiche_detail.ad_value FROM (fiche LEFT JOIN fiche_detail USING (f_id)) [...]
+ALTER TABLE ONLY public.acc_other_tax ALTER COLUMN ac_id SET DEFAULT
nextval('public.acc_other_tax_ac_id_seq'::regclass);
-CREATE VIEW vw_fiche_name AS
- SELECT fiche_detail.f_id, fiche_detail.ad_value AS name FROM fiche_detail
WHERE (fiche_detail.ad_id = 1);
+ALTER TABLE ONLY public.action_detail ALTER COLUMN ad_id SET DEFAULT
nextval('public.action_detail_ad_id_seq'::regclass);
-CREATE VIEW v_detail_purchase AS
- WITH m AS (SELECT sum(quant_purchase.qp_price) AS htva,
sum(quant_purchase.qp_vat) AS tot_vat, sum(quant_purchase.qp_vat_sided) AS
tot_tva_np, jrn.jr_id FROM ((quant_purchase JOIN jrnx USING (j_id)) JOIN jrn ON
((jrnx.j_grpt = jrn.jr_grpt_id))) GROUP BY jrn.jr_id) SELECT jrn.jr_id,
jrn.jr_date, jrn.jr_date_paid, jrn.jr_ech, jrn.jr_tech_per, jrn.jr_comment,
jrn.jr_pj_number, jrn.jr_internal, jrn.jr_def_id, jrnx.j_poste, jrnx.j_text,
jrnx.j_qcode, quant_purchase.qp_fiche AS item_card, [...]
+ALTER TABLE ONLY public.action_gestion_comment ALTER COLUMN agc_id SET DEFAULT
nextval('public.action_gestion_comment_agc_id_seq'::regclass);
-CREATE VIEW v_detail_sale AS
- WITH m AS (SELECT sum(quant_sold.qs_price) AS htva, sum(quant_sold.qs_vat)
AS tot_vat, sum(quant_sold.qs_vat_sided) AS tot_tva_np, jrn.jr_id FROM
((quant_sold JOIN jrnx USING (j_id)) JOIN jrn ON ((jrnx.j_grpt =
jrn.jr_grpt_id))) GROUP BY jrn.jr_id) SELECT jrn.jr_id, jrn.jr_date,
jrn.jr_date_paid, jrn.jr_ech, jrn.jr_tech_per, jrn.jr_comment,
jrn.jr_pj_number, jrn.jr_internal, jrn.jr_def_id, jrnx.j_poste, jrnx.j_text,
jrnx.j_qcode, quant_sold.qs_fiche AS item_card, a.name AS item_name, [...]
+ALTER TABLE ONLY public.action_gestion_operation ALTER COLUMN ago_id SET
DEFAULT nextval('public.action_gestion_operation_ago_id_seq'::regclass);
-CREATE VIEW v_menu_dependency AS
- WITH t_menu AS (SELECT pm.pm_id, mr.me_menu, pm.me_code, pm.me_code_dep,
pm.p_type_display, mr.me_file, mr.me_javascript, mr.me_description,
mr.me_description_etendue, p.p_id FROM ((profile_menu pm JOIN profile p ON
((p.p_id = pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code,
''::text) WHEN (v2.me_code IS NOT NULL) THEN COALESCE((' [...]
+ALTER TABLE ONLY public.action_gestion_related ALTER COLUMN aga_id SET DEFAULT
nextval('public.action_gestion_related_aga_id_seq'::regclass);
-CREATE VIEW v_menu_description AS
- WITH t_menu AS (SELECT pm.pm_id, pm.pm_id_dep, pm.p_id, mr.me_menu,
pm.me_code, pm.me_code_dep, pm.p_type_display, pu.user_name, mr.me_file,
mr.me_javascript, mr.me_description, mr.me_description_etendue FROM
(((profile_menu pm JOIN profile_user pu ON ((pu.p_id = pm.p_id))) JOIN profile
p ON ((p.p_id = pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN [...]
+ALTER TABLE ONLY public.action_person ALTER COLUMN ap_id SET DEFAULT
nextval('public.action_person_ap_id_seq'::regclass);
-COMMENT ON VIEW v_menu_description IS 'Description des menus';
+ALTER TABLE ONLY public.action_person_option ALTER COLUMN ap_id SET DEFAULT
nextval('public.action_person_option_ap_id_seq'::regclass);
-CREATE VIEW v_menu_description_favori AS
- WITH t_menu AS (SELECT mr.me_menu, pm.me_code, pm.me_code_dep,
pm.p_type_display, pu.user_name, mr.me_file, mr.me_javascript,
mr.me_description, mr.me_description_etendue FROM (((profile_menu pm JOIN
profile_user pu ON ((pu.p_id = pm.p_id))) JOIN profile p ON ((p.p_id =
pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code,
''::text) WH [...]
+ALTER TABLE ONLY public.action_tags ALTER COLUMN at_id SET DEFAULT
nextval('public.action_tags_at_id_seq'::regclass);
-CREATE VIEW v_menu_profile AS
- WITH t_menu AS (SELECT pm.pm_id, pm.pm_id_dep, pm.me_code, pm.me_code_dep,
pm.p_type_display, pm.p_id FROM (profile_menu pm JOIN profile p ON ((p.p_id =
pm.p_id)))) SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) || CASE WHEN (v2.me_code IS NULL) THEN
COALESCE(v1.me_code, ''::text) WHEN (v2.me_code IS NOT NULL) THEN
COALESCE(('/'::text || v1.me_code), ''::text) ELSE NULL::text END) AS code,
v3.p_type_display, COALESCE(v3.pm_id, 0) AS [...]
+ALTER TABLE ONLY public.bookmark ALTER COLUMN b_id SET DEFAULT
nextval('public.bookmark_b_id_seq'::regclass);
-COMMENT ON VIEW v_menu_profile IS 'Give the profile and the menu +
dependencies';
+ALTER TABLE ONLY public.contact_option_ref ALTER COLUMN cor_id SET DEFAULT
nextval('public.contact_option_ref_cor_id_seq'::regclass);
-CREATE VIEW v_quant_detail AS
- WITH quant AS (SELECT quant_purchase.j_id, quant_purchase.qp_fiche AS
fiche_id, quant_purchase.qp_supplier AS tiers, quant_purchase.qp_vat AS
vat_amount, quant_purchase.qp_price AS price, quant_purchase.qp_vat_code AS
vat_code, quant_purchase.qp_dep_priv AS dep_priv, quant_purchase.qp_nd_tva AS
nd_tva, quant_purchase.qp_nd_tva_recup AS nd_tva_recup,
quant_purchase.qp_nd_amount AS nd_amount, quant_purchase.qp_vat_sided AS
vat_sided FROM quant_purchase UNION ALL SELECT quant_sold.j_id, [...]
+ALTER TABLE ONLY public.currency ALTER COLUMN id SET DEFAULT
nextval('public.currency_id_seq'::regclass);
-CREATE VIEW v_tva_rate AS
- SELECT tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label,
tva_rate.tva_comment, split_part(tva_rate.tva_poste, ','::text, 1) AS
tva_purchase, split_part(tva_rate.tva_poste, ','::text, 2) AS tva_sale,
tva_rate.tva_both_side FROM tva_rate;
+ALTER TABLE ONLY public.currency_history ALTER COLUMN id SET DEFAULT
nextval('public.currency_history_id_seq'::regclass);
-COMMENT ON VIEW v_tva_rate IS 'Show this table to be easily used by
Tva_Rate_MTable';
+ALTER TABLE ONLY public.del_action ALTER COLUMN del_id SET DEFAULT
nextval('public.del_action_del_id_seq'::regclass);
-COMMENT ON COLUMN v_tva_rate.tva_purchase IS ' VAT used for purchase';
+ALTER TABLE ONLY public.del_jrn ALTER COLUMN dj_id SET DEFAULT
nextval('public.del_jrn_dj_id_seq'::regclass);
-COMMENT ON COLUMN v_tva_rate.tva_sale IS ' VAT used for sale';
+ALTER TABLE ONLY public.del_jrnx ALTER COLUMN djx_id SET DEFAULT
nextval('public.del_jrnx_djx_id_seq'::regclass);
-COMMENT ON COLUMN v_tva_rate.tva_both_side IS 'if 1 , VAT avoided ';
+ALTER TABLE ONLY public.document_option ALTER COLUMN do_id SET DEFAULT
nextval('public.document_option_do_id_seq'::regclass);
-CREATE TABLE version (
- val integer NOT NULL,
- v_description text,
- v_date timestamp without time zone DEFAULT now()
-);
+ALTER TABLE ONLY public.extension ALTER COLUMN ex_id SET DEFAULT
nextval('public.extension_ex_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.forecast ALTER COLUMN f_id SET DEFAULT
nextval('public.forecast_f_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.forecast_category ALTER COLUMN fc_id SET DEFAULT
nextval('public.forecast_cat_fc_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.forecast_item ALTER COLUMN fi_id SET DEFAULT
nextval('public.forecast_item_fi_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.jnt_document_option_contact ALTER COLUMN jdoc_id SET
DEFAULT nextval('public.jnt_document_option_contact_jdoc_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.jnt_letter ALTER COLUMN jl_id SET DEFAULT
nextval('public.jnt_letter_jl_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.jnt_tag_group_tag ALTER COLUMN jt_id SET DEFAULT
nextval('public.jnt_tag_group_tag_jt_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.jrn_info ALTER COLUMN ji_id SET DEFAULT
nextval('public.jrn_info_ji_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.jrn_note ALTER COLUMN n_id SET DEFAULT
nextval('public.jrn_note_n_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.key_distribution ALTER COLUMN kd_id SET DEFAULT
nextval('public.key_distribution_kd_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.key_distribution_activity ALTER COLUMN ka_id SET
DEFAULT nextval('public.key_distribution_activity_ka_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.key_distribution_detail ALTER COLUMN ke_id SET DEFAULT
nextval('public.key_distribution_detail_ke_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.key_distribution_ledger ALTER COLUMN kl_id SET DEFAULT
nextval('public.key_distribution_ledger_kl_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.letter_cred ALTER COLUMN lc_id SET DEFAULT
nextval('public.letter_cred_lc_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.letter_deb ALTER COLUMN ld_id SET DEFAULT
nextval('public.letter_deb_ld_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.link_action_type ALTER COLUMN l_id SET DEFAULT
nextval('public.link_action_type_l_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.menu_default ALTER COLUMN md_id SET DEFAULT
nextval('public.menu_default_md_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.operation_currency ALTER COLUMN id SET DEFAULT
nextval('public.operation_currency_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.operation_tag ALTER COLUMN opt_id SET DEFAULT
nextval('public.operation_tag_opt_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.parameter_extra ALTER COLUMN id SET DEFAULT
nextval('public.parameter_extra_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.payment_method ALTER COLUMN mp_id SET DEFAULT
nextval('public.mod_payment_mp_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.profile ALTER COLUMN p_id SET DEFAULT
nextval('public.profile_p_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.profile_menu ALTER COLUMN pm_id SET DEFAULT
nextval('public.profile_menu_pm_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.profile_mobile ALTER COLUMN pmo_id SET DEFAULT
nextval('public.profile_mobile_pmo_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.profile_sec_repository ALTER COLUMN ur_id SET DEFAULT
nextval('public.profile_sec_repository_ur_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.profile_user ALTER COLUMN pu_id SET DEFAULT
nextval('public.profile_user_pu_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.quant_fin ALTER COLUMN qf_id SET DEFAULT
nextval('public.quant_fin_qf_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.stock_change ALTER COLUMN c_id SET DEFAULT
nextval('public.stock_change_c_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.stock_repository ALTER COLUMN r_id SET DEFAULT
nextval('public.stock_repository_r_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.tag_group ALTER COLUMN tg_id SET DEFAULT
nextval('public.tag_group_tg_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.tags ALTER COLUMN t_id SET DEFAULT
nextval('public.tags_t_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.tmp_stockgood ALTER COLUMN s_id SET DEFAULT
nextval('public.tmp_stockgood_s_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.tmp_stockgood_detail ALTER COLUMN d_id SET DEFAULT
nextval('public.tmp_stockgood_detail_d_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.todo_list_shared ALTER COLUMN id SET DEFAULT
nextval('public.todo_list_shared_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.user_active_security ALTER COLUMN id SET DEFAULT
nextval('public.user_active_security_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.user_filter ALTER COLUMN id SET DEFAULT
nextval('public.user_filter_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.user_sec_action_profile ALTER COLUMN ua_id SET DEFAULT
nextval('public.user_sec_action_profile_ua_id_seq'::regclass);
+
+
+
+ALTER TABLE ONLY public.acc_other_tax
+ ADD CONSTRAINT acc_other_tax_pk PRIMARY KEY (ac_id);
+
+
+
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_pkey PRIMARY KEY (acd_id);
+
+
+
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_un UNIQUE (document_id,
action_gestion_comment_id);
+
+
+
+ALTER TABLE ONLY public.action_gestion_operation
+ ADD CONSTRAINT action_comment_operation_pkey PRIMARY KEY (ago_id);
+
+
+
+ALTER TABLE ONLY public.action_detail
+ ADD CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id);
+
+
+
+ALTER TABLE ONLY public.action_gestion_comment
+ ADD CONSTRAINT action_gestion_comment_pkey PRIMARY KEY (agc_id);
+
+
+
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT action_gestion_pkey PRIMARY KEY (ag_id);
+
+
+
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_pkey PRIMARY KEY (aga_id);
+
+
+
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT action_person_option_pk PRIMARY KEY (ap_id);
-CREATE VIEW vw_client AS
- SELECT fiche.f_id, a1.ad_value AS name, a.ad_value AS quick_code,
b.ad_value AS tva_num, c.ad_value AS poste_comptable, d.ad_value AS rue,
e.ad_value AS code_postal, f.ad_value AS pays, g.ad_value AS telephone,
h.ad_value AS email FROM (((((((((((fiche JOIN fiche_def USING (fd_id)) JOIN
fiche_def_ref USING (frd_id)) LEFT JOIN (SELECT fiche_detail.jft_id,
fiche_detail.f_id, fiche_detail.ad_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id)) LEF [...]
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_person_pkey PRIMARY KEY (ap_id);
-CREATE VIEW vw_fiche_def AS
- SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, attr_def.ad_text,
fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account,
fiche_def.frd_id FROM ((fiche_def JOIN jnt_fic_attr USING (fd_id)) JOIN
attr_def ON ((attr_def.ad_id = jnt_fic_attr.ad_id)));
+ALTER TABLE ONLY public.action
+ ADD CONSTRAINT action_pkey PRIMARY KEY (ac_id);
-COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family';
+ALTER TABLE ONLY public.action_tags
+ ADD CONSTRAINT action_tags_pkey PRIMARY KEY (at_id);
-CREATE VIEW vw_fiche_min AS
- SELECT attr_min.frd_id, attr_min.ad_id, attr_def.ad_text,
fiche_def_ref.frd_text, fiche_def_ref.frd_class_base FROM ((attr_min JOIN
attr_def USING (ad_id)) JOIN fiche_def_ref USING (frd_id));
+ALTER TABLE ONLY public.attr_def
+ ADD CONSTRAINT attr_def_pkey PRIMARY KEY (ad_id);
-CREATE VIEW vw_poste_qcode AS
- SELECT c.f_id, a.ad_value AS j_poste, b.ad_value AS j_qcode FROM ((fiche c
LEFT JOIN (SELECT fiche_detail.f_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 5)) a USING (f_id)) LEFT JOIN (SELECT
fiche_detail.f_id, fiche_detail.ad_value FROM fiche_detail WHERE
(fiche_detail.ad_id = 23)) b USING (f_id));
+ALTER TABLE ONLY public.bilan
+ ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name);
-CREATE VIEW vw_supplier AS
- SELECT fiche.f_id, a1.ad_value AS name, a.ad_value AS quick_code,
b.ad_value AS tva_num, c.ad_value AS poste_comptable, d.ad_value AS rue,
e.ad_value AS code_postal, f.ad_value AS pays, g.ad_value AS telephone,
h.ad_value AS email FROM (((((((((((fiche JOIN fiche_def USING (fd_id)) JOIN
fiche_def_ref USING (frd_id)) LEFT JOIN (SELECT fiche_detail.jft_id,
fiche_detail.f_id, fiche_detail.ad_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id)) LEF [...]
+ALTER TABLE ONLY public.bilan
+ ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id);
+ALTER TABLE ONLY public.bookmark
+ ADD CONSTRAINT bookmark_pkey PRIMARY KEY (b_id);
+ALTER TABLE ONLY public.centralized
+ ADD CONSTRAINT centralized_pkey PRIMARY KEY (c_id);
+ALTER TABLE ONLY public.contact_option_ref
+ ADD CONSTRAINT contact_option_ref_pk PRIMARY KEY (cor_id);
+ALTER TABLE ONLY public.currency_history
+ ADD CONSTRAINT currency_history_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.currency
+ ADD CONSTRAINT currency_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.currency
+ ADD CONSTRAINT currency_un UNIQUE (cr_code_iso);
+ALTER TABLE ONLY public.del_action
+ ADD CONSTRAINT del_action_pkey PRIMARY KEY (del_id);
+ALTER TABLE ONLY public.del_jrn
+ ADD CONSTRAINT dj_id PRIMARY KEY (dj_id);
+ALTER TABLE ONLY public.del_jrnx
+ ADD CONSTRAINT djx_id PRIMARY KEY (djx_id);
+ALTER TABLE ONLY public.document_component
+ ADD CONSTRAINT document_component_pk PRIMARY KEY (dc_id);
+ALTER TABLE ONLY public.document_component
+ ADD CONSTRAINT document_component_un UNIQUE (dc_code);
+ALTER TABLE ONLY public.document_modele
+ ADD CONSTRAINT document_modele_pkey PRIMARY KEY (md_id);
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_ref_pk PRIMARY KEY (do_id);
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_un UNIQUE (do_code, document_type_id);
+ALTER TABLE ONLY public.document
+ ADD CONSTRAINT document_pkey PRIMARY KEY (d_id);
+ALTER TABLE ONLY public.document_state
+ ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id);
+ALTER TABLE ONLY public.document_type
+ ADD CONSTRAINT document_type_pkey PRIMARY KEY (dt_id);
+ALTER TABLE ONLY public.fiche_def
+ ADD CONSTRAINT fiche_def_pkey PRIMARY KEY (fd_id);
+ALTER TABLE ONLY public.fiche_def_ref
+ ADD CONSTRAINT fiche_def_ref_pkey PRIMARY KEY (frd_id);
+ALTER TABLE ONLY public.fiche
+ ADD CONSTRAINT fiche_pkey PRIMARY KEY (f_id);
+ALTER TABLE ONLY public.forecast_category
+ ADD CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id);
+ALTER TABLE ONLY public.forecast_item
+ ADD CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id);
+ALTER TABLE ONLY public.forecast
+ ADD CONSTRAINT forecast_pk PRIMARY KEY (f_id);
+ALTER TABLE ONLY public.form_detail
+ ADD CONSTRAINT form_pkey PRIMARY KEY (fo_id);
+ALTER TABLE ONLY public.form_definition
+ ADD CONSTRAINT formdef_pkey PRIMARY KEY (fr_id);
+ALTER TABLE ONLY public.attr_min
+ ADD CONSTRAINT frd_ad_attr_min_pk PRIMARY KEY (frd_id, ad_id);
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id);
+ALTER TABLE ONLY public.tmp_pcmn
+ ADD CONSTRAINT id_ux UNIQUE (id);
+ALTER TABLE ONLY public.extension
+ ADD CONSTRAINT idx_ex_code UNIQUE (ex_code);
+ALTER TABLE ONLY public.info_def
+ ADD CONSTRAINT info_def_pkey PRIMARY KEY (id_type);
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_pkey PRIMARY KEY (jdoc_id);
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_un UNIQUE (document_type_id,
contact_option_ref_id);
+ALTER TABLE ONLY public.fiche_detail
+ ADD CONSTRAINT jnt_fic_att_value_pkey PRIMARY KEY (jft_id);
+ALTER TABLE ONLY public.jnt_letter
+ ADD CONSTRAINT jnt_letter_pk PRIMARY KEY (jl_id);
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_pkey PRIMARY KEY (jt_id);
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_un UNIQUE (tag_id, tag_group_id);
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT jrn_def_jrn_def_name_key UNIQUE (jrn_def_name);
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT jrn_def_pkey PRIMARY KEY (jrn_def_id);
+ALTER TABLE ONLY public.jrn_info
+ ADD CONSTRAINT jrn_info_pkey PRIMARY KEY (ji_id);
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_periode_periode_ledger UNIQUE (jrn_def_id, p_id);
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_periode_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id);
+ALTER TABLE ONLY public.jrn_rapt
+ ADD CONSTRAINT jrn_rapt_pkey PRIMARY KEY (jra_id);
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_pk PRIMARY KEY (jt_id);
+ALTER TABLE ONLY public.jrn_type
+ ADD CONSTRAINT jrn_type_pkey PRIMARY KEY (jrn_type_id);
+ALTER TABLE ONLY public.jrn_note
+ ADD CONSTRAINT jrnx_note_pkey PRIMARY KEY (n_id);
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT jrnx_pkey PRIMARY KEY (j_id);
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_pkey PRIMARY KEY (ka_id);
+ALTER TABLE ONLY public.key_distribution_detail
+ ADD CONSTRAINT key_distribution_detail_pkey PRIMARY KEY (ke_id);
+ALTER TABLE ONLY public.key_distribution_ledger
+ ADD CONSTRAINT key_distribution_ledger_pkey PRIMARY KEY (kl_id);
+ALTER TABLE ONLY public.key_distribution
+ ADD CONSTRAINT key_distribution_pkey PRIMARY KEY (kd_id);
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT letter_cred_j_id_key UNIQUE (j_id);
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT letter_cred_pk PRIMARY KEY (lc_id);
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT letter_deb_j_id_key UNIQUE (j_id);
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT letter_deb_pk PRIMARY KEY (ld_id);
+ALTER TABLE ONLY public.link_action_type
+ ADD CONSTRAINT link_action_type_pkey PRIMARY KEY (l_id);
+ALTER TABLE ONLY public.menu_default
+ ADD CONSTRAINT menu_default_md_code_key UNIQUE (md_code);
+ALTER TABLE ONLY public.menu_default
+ ADD CONSTRAINT menu_default_pkey PRIMARY KEY (md_id);
+ALTER TABLE ONLY public.menu_ref
+ ADD CONSTRAINT menu_ref_pkey PRIMARY KEY (me_code);
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id);
+ALTER TABLE ONLY public.op_predef
+ ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name, jrn_def_id);
+ALTER TABLE ONLY public.op_predef
+ ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id);
+ALTER TABLE ONLY public.op_predef_detail
+ ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id);
+ALTER TABLE ONLY public.operation_currency
+ ADD CONSTRAINT operation_currency_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.operation_exercice_detail
+ ADD CONSTRAINT operation_exercice_detail_pkey PRIMARY KEY (oed_id);
+ALTER TABLE ONLY public.operation_exercice
+ ADD CONSTRAINT operation_exercice_pkey PRIMARY KEY (oe_id);
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT operation_tag_pkey PRIMARY KEY (opt_id);
+ALTER TABLE ONLY public.parameter_extra
+ ADD CONSTRAINT parameter_extra_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.parameter
+ ADD CONSTRAINT parameter_pkey PRIMARY KEY (pr_id);
+ALTER TABLE ONLY public.parm_appearance
+ ADD CONSTRAINT parm_appearance_pkey PRIMARY KEY (a_code);
+ALTER TABLE ONLY public.parm_code
+ ADD CONSTRAINT parm_code_pkey PRIMARY KEY (p_code);
+ALTER TABLE ONLY public.parm_money
+ ADD CONSTRAINT parm_money_pkey PRIMARY KEY (pm_code);
+ALTER TABLE ONLY public.parm_periode
+ ADD CONSTRAINT parm_periode_pkey PRIMARY KEY (p_id);
+ALTER TABLE ONLY public.parm_poste
+ ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value);
+ALTER TABLE ONLY public.parameter_extra
+ ADD CONSTRAINT pe_code_ux UNIQUE (pe_code);
+ALTER TABLE ONLY public.extension
+ ADD CONSTRAINT pk_extension PRIMARY KEY (ex_id);
+ALTER TABLE ONLY public.groupe_analytique
+ ADD CONSTRAINT pk_ga_id PRIMARY KEY (ga_id);
+ALTER TABLE ONLY public.jnt_fic_attr
+ ADD CONSTRAINT pk_jnt_fic_attr PRIMARY KEY (jnt_id);
+ALTER TABLE ONLY public.user_local_pref
+ ADD CONSTRAINT pk_user_local_pref PRIMARY KEY (user_id, parameter_type);
+ALTER TABLE ONLY public.plan_analytique
+ ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name);
+ALTER TABLE ONLY public.plan_analytique
+ ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id);
+ALTER TABLE ONLY public.poste_analytique
+ ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id);
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_pkey PRIMARY KEY (pm_id);
+ALTER TABLE ONLY public.profile_menu_type
+ ADD CONSTRAINT profile_menu_type_pkey PRIMARY KEY (pm_type);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_code_uq UNIQUE (p_id, me_code);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_pkey PRIMARY KEY (pmo_id);
+ALTER TABLE ONLY public.profile
+ ADD CONSTRAINT profile_pkey PRIMARY KEY (p_id);
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_pkey PRIMARY KEY (ur_id);
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_r_id_p_id_u UNIQUE (r_id, p_id);
+ALTER TABLE ONLY public.profile_user
+ ADD CONSTRAINT profile_user_pkey PRIMARY KEY (pu_id);
+ALTER TABLE ONLY public.profile_user
+ ADD CONSTRAINT profile_user_user_name_key UNIQUE (user_name, p_id);
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_id);
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT qs_id_pk PRIMARY KEY (qs_id);
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT quant_fin_pk PRIMARY KEY (qf_id);
+ALTER TABLE ONLY public.stock_change
+ ADD CONSTRAINT stock_change_pkey PRIMARY KEY (c_id);
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id);
+ALTER TABLE ONLY public.stock_repository
+ ADD CONSTRAINT stock_repository_pkey PRIMARY KEY (r_id);
+ALTER TABLE ONLY public.tag_group
+ ADD CONSTRAINT tag_group_pk PRIMARY KEY (tg_id);
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT tag_operation_uq UNIQUE (jrn_id, tag_id);
+ALTER TABLE ONLY public.tags
+ ADD CONSTRAINT tags_pkey PRIMARY KEY (t_id);
+ALTER TABLE ONLY public.tmp_pcmn
+ ADD CONSTRAINT tmp_pcmn_pkey PRIMARY KEY (pcm_val);
+ALTER TABLE ONLY public.tmp_stockgood_detail
+ ADD CONSTRAINT tmp_stockgood_detail_pkey PRIMARY KEY (d_id);
+ALTER TABLE ONLY public.tmp_stockgood
+ ADD CONSTRAINT tmp_stockgood_pkey PRIMARY KEY (s_id);
+ALTER TABLE ONLY public.todo_list
+ ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id);
+ALTER TABLE ONLY public.todo_list_shared
+ ADD CONSTRAINT todo_list_shared_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.tool_uos
+ ADD CONSTRAINT tool_uos_pkey PRIMARY KEY (uos_value);
+ALTER TABLE ONLY public.tva_rate
+ ADD CONSTRAINT tva_code_unique UNIQUE (tva_code);
+ALTER TABLE ONLY public.tva_rate
+ ADD CONSTRAINT tva_id_pk PRIMARY KEY (tva_id);
+ALTER TABLE ONLY public.user_sec_jrn
+ ADD CONSTRAINT uniq_user_ledger UNIQUE (uj_login, uj_jrn_id);
+COMMENT ON CONSTRAINT uniq_user_ledger ON public.user_sec_jrn IS 'Create an
unique combination user / ledger';
+ALTER TABLE ONLY public.todo_list_shared
+ ADD CONSTRAINT unique_todo_list_id_login UNIQUE (todo_list_id, use_login);
+ALTER TABLE ONLY public.user_active_security
+ ADD CONSTRAINT user_active_security_pk PRIMARY KEY (id);
+ALTER TABLE ONLY public.user_filter
+ ADD CONSTRAINT user_filter_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.user_sec_act
+ ADD CONSTRAINT user_sec_act_pkey PRIMARY KEY (ua_id);
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_p_id_p_granted_u UNIQUE (p_id,
p_granted);
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_pkey PRIMARY KEY (ua_id);
+ALTER TABLE ONLY public.user_sec_jrn
+ ADD CONSTRAINT user_sec_jrn_pkey PRIMARY KEY (uj_id);
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT ux_aga_least_aga_greatest UNIQUE (aga_least, aga_greatest);
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT ux_internal UNIQUE (jr_internal);
+ALTER TABLE ONLY public.version
+ ADD CONSTRAINT version_pkey PRIMARY KEY (val);
+CREATE UNIQUE INDEX fd_id_ad_id_x ON public.jnt_fic_attr USING btree (fd_id,
ad_id);
+CREATE INDEX fiche_detail_attr_ix ON public.fiche_detail USING btree (ad_id);
+CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON public.fiche_detail USING btree
(f_id, ad_id);
+CREATE INDEX fk_action_person_action_gestion ON public.action_person USING
btree (ag_id);
+CREATE INDEX fk_action_person_fiche ON public.action_person USING btree (f_id);
+CREATE INDEX fk_stock_good_repository_r_id ON public.stock_goods USING btree
(r_id);
+CREATE INDEX fk_stock_goods_f_id ON public.stock_goods USING btree (f_id);
+CREATE INDEX fk_stock_goods_j_id ON public.stock_goods USING btree (j_id);
+CREATE INDEX fki_f_end_date ON public.forecast USING btree (f_end_date);
+CREATE INDEX fki_f_start_date ON public.forecast USING btree (f_start_date);
+CREATE INDEX fki_jrn_jr_grpt_id ON public.jrn USING btree (jr_grpt_id);
+CREATE INDEX fki_jrnx_f_id ON public.jrnx USING btree (f_id);
+CREATE INDEX fki_jrnx_j_grpt ON public.jrnx USING btree (j_grpt);
+CREATE INDEX fki_profile_menu_me_code ON public.profile_menu USING btree
(me_code);
+CREATE INDEX fki_profile_menu_profile ON public.profile_menu USING btree
(p_id);
+CREATE INDEX fki_profile_menu_type_fkey ON public.profile_menu USING btree
(p_type_display);
+CREATE INDEX idx_qs_internal ON public.quant_sold USING btree (qs_internal);
+CREATE INDEX jnt_fic_att_value_fd_id_idx ON public.fiche_detail USING btree
(f_id);
+CREATE INDEX jnt_fic_attr_fd_id_idx ON public.jnt_fic_attr USING btree (fd_id);
+CREATE INDEX jrnx_j_qcode_ix ON public.jrnx USING btree (j_qcode);
+CREATE UNIQUE INDEX k_ag_ref ON public.action_gestion USING btree (ag_ref);
+CREATE INDEX link_action_type_fki ON public.action_gestion_related USING btree
(aga_type);
+CREATE UNIQUE INDEX qcode_idx ON public.fiche_detail USING btree (ad_value)
WHERE (ad_id = 23);
+CREATE UNIQUE INDEX qf_jr_id ON public.quant_fin USING btree (jr_id);
+CREATE UNIQUE INDEX qp_j_id ON public.quant_purchase USING btree (j_id);
+CREATE UNIQUE INDEX qs_j_id ON public.quant_sold USING btree (j_id);
-CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_id);
+CREATE INDEX quant_purchase_jrn_fki ON public.quant_purchase USING btree
(qp_internal);
-CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON fiche_detail USING btree (f_id,
ad_id);
+CREATE INDEX quant_sold_jrn_fki ON public.quant_sold USING btree (qs_internal);
-CREATE INDEX fk_action_person_action_gestion ON action_person USING btree
(ag_id);
+CREATE UNIQUE INDEX uj_login_uj_jrn_id ON public.user_sec_jrn USING btree
(uj_login, uj_jrn_id);
-CREATE INDEX fk_action_person_fiche ON action_person USING btree (f_id);
+CREATE UNIQUE INDEX ux_po_name ON public.poste_analytique USING btree
(po_name);
-CREATE INDEX fk_stock_good_repository_r_id ON stock_goods USING btree (r_id);
+CREATE UNIQUE INDEX x_jrn_jr_id ON public.jrn USING btree (jr_id);
-CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id);
+CREATE INDEX x_mt ON public.jrn USING btree (jr_mt);
-CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id);
+CREATE UNIQUE INDEX x_periode ON public.parm_periode USING btree (p_start,
p_end);
-CREATE INDEX fki_f_end_date ON forecast USING btree (f_end_date);
+CREATE INDEX x_poste ON public.jrnx USING btree (j_poste);
-CREATE INDEX fki_f_start_date ON forecast USING btree (f_start_date);
+CREATE TRIGGER action_gestion_t_insert_update BEFORE INSERT OR UPDATE ON
public.action_gestion FOR EACH ROW EXECUTE FUNCTION
comptaproc.action_gestion_ins_upd();
-CREATE INDEX fki_jrn_jr_grpt_id ON jrn USING btree (jr_grpt_id);
+COMMENT ON TRIGGER action_gestion_t_insert_update ON public.action_gestion IS
'Truncate the column ag_title to 70 char';
-CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id);
+CREATE TRIGGER document_modele_validate BEFORE INSERT OR UPDATE ON
public.document_modele FOR EACH ROW EXECUTE FUNCTION
comptaproc.t_document_modele_validate();
-CREATE INDEX fki_jrnx_j_grpt ON jrnx USING btree (j_grpt);
+CREATE TRIGGER document_validate BEFORE INSERT OR UPDATE ON public.document
FOR EACH ROW EXECUTE FUNCTION comptaproc.t_document_validate();
-CREATE INDEX fki_profile_menu_me_code ON profile_menu USING btree (me_code);
+CREATE TRIGGER fiche_def_ins_upd BEFORE INSERT OR UPDATE ON public.fiche_def
FOR EACH ROW EXECUTE FUNCTION comptaproc.fiche_def_ins_upd();
-CREATE INDEX fki_profile_menu_profile ON profile_menu USING btree (p_id);
+CREATE TRIGGER fiche_detail_check_qcode_trg BEFORE INSERT OR UPDATE ON
public.fiche_detail FOR EACH ROW EXECUTE FUNCTION
comptaproc.fiche_detail_check_qcode();
-CREATE INDEX fki_profile_menu_type_fkey ON profile_menu USING btree
(p_type_display);
+CREATE TRIGGER fiche_detail_check_trg BEFORE INSERT OR UPDATE ON
public.fiche_detail FOR EACH ROW EXECUTE FUNCTION
comptaproc.fiche_detail_check();
-CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal);
+CREATE TRIGGER info_def_ins_upd_t BEFORE INSERT OR UPDATE ON public.info_def
FOR EACH ROW EXECUTE FUNCTION comptaproc.info_def_ins_upd();
-CREATE INDEX jnt_fic_att_value_fd_id_idx ON fiche_detail USING btree (f_id);
+CREATE TRIGGER jrn_def_description_ins_upd BEFORE INSERT OR UPDATE ON
public.jrn_def FOR EACH ROW EXECUTE FUNCTION comptaproc.t_jrn_def_description();
-CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id);
+CREATE TRIGGER opd_limit_description BEFORE INSERT OR UPDATE ON
public.op_predef FOR EACH ROW EXECUTE FUNCTION
comptaproc.opd_limit_description();
-CREATE INDEX jrnx_j_qcode_ix ON jrnx USING btree (j_qcode);
+CREATE TRIGGER parm_periode_check_periode_trg BEFORE INSERT OR UPDATE ON
public.parm_periode FOR EACH ROW EXECUTE FUNCTION comptaproc.check_periode();
-CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref);
+CREATE TRIGGER profile_user_ins_upd BEFORE INSERT OR UPDATE ON
public.profile_user FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_profile_user_ins_upd();
-CREATE INDEX link_action_type_fki ON action_gestion_related USING btree
(aga_type);
+COMMENT ON TRIGGER profile_user_ins_upd ON public.profile_user IS 'Force the
column user_name to lowercase';
-CREATE UNIQUE INDEX qcode_idx ON fiche_detail USING btree (ad_value) WHERE
(ad_id = 23);
+CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON
public.quant_purchase FOR EACH ROW EXECUTE FUNCTION
comptaproc.quant_purchase_ins_upd();
-CREATE UNIQUE INDEX qf_jr_id ON quant_fin USING btree (jr_id);
+CREATE TRIGGER quant_sold_ins_upd_tr AFTER INSERT OR UPDATE ON
public.quant_sold FOR EACH ROW EXECUTE FUNCTION comptaproc.quant_sold_ins_upd();
-CREATE UNIQUE INDEX qp_j_id ON quant_purchase USING btree (j_id);
+CREATE TRIGGER remove_action_gestion AFTER DELETE ON public.fiche FOR EACH ROW
EXECUTE FUNCTION comptaproc.card_after_delete();
-CREATE UNIQUE INDEX qs_j_id ON quant_sold USING btree (j_id);
+CREATE TRIGGER t_check_balance AFTER INSERT OR UPDATE ON public.jrn FOR EACH
ROW EXECUTE FUNCTION comptaproc.proc_check_balance();
-CREATE INDEX quant_purchase_jrn_fki ON quant_purchase USING btree
(qp_internal);
+CREATE TRIGGER t_check_jrn BEFORE INSERT OR DELETE OR UPDATE ON public.jrn FOR
EACH ROW EXECUTE FUNCTION comptaproc.jrn_check_periode();
-CREATE INDEX quant_sold_jrn_fki ON quant_sold USING btree (qs_internal);
+CREATE TRIGGER t_code BEFORE INSERT OR UPDATE ON public.document_component FOR
EACH ROW EXECUTE FUNCTION comptaproc.four_upper_letter();
-CREATE UNIQUE INDEX uj_login_uj_jrn_id ON user_sec_jrn USING btree (uj_login,
uj_jrn_id);
+CREATE TRIGGER t_group_analytic_del BEFORE DELETE ON public.groupe_analytique
FOR EACH ROW EXECUTE FUNCTION comptaproc.group_analytique_del();
-CREATE UNIQUE INDEX ux_po_name ON poste_analytique USING btree (po_name);
+CREATE TRIGGER t_group_analytic_ins_upd BEFORE INSERT OR UPDATE ON
public.groupe_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.group_analytic_ins_upd();
-CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id);
+CREATE TRIGGER t_jnt_fic_attr_ins AFTER INSERT ON public.jnt_fic_attr FOR EACH
ROW EXECUTE FUNCTION comptaproc.jnt_fic_attr_ins();
-CREATE INDEX x_mt ON jrn USING btree (jr_mt);
+CREATE TRIGGER t_jrn_currency BEFORE INSERT OR UPDATE ON public.jrn FOR EACH
ROW EXECUTE FUNCTION comptaproc.jrn_currency();
-CREATE UNIQUE INDEX x_periode ON parm_periode USING btree (p_start, p_end);
+CREATE TRIGGER t_jrn_def_add_periode AFTER INSERT ON public.jrn_def FOR EACH
ROW EXECUTE FUNCTION comptaproc.jrn_def_add();
-CREATE INDEX x_poste ON jrnx USING btree (j_poste);
+CREATE TRIGGER t_jrn_def_delete BEFORE DELETE ON public.jrn_def FOR EACH ROW
EXECUTE FUNCTION comptaproc.jrn_def_delete();
+CREATE TRIGGER t_jrn_del BEFORE DELETE ON public.jrn FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrn_del();
+CREATE TRIGGER t_jrnx_del BEFORE DELETE ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_del();
+CREATE TRIGGER t_jrnx_ins BEFORE INSERT ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_ins();
+COMMENT ON TRIGGER t_jrnx_ins ON public.jrnx IS 'check that the qcode used by
the card exists and format it : uppercase and trim the space';
+CREATE TRIGGER t_letter_del AFTER DELETE ON public.jrnx FOR EACH ROW EXECUTE
FUNCTION comptaproc.jrnx_letter_del();
+COMMENT ON TRIGGER t_letter_del ON public.jrnx IS 'Delete the lettering for
this row';
+CREATE TRIGGER t_plan_analytique_ins_upd BEFORE INSERT OR UPDATE ON
public.plan_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.plan_analytic_ins_upd();
+CREATE TRIGGER t_poste_analytique_ins_upd BEFORE INSERT OR UPDATE ON
public.poste_analytique FOR EACH ROW EXECUTE FUNCTION
comptaproc.poste_analytique_ins_upd();
+CREATE TRIGGER t_remove_script_tag BEFORE INSERT OR UPDATE ON
public.action_gestion_comment FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_remove_script_tag();
+CREATE TRIGGER t_tmp_pcm_alphanum_ins_upd BEFORE INSERT OR UPDATE ON
public.tmp_pcmn FOR EACH ROW EXECUTE FUNCTION
comptaproc.tmp_pcmn_alphanum_ins_upd();
+CREATE TRIGGER t_tmp_pcmn_ins BEFORE INSERT ON public.tmp_pcmn FOR EACH ROW
EXECUTE FUNCTION comptaproc.tmp_pcmn_ins();
+CREATE TRIGGER todo_list_ins_upd BEFORE INSERT OR UPDATE ON public.todo_list
FOR EACH ROW EXECUTE FUNCTION comptaproc.trg_todo_list_ins_upd();
+COMMENT ON TRIGGER todo_list_ins_upd ON public.todo_list IS 'Force the column
use_login to lowercase';
+CREATE TRIGGER todo_list_shared_ins_upd BEFORE INSERT OR UPDATE ON
public.todo_list_shared FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_todo_list_shared_ins_upd();
+COMMENT ON TRIGGER todo_list_shared_ins_upd ON public.todo_list_shared IS
'Force the column ua_login to lowercase';
+CREATE TRIGGER trg_action_gestion_related BEFORE INSERT OR UPDATE ON
public.action_gestion_related FOR EACH ROW EXECUTE FUNCTION
comptaproc.action_gestion_related_ins_up();
+CREATE TRIGGER trg_category_card_before_delete BEFORE DELETE ON
public.fiche_def FOR EACH ROW EXECUTE FUNCTION
comptaproc.category_card_before_delete();
+CREATE TRIGGER trg_extension_ins_upd BEFORE INSERT OR UPDATE ON
public.extension FOR EACH ROW EXECUTE FUNCTION comptaproc.extension_ins_upd();
+CREATE TRIGGER trg_set_tech_user BEFORE INSERT OR UPDATE ON
public.operation_exercice FOR EACH ROW EXECUTE FUNCTION
comptaproc.set_tech_user();
+CREATE TRIGGER trigger_document_type_i AFTER INSERT ON public.document_type
FOR EACH ROW EXECUTE FUNCTION comptaproc.t_document_type_insert();
+CREATE TRIGGER trigger_jrn_def_sequence_i AFTER INSERT ON public.jrn_def FOR
EACH ROW EXECUTE FUNCTION comptaproc.t_jrn_def_sequence();
+CREATE TRIGGER trigger_parameter_extra_format_code_biu BEFORE INSERT OR UPDATE
ON public.parameter_extra FOR EACH ROW EXECUTE FUNCTION
comptaproc.t_parameter_extra_code();
+CREATE TRIGGER user_sec_act_ins_upd BEFORE INSERT OR UPDATE ON
public.user_sec_act FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_user_sec_act_ins_upd();
+COMMENT ON TRIGGER user_sec_act_ins_upd ON public.user_sec_act IS 'Force the
column ua_login to lowercase';
+CREATE TRIGGER user_sec_jrn_after_ins_upd BEFORE INSERT OR UPDATE ON
public.user_sec_jrn FOR EACH ROW EXECUTE FUNCTION
comptaproc.trg_user_sec_jrn_ins_upd();
+COMMENT ON TRIGGER user_sec_jrn_after_ins_upd ON public.user_sec_jrn IS 'Force
the column uj_login to lowercase';
+ALTER TABLE ONLY public.centralized
+ ADD CONSTRAINT "$1" FOREIGN KEY (c_jrn_def) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.user_sec_act
+ ADD CONSTRAINT "$1" FOREIGN KEY (ua_act_id) REFERENCES
public.action(ac_id);
+ALTER TABLE ONLY public.fiche_def
+ ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES
public.fiche_def_ref(frd_id);
+ALTER TABLE ONLY public.attr_min
+ ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES
public.fiche_def_ref(frd_id);
+ALTER TABLE ONLY public.fiche
+ ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES public.fiche_def(fd_id);
+ALTER TABLE ONLY public.fiche_detail
+ ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES public.fiche(f_id);
+ALTER TABLE ONLY public.jnt_fic_attr
+ ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES public.fiche_def(fd_id);
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT "$1" FOREIGN KEY (jr_def_id) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT "$1" FOREIGN KEY (jrn_def_type) REFERENCES
public.jrn_type(jrn_type_id);
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT "$2" FOREIGN KEY (j_jrn_def) REFERENCES
public.jrn_def(jrn_def_id);
+ALTER TABLE ONLY public.attr_min
+ ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES public.attr_def(ad_id);
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_action_gestion_comment_id_fkey
FOREIGN KEY (action_gestion_comment_id) REFERENCES
public.action_gestion_comment(agc_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_comment_document
+ ADD CONSTRAINT action_comment_document_document_id_fkey FOREIGN KEY
(document_id) REFERENCES public.document(d_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.action_gestion_operation
+ ADD CONSTRAINT action_comment_operation_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_operation
+ ADD CONSTRAINT action_comment_operation_jr_id_fkey FOREIGN KEY (jr_id)
REFERENCES public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_detail
+ ADD CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_gestion_ag_id_fk2 FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_comment
+ ADD CONSTRAINT action_gestion_comment_ag_id_fkey FOREIGN KEY (ag_id)
REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_greatest_fkey FOREIGN KEY
(aga_greatest) REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON
DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_least_fkey FOREIGN KEY
(aga_least) REFERENCES public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.action_gestion_related
+ ADD CONSTRAINT action_gestion_related_aga_type_fkey FOREIGN KEY (aga_type)
REFERENCES public.link_action_type(l_id);
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_person_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT action_person_f_id_fkey FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT action_person_option_fk FOREIGN KEY (action_person_id)
REFERENCES public.action_person(ap_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_tags
+ ADD CONSTRAINT action_tags_ag_id_fkey FOREIGN KEY (ag_id) REFERENCES
public.action_gestion(ag_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_tags
+ ADD CONSTRAINT action_tags_t_id_fkey FOREIGN KEY (t_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person_option
+ ADD CONSTRAINT contact_option_ref_fk FOREIGN KEY (contact_option_ref_id)
REFERENCES public.contact_option_ref(cor_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.currency_history
+ ADD CONSTRAINT currency_history_currency_fk FOREIGN KEY (currency_id)
REFERENCES public.currency(id) ON UPDATE CASCADE ON DELETE RESTRICT;
+ALTER TABLE ONLY public.document_modele
+ ADD CONSTRAINT document_modele_fk FOREIGN KEY (md_affect) REFERENCES
public.document_component(dc_code) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.document_option
+ ADD CONSTRAINT document_option_ref_fk FOREIGN KEY (document_type_id)
REFERENCES public.document_type(dt_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.fiche_detail
+ ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
public.attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_person
+ ADD CONSTRAINT fiche_f_id_fk2 FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id);
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT fiche_f_id_fk3 FOREIGN KEY (f_id_dest) REFERENCES
public.fiche(f_id);
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT fk_action_gestion_document_type FOREIGN KEY (ag_type)
REFERENCES public.document_type(dt_id);
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_card FOREIGN KEY (qf_bank) REFERENCES public.fiche(f_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_card_other FOREIGN KEY (qf_other) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.forecast_item
+ ADD CONSTRAINT fk_forecast FOREIGN KEY (fc_id) REFERENCES
public.forecast_category(fc_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_info
+ ADD CONSTRAINT fk_info_def FOREIGN KEY (id_type) REFERENCES
public.info_def(id_type) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_info
+ ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES public.jrn(jr_id) ON
UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES public.jrn(jr_id) ON
UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.groupe_analytique
+ ADD CONSTRAINT fk_pa_id FOREIGN KEY (pa_id) REFERENCES
public.plan_analytique(pa_id) ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (j_poste) REFERENCES
public.tmp_pcmn(pcm_val);
+ALTER TABLE ONLY public.centralized
+ ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (c_poste) REFERENCES
public.tmp_pcmn(pcm_val);
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT fk_stock_good_f_id FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.todo_list_shared
+ ADD CONSTRAINT fk_todo_list_shared_todo_list FOREIGN KEY (todo_list_id)
REFERENCES public.todo_list(tl_id);
+ALTER TABLE ONLY public.forecast_category
+ ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES
public.forecast(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.forecast
+ ADD CONSTRAINT forecast_f_end_date_fkey FOREIGN KEY (f_end_date)
REFERENCES public.parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.forecast
+ ADD CONSTRAINT forecast_f_start_date_fkey FOREIGN KEY (f_start_date)
REFERENCES public.parm_periode(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.form_detail
+ ADD CONSTRAINT formdef_fk FOREIGN KEY (fo_fr_id) REFERENCES
public.form_definition(fr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT jnt_cred_fk FOREIGN KEY (jl_id) REFERENCES
public.jnt_letter(jl_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT jnt_deb_fk FOREIGN KEY (jl_id) REFERENCES
public.jnt_letter(jl_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_contact_option_ref_id_fkey
FOREIGN KEY (contact_option_ref_id) REFERENCES
public.contact_option_ref(cor_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_document_option_contact
+ ADD CONSTRAINT jnt_document_option_contact_document_type_id_fkey FOREIGN
KEY (document_type_id) REFERENCES public.document_type(dt_id) ON UPDATE CASCADE
ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_fic_attr
+ ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id) REFERENCES
public.attr_def(ad_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_fk FOREIGN KEY (tag_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jnt_tag_group_tag
+ ADD CONSTRAINT jnt_tag_group_tag_fk_1 FOREIGN KEY (tag_group_id)
REFERENCES public.tag_group(tg_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn
+ ADD CONSTRAINT jrn_currency_fk FOREIGN KEY (currency_id) REFERENCES
public.currency(id) ON UPDATE RESTRICT ON DELETE RESTRICT;
+ALTER TABLE ONLY public.jrn_def
+ ADD CONSTRAINT jrn_def_currency_fk FOREIGN KEY (currency_id) REFERENCES
public.currency(id);
+ALTER TABLE ONLY public.op_predef
+ ADD CONSTRAINT jrn_def_id_fk FOREIGN KEY (jrn_def_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_per_jrn_def_id FOREIGN KEY (jrn_def_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_periode
+ ADD CONSTRAINT jrn_periode_p_id FOREIGN KEY (p_id) REFERENCES
public.parm_periode(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_rapt
+ ADD CONSTRAINT jrn_rapt_jr_id_fkey FOREIGN KEY (jr_id) REFERENCES
public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_rapt
+ ADD CONSTRAINT jrn_rapt_jra_concerned_fkey FOREIGN KEY (jra_concerned)
REFERENCES public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_acc_other_tax_fk FOREIGN KEY (ac_id) REFERENCES
public.acc_other_tax(ac_id);
+ALTER TABLE ONLY public.jrn_tax
+ ADD CONSTRAINT jrn_tax_fk FOREIGN KEY (j_id) REFERENCES public.jrnx(j_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrnx
+ ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES
public.fiche(f_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_fin
+ ADD CONSTRAINT jrnx_j_id_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.jrn_note
+ ADD CONSTRAINT jrnx_note_j_id_fkey FOREIGN KEY (jr_id) REFERENCES
public.jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_ke_id_fkey FOREIGN KEY (ke_id)
REFERENCES public.key_distribution_detail(ke_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_pa_id_fkey FOREIGN KEY (pa_id)
REFERENCES public.plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_activity
+ ADD CONSTRAINT key_distribution_activity_po_id_fkey FOREIGN KEY (po_id)
REFERENCES public.poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_detail
+ ADD CONSTRAINT key_distribution_detail_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES public.key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.key_distribution_ledger
+ ADD CONSTRAINT key_distribution_ledger_jrn_def_id_fkey FOREIGN KEY
(jrn_def_id) REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE
CASCADE;
+ALTER TABLE ONLY public.key_distribution_ledger
+ ADD CONSTRAINT key_distribution_ledger_kd_id_fkey FOREIGN KEY (kd_id)
REFERENCES public.key_distribution(kd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_cred
+ ADD CONSTRAINT letter_cred_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.letter_deb
+ ADD CONSTRAINT letter_deb_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.document_modele
+ ADD CONSTRAINT md_type FOREIGN KEY (md_type) REFERENCES
public.document_type(dt_id);
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_jrn_def_id_fk FOREIGN KEY (jrn_def_id)
REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES
public.fiche_def(fd_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.payment_method
+ ADD CONSTRAINT mod_payment_mp_jrn_def_id_fkey FOREIGN KEY (mp_jrn_def_id)
REFERENCES public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_fiche_id_fk FOREIGN KEY (f_id)
REFERENCES public.fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_j_id_fkey FOREIGN KEY (j_id)
REFERENCES public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_analytique
+ ADD CONSTRAINT operation_analytique_po_id_fkey FOREIGN KEY (po_id)
REFERENCES public.poste_analytique(po_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_currency
+ ADD CONSTRAINT operation_currency_jrnx_fk FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_exercice_detail
+ ADD CONSTRAINT operation_exercice_detail_oe_id_fkey FOREIGN KEY (oe_id)
REFERENCES public.operation_exercice(oe_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT opt_jrnx FOREIGN KEY (jrn_id) REFERENCES public.jrn(jr_id)
ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.operation_tag
+ ADD CONSTRAINT opt_tag_id FOREIGN KEY (tag_id) REFERENCES
public.tags(t_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.poste_analytique
+ ADD CONSTRAINT poste_analytique_pa_id_fkey FOREIGN KEY (pa_id) REFERENCES
public.plan_analytique(pa_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.action_gestion
+ ADD CONSTRAINT profile_fkey FOREIGN KEY (ag_dest) REFERENCES
public.profile(p_id) ON UPDATE SET NULL ON DELETE SET NULL;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_me_code_fkey FOREIGN KEY (me_code) REFERENCES
public.menu_ref(me_code) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_p_id_fkey FOREIGN KEY (p_id) REFERENCES
public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_menu
+ ADD CONSTRAINT profile_menu_type_fkey FOREIGN KEY (p_type_display)
REFERENCES public.profile_menu_type(pm_type);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_menu_ref_fk FOREIGN KEY (me_code) REFERENCES
public.menu_ref(me_code);
+ALTER TABLE ONLY public.profile_mobile
+ ADD CONSTRAINT profile_mobile_profile_fk FOREIGN KEY (p_id) REFERENCES
public.profile(p_id);
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_p_id_fkey FOREIGN KEY (p_id)
REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_sec_repository
+ ADD CONSTRAINT profile_sec_repository_r_id_fkey FOREIGN KEY (r_id)
REFERENCES public.stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.profile_user
+ ADD CONSTRAINT profile_user_p_id_fkey FOREIGN KEY (p_id) REFERENCES
public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT qp_vat_code_fk FOREIGN KEY (qp_vat_code) REFERENCES
public.tva_rate(tva_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT qs_vat_code_fk FOREIGN KEY (qs_vat_code) REFERENCES
public.tva_rate(tva_id) ON UPDATE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT quant_purchase_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_purchase
+ ADD CONSTRAINT quant_purchase_qp_internal_fkey FOREIGN KEY (qp_internal)
REFERENCES public.jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE
DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT quant_sold_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.quant_sold
+ ADD CONSTRAINT quant_sold_qs_internal_fkey FOREIGN KEY (qs_internal)
REFERENCES public.jrn(jr_internal) ON UPDATE CASCADE ON DELETE CASCADE
DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE ONLY public.stock_change
+ ADD CONSTRAINT stock_change_r_id_fkey FOREIGN KEY (r_id) REFERENCES
public.stock_repository(r_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT stock_goods_c_id_fkey FOREIGN KEY (c_id) REFERENCES
public.stock_change(c_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.stock_goods
+ ADD CONSTRAINT stock_goods_j_id_fkey FOREIGN KEY (j_id) REFERENCES
public.jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.tmp_stockgood_detail
+ ADD CONSTRAINT tmp_stockgood_detail_s_id_fkey FOREIGN KEY (s_id)
REFERENCES public.tmp_stockgood(s_id) ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_jrn
+ ADD CONSTRAINT uj_priv_id_fkey FOREIGN KEY (uj_jrn_id) REFERENCES
public.jrn_def(jrn_def_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_p_granted_fkey FOREIGN KEY
(p_granted) REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
+ALTER TABLE ONLY public.user_sec_action_profile
+ ADD CONSTRAINT user_sec_action_profile_p_id_fkey FOREIGN KEY (p_id)
REFERENCES public.profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE;
diff --git a/include/sql/mod1/sequence.sql b/include/sql/mod1/sequence.sql
index e266cb2df..ca5833fbd 100644
--- a/include/sql/mod1/sequence.sql
+++ b/include/sql/mod1/sequence.sql
@@ -1,713 +1,850 @@
-CREATE SEQUENCE action_detail_ad_id_seq
+CREATE SEQUENCE public.acc_other_tax_ac_id_seq
+ AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id;
-CREATE SEQUENCE action_gestion_ag_id_seq
+ALTER SEQUENCE public.acc_other_tax_ac_id_seq OWNED BY
public.acc_other_tax.ac_id;
+ SEQUENCE NAME public.action_comment_document_acd_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+CREATE SEQUENCE public.action_detail_ad_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE action_gestion_comment_agc_id_seq
+ALTER SEQUENCE public.action_detail_ad_id_seq OWNED BY
public.action_detail.ad_id;
+CREATE SEQUENCE public.action_gestion_ag_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_gestion_comment_agc_id_seq OWNED BY
action_gestion_comment.agc_id;
-CREATE SEQUENCE action_gestion_operation_ago_id_seq
+CREATE SEQUENCE public.action_gestion_comment_agc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_gestion_operation_ago_id_seq OWNED BY
action_gestion_operation.ago_id;
-CREATE SEQUENCE action_gestion_related_aga_id_seq
+ALTER SEQUENCE public.action_gestion_comment_agc_id_seq OWNED BY
public.action_gestion_comment.agc_id;
+ SEQUENCE NAME public.action_gestion_filter_af_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+CREATE SEQUENCE public.action_gestion_operation_ago_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_gestion_related_aga_id_seq OWNED BY
action_gestion_related.aga_id;
-CREATE SEQUENCE action_person_ap_id_seq
+ALTER SEQUENCE public.action_gestion_operation_ago_id_seq OWNED BY
public.action_gestion_operation.ago_id;
+CREATE SEQUENCE public.action_gestion_related_aga_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_person_ap_id_seq OWNED BY action_person.ap_id;
-CREATE SEQUENCE action_tags_at_id_seq
+ALTER SEQUENCE public.action_gestion_related_aga_id_seq OWNED BY
public.action_gestion_related.aga_id;
+CREATE SEQUENCE public.action_person_ap_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE action_tags_at_id_seq OWNED BY action_tags.at_id;
-CREATE SEQUENCE bilan_b_id_seq
+ALTER SEQUENCE public.action_person_ap_id_seq OWNED BY
public.action_person.ap_id;
+CREATE SEQUENCE public.action_person_option_ap_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE bookmark_b_id_seq
+ALTER SEQUENCE public.action_person_option_ap_id_seq OWNED BY
public.action_person_option.ap_id;
+CREATE SEQUENCE public.action_tags_at_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE bookmark_b_id_seq OWNED BY bookmark.b_id;
-CREATE SEQUENCE bud_card_bc_id_seq
+ALTER SEQUENCE public.action_tags_at_id_seq OWNED BY public.action_tags.at_id;
+CREATE SEQUENCE public.bilan_b_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE bud_detail_bd_id_seq
+CREATE SEQUENCE public.bookmark_b_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE bud_detail_periode_bdp_id_seq
+ALTER SEQUENCE public.bookmark_b_id_seq OWNED BY public.bookmark.b_id;
+CREATE SEQUENCE public.bud_card_bc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE del_action_del_id_seq
+CREATE SEQUENCE public.bud_detail_bd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id;
-CREATE SEQUENCE del_jrn_dj_id_seq
+CREATE SEQUENCE public.bud_detail_periode_bdp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE del_jrn_dj_id_seq OWNED BY del_jrn.dj_id;
-CREATE SEQUENCE del_jrnx_djx_id_seq
+CREATE SEQUENCE public.contact_option_ref_cor_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE del_jrnx_djx_id_seq OWNED BY del_jrnx.djx_id;
-CREATE SEQUENCE document_d_id_seq
+ALTER SEQUENCE public.contact_option_ref_cor_id_seq OWNED BY
public.contact_option_ref.cor_id;
+CREATE SEQUENCE public.currency_history_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE document_modele_md_id_seq
+ALTER SEQUENCE public.currency_history_id_seq OWNED BY
public.currency_history.id;
+CREATE SEQUENCE public.currency_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE document_seq
+ALTER SEQUENCE public.currency_id_seq OWNED BY public.currency.id;
+CREATE SEQUENCE public.del_action_del_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the
document modele';
-CREATE SEQUENCE document_state_s_id_seq
+ALTER SEQUENCE public.del_action_del_id_seq OWNED BY public.del_action.del_id;
+CREATE SEQUENCE public.del_jrn_dj_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE document_type_dt_id_seq
+ALTER SEQUENCE public.del_jrn_dj_id_seq OWNED BY public.del_jrn.dj_id;
+CREATE SEQUENCE public.del_jrnx_djx_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.del_jrnx_djx_id_seq OWNED BY public.del_jrnx.djx_id;
+CREATE SEQUENCE public.document_d_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ SEQUENCE NAME public.document_component_dc_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+CREATE SEQUENCE public.document_modele_md_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+CREATE SEQUENCE public.document_option_do_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.document_option_do_id_seq OWNED BY
public.document_option.do_id;
+CREATE SEQUENCE public.document_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+COMMENT ON SEQUENCE public.document_seq IS 'Sequence for the sequence bound to
the document modele';
+CREATE SEQUENCE public.document_state_s_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+CREATE SEQUENCE public.document_type_dt_id_seq
START WITH 25
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE extension_ex_id_seq
+CREATE SEQUENCE public.extension_ex_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id;
-CREATE SEQUENCE forecast_cat_fc_id_seq
+ALTER SEQUENCE public.extension_ex_id_seq OWNED BY public.extension.ex_id;
+CREATE SEQUENCE public.forecast_cat_fc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id;
-CREATE SEQUENCE forecast_f_id_seq
+ALTER SEQUENCE public.forecast_cat_fc_id_seq OWNED BY
public.forecast_category.fc_id;
+CREATE SEQUENCE public.forecast_f_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id;
-CREATE SEQUENCE forecast_item_fi_id_seq
+ALTER SEQUENCE public.forecast_f_id_seq OWNED BY public.forecast.f_id;
+CREATE SEQUENCE public.forecast_item_fi_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id;
-CREATE SEQUENCE historique_analytique_ha_id_seq
+ALTER SEQUENCE public.forecast_item_fi_id_seq OWNED BY
public.forecast_item.fi_id;
+CREATE SEQUENCE public.historique_analytique_ha_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jnt_id
+CREATE SEQUENCE public.jnt_document_option_contact_jdoc_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE jnt_letter_jl_id_seq
+ALTER SEQUENCE public.jnt_document_option_contact_jdoc_id_seq OWNED BY
public.jnt_document_option_contact.jdoc_id;
+CREATE SEQUENCE public.s_jnt_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id;
-CREATE SEQUENCE jrn_info_ji_id_seq
+CREATE SEQUENCE public.jnt_letter_jl_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id;
-CREATE SEQUENCE jrn_note_n_id_seq
+ALTER SEQUENCE public.jnt_letter_jl_id_seq OWNED BY public.jnt_letter.jl_id;
+CREATE SEQUENCE public.jnt_tag_group_tag_jt_id_seq
+ AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE jrn_note_n_id_seq OWNED BY jrn_note.n_id;
-CREATE SEQUENCE jrn_periode_id_seq
+ALTER SEQUENCE public.jnt_tag_group_tag_jt_id_seq OWNED BY
public.jnt_tag_group_tag.jt_id;
+CREATE SEQUENCE public.jrn_info_ji_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE key_distribution_activity_ka_id_seq
+ALTER SEQUENCE public.jrn_info_ji_id_seq OWNED BY public.jrn_info.ji_id;
+CREATE SEQUENCE public.jrn_note_n_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE key_distribution_activity_ka_id_seq OWNED BY
key_distribution_activity.ka_id;
-CREATE SEQUENCE key_distribution_detail_ke_id_seq
+ALTER SEQUENCE public.jrn_note_n_id_seq OWNED BY public.jrn_note.n_id;
+CREATE SEQUENCE public.jrn_periode_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE key_distribution_detail_ke_id_seq OWNED BY
key_distribution_detail.ke_id;
-CREATE SEQUENCE key_distribution_kd_id_seq
+ SEQUENCE NAME public.jrn_tax_jt_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+CREATE SEQUENCE public.key_distribution_activity_ka_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.key_distribution_activity_ka_id_seq OWNED BY
public.key_distribution_activity.ka_id;
+CREATE SEQUENCE public.key_distribution_detail_ke_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.key_distribution_detail_ke_id_seq OWNED BY
public.key_distribution_detail.ke_id;
+CREATE SEQUENCE public.key_distribution_kd_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.key_distribution_kd_id_seq OWNED BY
public.key_distribution.kd_id;
+CREATE SEQUENCE public.key_distribution_ledger_kl_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.key_distribution_ledger_kl_id_seq OWNED BY
public.key_distribution_ledger.kl_id;
+CREATE SEQUENCE public.letter_cred_lc_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.letter_cred_lc_id_seq OWNED BY public.letter_cred.lc_id;
+CREATE SEQUENCE public.letter_deb_ld_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE key_distribution_kd_id_seq OWNED BY key_distribution.kd_id;
-CREATE SEQUENCE key_distribution_ledger_kl_id_seq
+ALTER SEQUENCE public.letter_deb_ld_id_seq OWNED BY public.letter_deb.ld_id;
+CREATE SEQUENCE public.link_action_type_l_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE key_distribution_ledger_kl_id_seq OWNED BY
key_distribution_ledger.kl_id;
-CREATE SEQUENCE letter_cred_lc_id_seq
+ALTER SEQUENCE public.link_action_type_l_id_seq OWNED BY
public.link_action_type.l_id;
+CREATE SEQUENCE public.menu_default_md_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id;
-CREATE SEQUENCE letter_deb_ld_id_seq
+ALTER SEQUENCE public.menu_default_md_id_seq OWNED BY
public.menu_default.md_id;
+CREATE SEQUENCE public.mod_payment_mp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id;
-CREATE SEQUENCE link_action_type_l_id_seq
+ALTER SEQUENCE public.mod_payment_mp_id_seq OWNED BY
public.payment_method.mp_id;
+CREATE SEQUENCE public.op_def_op_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE link_action_type_l_id_seq OWNED BY link_action_type.l_id;
-CREATE SEQUENCE menu_default_md_id_seq
+CREATE SEQUENCE public.op_predef_detail_opd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE menu_default_md_id_seq OWNED BY menu_default.md_id;
-CREATE SEQUENCE mod_payment_mp_id_seq
+CREATE SEQUENCE public.s_oa_group
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id;
-CREATE SEQUENCE op_def_op_seq
+CREATE SEQUENCE public.operation_currency_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+ALTER SEQUENCE public.operation_currency_id_seq OWNED BY
public.operation_currency.id;
+ SEQUENCE NAME public.operation_exercice_detail_oed_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+ SEQUENCE NAME public.operation_exercice_oe_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1
+);
+CREATE SEQUENCE public.operation_tag_opt_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE op_predef_detail_opd_id_seq
+ALTER SEQUENCE public.operation_tag_opt_id_seq OWNED BY
public.operation_tag.opt_id;
+CREATE SEQUENCE public.parameter_extra_id_seq
+ AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_oa_group
+ALTER SEQUENCE public.parameter_extra_id_seq OWNED BY
public.parameter_extra.id;
+CREATE SEQUENCE public.plan_analytique_pa_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE plan_analytique_pa_id_seq
+CREATE SEQUENCE public.poste_analytique_po_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE poste_analytique_po_id_seq
+CREATE SEQUENCE public.profile_menu_pm_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE profile_menu_pm_id_seq
+ALTER SEQUENCE public.profile_menu_pm_id_seq OWNED BY
public.profile_menu.pm_id;
+CREATE SEQUENCE public.profile_mobile_pmo_id_seq
+ AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE profile_menu_pm_id_seq OWNED BY profile_menu.pm_id;
-CREATE SEQUENCE profile_p_id_seq
+ALTER SEQUENCE public.profile_mobile_pmo_id_seq OWNED BY
public.profile_mobile.pmo_id;
+CREATE SEQUENCE public.profile_p_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE profile_p_id_seq OWNED BY profile.p_id;
-CREATE SEQUENCE profile_sec_repository_ur_id_seq
+ALTER SEQUENCE public.profile_p_id_seq OWNED BY public.profile.p_id;
+CREATE SEQUENCE public.profile_sec_repository_ur_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE profile_sec_repository_ur_id_seq OWNED BY
profile_sec_repository.ur_id;
-CREATE SEQUENCE profile_user_pu_id_seq
+ALTER SEQUENCE public.profile_sec_repository_ur_id_seq OWNED BY
public.profile_sec_repository.ur_id;
+CREATE SEQUENCE public.profile_user_pu_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE profile_user_pu_id_seq OWNED BY profile_user.pu_id;
-CREATE SEQUENCE quant_fin_qf_id_seq
+ALTER SEQUENCE public.profile_user_pu_id_seq OWNED BY
public.profile_user.pu_id;
+CREATE SEQUENCE public.quant_fin_qf_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE quant_fin_qf_id_seq OWNED BY quant_fin.qf_id;
-CREATE SEQUENCE s_attr_def
+ALTER SEQUENCE public.quant_fin_qf_id_seq OWNED BY public.quant_fin.qf_id;
+CREATE SEQUENCE public.s_attr_def
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_cbc
+CREATE SEQUENCE public.s_cbc
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_central
+CREATE SEQUENCE public.s_central
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_central_order
+CREATE SEQUENCE public.s_central_order
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_centralized
+CREATE SEQUENCE public.s_centralized
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_currency
+CREATE SEQUENCE public.s_currency
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_fdef
+CREATE SEQUENCE public.s_fdef
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_fiche
+CREATE SEQUENCE public.s_fiche
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_fiche_def_ref
+CREATE SEQUENCE public.s_fiche_def_ref
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_form
+CREATE SEQUENCE public.s_form
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_formdef
+CREATE SEQUENCE public.s_formdef
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_grpt
+CREATE SEQUENCE public.s_grpt
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_idef
+CREATE SEQUENCE public.s_idef
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_internal
+CREATE SEQUENCE public.s_internal
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_invoice
+CREATE SEQUENCE public.s_invoice
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_isup
+CREATE SEQUENCE public.s_isup
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jnt_fic_att_value
+CREATE SEQUENCE public.s_jnt_fic_att_value
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn
+CREATE SEQUENCE public.s_jrn
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_1
+CREATE SEQUENCE public.s_jrn_1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_2
+CREATE SEQUENCE public.s_jrn_2
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_3
+CREATE SEQUENCE public.s_jrn_3
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_4
+CREATE SEQUENCE public.s_jrn_4
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_def
+CREATE SEQUENCE public.s_jrn_def
START WITH 5
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_op
+CREATE SEQUENCE public.s_jrn_op
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+CREATE SEQUENCE public.s_jrn_pj1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_pj1
+CREATE SEQUENCE public.s_jrn_pj2
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_pj2
+CREATE SEQUENCE public.s_jrn_pj3
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_pj3
+CREATE SEQUENCE public.s_jrn_pj4
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_pj4
+CREATE SEQUENCE public.s_jrn_rapt
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrn_rapt
+CREATE SEQUENCE public.s_jrnaction
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrnaction
+CREATE SEQUENCE public.s_jrnx
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_jrnx
+CREATE SEQUENCE public.s_periode
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_periode
+CREATE SEQUENCE public.s_quantity
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_quantity
+CREATE SEQUENCE public.s_stock_goods
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_stock_goods
+CREATE SEQUENCE public.s_tva
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_tva
+CREATE SEQUENCE public.s_user_act
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_user_act
+CREATE SEQUENCE public.s_user_jrn
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE s_user_jrn
+CREATE SEQUENCE public.seq_bud_hypothese_bh_id
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_bud_hypothese_bh_id
+CREATE SEQUENCE public.seq_doc_type_1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_1
+CREATE SEQUENCE public.seq_doc_type_10
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_10
+CREATE SEQUENCE public.seq_doc_type_2
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_2
+CREATE SEQUENCE public.seq_doc_type_20
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_20
+CREATE SEQUENCE public.seq_doc_type_21
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_21
+CREATE SEQUENCE public.seq_doc_type_22
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_22
+CREATE SEQUENCE public.seq_doc_type_3
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_3
+CREATE SEQUENCE public.seq_doc_type_4
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_4
+CREATE SEQUENCE public.seq_doc_type_5
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_5
+CREATE SEQUENCE public.seq_doc_type_6
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_6
+CREATE SEQUENCE public.seq_doc_type_7
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_7
+CREATE SEQUENCE public.seq_doc_type_8
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_8
+CREATE SEQUENCE public.seq_doc_type_9
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE seq_doc_type_9
+CREATE SEQUENCE public.stock_change_c_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE stock_change_c_id_seq
+ALTER SEQUENCE public.stock_change_c_id_seq OWNED BY public.stock_change.c_id;
+CREATE SEQUENCE public.stock_repository_r_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE stock_change_c_id_seq OWNED BY stock_change.c_id;
-CREATE SEQUENCE stock_repository_r_id_seq
+ALTER SEQUENCE public.stock_repository_r_id_seq OWNED BY
public.stock_repository.r_id;
+CREATE SEQUENCE public.tag_group_tg_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE stock_repository_r_id_seq OWNED BY stock_repository.r_id;
-CREATE SEQUENCE tags_t_id_seq
+ALTER SEQUENCE public.tag_group_tg_id_seq OWNED BY public.tag_group.tg_id;
+CREATE SEQUENCE public.tags_t_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE tags_t_id_seq OWNED BY tags.t_id;
-CREATE SEQUENCE tmp_pcmn_id_seq
+ALTER SEQUENCE public.tags_t_id_seq OWNED BY public.tags.t_id;
+CREATE SEQUENCE public.tmp_pcmn_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE tmp_stockgood_detail_d_id_seq
+CREATE SEQUENCE public.tmp_stockgood_detail_d_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE tmp_stockgood_detail_d_id_seq OWNED BY
tmp_stockgood_detail.d_id;
-CREATE SEQUENCE tmp_stockgood_s_id_seq
+ALTER SEQUENCE public.tmp_stockgood_detail_d_id_seq OWNED BY
public.tmp_stockgood_detail.d_id;
+CREATE SEQUENCE public.tmp_stockgood_s_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE tmp_stockgood_s_id_seq OWNED BY tmp_stockgood.s_id;
-CREATE SEQUENCE todo_list_tl_id_seq
+ALTER SEQUENCE public.tmp_stockgood_s_id_seq OWNED BY
public.tmp_stockgood.s_id;
+CREATE SEQUENCE public.todo_list_tl_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE todo_list_shared_id_seq
+CREATE SEQUENCE public.todo_list_shared_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE todo_list_shared_id_seq OWNED BY todo_list_shared.id;
-CREATE SEQUENCE uos_pk_seq
+ALTER SEQUENCE public.todo_list_shared_id_seq OWNED BY
public.todo_list_shared.id;
+CREATE SEQUENCE public.uos_pk_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-CREATE SEQUENCE user_active_security_id_seq
+CREATE SEQUENCE public.user_active_security_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE user_active_security_id_seq OWNED BY user_active_security.id;
-CREATE SEQUENCE user_filter_id_seq
+ALTER SEQUENCE public.user_active_security_id_seq OWNED BY
public.user_active_security.id;
+CREATE SEQUENCE public.user_filter_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE user_filter_id_seq OWNED BY user_filter.id;
-CREATE SEQUENCE user_sec_action_profile_ua_id_seq
+ALTER SEQUENCE public.user_filter_id_seq OWNED BY public.user_filter.id;
+CREATE SEQUENCE public.user_sec_action_profile_ua_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
-ALTER SEQUENCE user_sec_action_profile_ua_id_seq OWNED BY
user_sec_action_profile.ua_id;
+ALTER SEQUENCE public.user_sec_action_profile_ua_id_seq OWNED BY
public.user_sec_action_profile.ua_id;
diff --git a/include/sql/mod1/table.sql b/include/sql/mod1/table.sql
index 814e1c20d..1e5c7eb9e 100644
--- a/include/sql/mod1/table.sql
+++ b/include/sql/mod1/table.sql
@@ -1,11 +1,23 @@
-CREATE DOMAIN account_type AS character varying(40);
-CREATE TABLE action (
+CREATE DOMAIN public.account_type AS character varying(40);
+CREATE TABLE public.acc_other_tax (
+ ac_id integer NOT NULL,
+ ac_label text NOT NULL,
+ ac_rate numeric(5,2) NOT NULL,
+ ajrn_def_id integer[],
+ ac_accounting public.account_type NOT NULL
+);
+CREATE TABLE public.action (
ac_id integer NOT NULL,
ac_description text NOT NULL,
ac_module text,
ac_code character varying(30)
);
-CREATE TABLE action_detail (
+CREATE TABLE public.action_comment_document (
+ acd_id bigint NOT NULL,
+ document_id bigint,
+ action_gestion_comment_id bigint
+);
+CREATE TABLE public.action_detail (
ad_id integer NOT NULL,
f_id bigint,
ad_text text,
@@ -16,8 +28,8 @@ CREATE TABLE action_detail (
ad_total_amount numeric(20,4) DEFAULT 0,
ag_id integer DEFAULT 0 NOT NULL
);
-CREATE TABLE action_gestion (
- ag_id integer DEFAULT nextval('action_gestion_ag_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.action_gestion (
+ ag_id integer DEFAULT nextval('public.action_gestion_ag_id_seq'::regclass)
NOT NULL,
ag_type integer,
f_id_dest integer,
ag_title text,
@@ -25,65 +37,80 @@ CREATE TABLE action_gestion (
ag_ref text,
ag_hour text,
ag_priority integer DEFAULT 2,
- ag_dest bigint DEFAULT (-1) NOT NULL,
+ ag_dest bigint DEFAULT '-1'::integer NOT NULL,
ag_owner text,
ag_contact bigint,
ag_state integer,
ag_remind_date date
);
-CREATE TABLE action_gestion_comment (
+CREATE TABLE public.action_gestion_comment (
agc_id bigint NOT NULL,
ag_id bigint,
agc_date timestamp with time zone DEFAULT now(),
agc_comment text,
- tech_user text
+ tech_user text,
+ agc_comment_raw text
+);
+CREATE TABLE public.action_gestion_filter (
+ af_id bigint NOT NULL,
+ af_user text NOT NULL,
+ af_name text NOT NULL,
+ af_search text NOT NULL
);
-CREATE TABLE action_gestion_operation (
+CREATE TABLE public.action_gestion_operation (
ago_id bigint NOT NULL,
ag_id bigint,
jr_id bigint
);
-CREATE TABLE action_gestion_related (
+CREATE TABLE public.action_gestion_related (
aga_id bigint NOT NULL,
aga_least bigint NOT NULL,
aga_greatest bigint NOT NULL,
aga_type bigint
);
-CREATE TABLE action_person (
+CREATE TABLE public.action_person (
ap_id integer NOT NULL,
ag_id integer NOT NULL,
f_id integer NOT NULL
);
-CREATE TABLE action_tags (
+CREATE TABLE public.action_person_option (
+ ap_id bigint NOT NULL,
+ ap_value character varying,
+ contact_option_ref_id bigint NOT NULL,
+ action_person_id bigint NOT NULL
+);
+CREATE TABLE public.action_tags (
at_id integer NOT NULL,
t_id integer,
ag_id integer
);
-CREATE TABLE attr_def (
+CREATE TABLE public.attr_def (
ad_id integer DEFAULT nextval(('s_attr_def'::text)::regclass) NOT NULL,
ad_text text,
ad_type text,
ad_size text NOT NULL,
- ad_extra text
+ ad_extra text,
+ ad_search_followup integer DEFAULT 1,
+ ad_default_order integer
);
-CREATE TABLE attr_min (
+CREATE TABLE public.attr_min (
frd_id integer NOT NULL,
ad_id integer NOT NULL
);
-CREATE TABLE bilan (
- b_id integer DEFAULT nextval('bilan_b_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.bilan (
+ b_id integer DEFAULT nextval('public.bilan_b_id_seq'::regclass) NOT NULL,
b_name text NOT NULL,
b_file_template text NOT NULL,
b_file_form text,
b_type text NOT NULL
);
-CREATE TABLE bookmark (
+CREATE TABLE public.bookmark (
b_id integer NOT NULL,
b_order integer DEFAULT 1,
b_action text,
login text
);
-CREATE TABLE centralized (
+CREATE TABLE public.centralized (
c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL,
c_j_id integer,
c_date date NOT NULL,
@@ -91,7 +118,7 @@ CREATE TABLE centralized (
c_montant numeric(20,4) NOT NULL,
c_debit boolean DEFAULT true,
c_jrn_def integer NOT NULL,
- c_poste account_type,
+ c_poste public.account_type,
c_description text,
c_grp integer NOT NULL,
c_comment text,
@@ -99,12 +126,30 @@ CREATE TABLE centralized (
c_periode integer,
c_order integer
);
-CREATE TABLE del_action (
+CREATE TABLE public.contact_option_ref (
+ cor_id bigint NOT NULL,
+ cor_label character varying NOT NULL,
+ cor_type integer DEFAULT 0 NOT NULL,
+ cor_value_select character varying
+);
+CREATE TABLE public.currency (
+ id integer NOT NULL,
+ cr_code_iso character varying(10),
+ cr_name character varying(80)
+);
+CREATE TABLE public.currency_history (
+ id integer NOT NULL,
+ ch_value numeric(20,8) NOT NULL,
+ ch_from date NOT NULL,
+ currency_id integer NOT NULL,
+ CONSTRAINT currency_history_check CHECK ((ch_value > (0)::numeric))
+);
+CREATE TABLE public.del_action (
del_id integer NOT NULL,
del_name text NOT NULL,
del_time timestamp without time zone
);
-CREATE TABLE del_jrn (
+CREATE TABLE public.del_jrn (
jr_id integer NOT NULL,
jr_def_id integer,
jr_montant numeric(20,4),
@@ -127,11 +172,11 @@ CREATE TABLE del_jrn (
jr_pj_number text,
dj_id integer NOT NULL
);
-CREATE TABLE del_jrnx (
+CREATE TABLE public.del_jrnx (
j_id integer NOT NULL,
j_date date,
j_montant numeric(20,4),
- j_poste account_type,
+ j_poste public.account_type,
j_grpt integer,
j_rapt text,
j_jrn_def integer,
@@ -146,8 +191,8 @@ CREATE TABLE del_jrnx (
djx_id integer NOT NULL,
f_id bigint
);
-CREATE TABLE document (
- d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.document (
+ d_id integer DEFAULT nextval('public.document_d_id_seq'::regclass) NOT
NULL,
ag_id integer NOT NULL,
d_lob oid,
d_number bigint NOT NULL,
@@ -155,8 +200,13 @@ CREATE TABLE document (
d_mimetype text,
d_description text
);
-CREATE TABLE document_modele (
- md_id integer DEFAULT nextval('document_modele_md_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.document_component (
+ dc_id integer NOT NULL,
+ dc_code text NOT NULL,
+ dc_comment text NOT NULL
+);
+CREATE TABLE public.document_modele (
+ md_id integer DEFAULT
nextval('public.document_modele_md_id_seq'::regclass) NOT NULL,
md_name text NOT NULL,
md_lob oid,
md_type integer NOT NULL,
@@ -164,17 +214,24 @@ CREATE TABLE document_modele (
md_mimetype text,
md_affect character varying(3) NOT NULL
);
-CREATE TABLE document_state (
- s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.document_option (
+ do_id bigint NOT NULL,
+ do_code character varying(20) NOT NULL,
+ document_type_id bigint,
+ do_enable integer DEFAULT 1 NOT NULL,
+ do_option character varying
+);
+CREATE TABLE public.document_state (
+ s_id integer DEFAULT nextval('public.document_state_s_id_seq'::regclass)
NOT NULL,
s_value character varying(50) NOT NULL,
s_status character(1)
);
-CREATE TABLE document_type (
- dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.document_type (
+ dt_id integer DEFAULT nextval('public.document_type_dt_id_seq'::regclass)
NOT NULL,
dt_value character varying(80),
dt_prefix text
);
-CREATE TABLE extension (
+CREATE TABLE public.extension (
ex_id integer NOT NULL,
ex_name character varying(30) NOT NULL,
ex_code character varying(15) NOT NULL,
@@ -182,11 +239,13 @@ CREATE TABLE extension (
ex_file character varying NOT NULL,
ex_enable "char" DEFAULT 'Y'::"char" NOT NULL
);
-CREATE TABLE fiche (
+CREATE TABLE public.fiche (
f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL,
- fd_id integer
+ fd_id integer,
+ f_enable character(1) NOT NULL,
+ CONSTRAINT f_enable_ck CHECK ((f_enable = ANY (ARRAY['0'::bpchar,
'1'::bpchar])))
);
-CREATE TABLE fiche_def (
+CREATE TABLE public.fiche_def (
fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL,
fd_class_base text,
fd_label text NOT NULL,
@@ -194,70 +253,81 @@ CREATE TABLE fiche_def (
frd_id integer NOT NULL,
fd_description text
);
-CREATE TABLE fiche_def_ref (
+CREATE TABLE public.fiche_def_ref (
frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT
NULL,
frd_text text,
- frd_class_base account_type
+ frd_class_base public.account_type
);
-CREATE TABLE fiche_detail (
+CREATE TABLE public.fiche_detail (
jft_id integer DEFAULT nextval(('s_jnt_fic_att_value'::text)::regclass)
NOT NULL,
f_id integer,
ad_id integer,
ad_value text
);
-CREATE TABLE forecast (
+CREATE TABLE public.forecast (
f_id integer NOT NULL,
f_name text NOT NULL,
f_start_date bigint,
f_end_date bigint
);
-CREATE TABLE forecast_cat (
+CREATE TABLE public.forecast_category (
fc_id integer NOT NULL,
fc_desc text NOT NULL,
- f_id bigint,
+ f_id bigint NOT NULL,
fc_order integer DEFAULT 0 NOT NULL
);
-CREATE TABLE forecast_item (
+CREATE TABLE public.forecast_item (
fi_id integer NOT NULL,
fi_text text,
fi_account text,
- fi_card integer,
fi_order integer,
fc_id integer,
fi_amount numeric(20,4) DEFAULT 0,
- fi_debit "char" DEFAULT 'd'::"char" NOT NULL,
- fi_pid integer
+ fi_pid integer,
+ fi_amount_initial numeric(20,4) DEFAULT 0
);
-CREATE TABLE form (
+CREATE TABLE public.form_definition (
+ fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL,
+ fr_label text
+);
+CREATE TABLE public.form_detail (
fo_id integer DEFAULT nextval(('s_form'::text)::regclass) NOT NULL,
- fo_fr_id integer,
+ fo_fr_id integer NOT NULL,
fo_pos integer,
fo_label text,
fo_formula text
);
-CREATE TABLE formdef (
- fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL,
- fr_label text
-);
-CREATE TABLE groupe_analytique (
+CREATE TABLE public.groupe_analytique (
ga_id character varying(10) NOT NULL,
pa_id integer,
ga_description text
);
-CREATE TABLE info_def (
+CREATE TABLE public.info_def (
id_type text NOT NULL,
id_description text
);
-CREATE TABLE jnt_fic_attr (
+CREATE TABLE public.jnt_document_option_contact (
+ jdoc_id bigint NOT NULL,
+ jdoc_enable integer NOT NULL,
+ document_type_id bigint,
+ contact_option_ref_id bigint,
+ CONSTRAINT jnt_document_option_contact_check CHECK ((jdoc_enable = ANY
(ARRAY[0, 1])))
+);
+CREATE TABLE public.jnt_fic_attr (
fd_id integer,
ad_id integer,
- jnt_id bigint DEFAULT nextval('s_jnt_id'::regclass) NOT NULL,
+ jnt_id bigint DEFAULT nextval('public.s_jnt_id'::regclass) NOT NULL,
jnt_order integer NOT NULL
);
-CREATE TABLE jnt_letter (
+CREATE TABLE public.jnt_letter (
jl_id integer NOT NULL
);
-CREATE TABLE jrn (
+CREATE TABLE public.jnt_tag_group_tag (
+ tag_group_id bigint NOT NULL,
+ tag_id bigint NOT NULL,
+ jt_id integer NOT NULL
+);
+CREATE TABLE public.jrn (
jr_id integer DEFAULT nextval(('s_jrn'::text)::regclass) NOT NULL,
jr_def_id integer NOT NULL,
jr_montant numeric(20,4) NOT NULL,
@@ -279,9 +349,12 @@ CREATE TABLE jrn (
jr_pj_number text,
jr_mt text,
jr_date_paid date,
- jr_optype character varying(3) DEFAULT 'NOR'::character varying
+ jr_optype character varying(3) DEFAULT 'NOR'::character varying,
+ currency_id bigint DEFAULT 0 NOT NULL,
+ currency_rate numeric(20,6) DEFAULT 1 NOT NULL,
+ currency_rate_ref numeric(20,6) DEFAULT 1 NOT NULL
);
-CREATE TABLE jrn_def (
+CREATE TABLE public.jrn_def (
jrn_def_id integer DEFAULT nextval(('s_jrn_def'::text)::regclass) NOT NULL,
jrn_def_name text NOT NULL,
jrn_def_class_deb text,
@@ -298,39 +371,50 @@ CREATE TABLE jrn_def (
jrn_def_bank bigint,
jrn_def_num_op integer,
jrn_def_description text,
- jrn_enable integer DEFAULT 1
-);
-CREATE TABLE jrn_info (
+ jrn_enable integer DEFAULT 1,
+ currency_id integer DEFAULT 0 NOT NULL,
+ jrn_def_negative_amount character(1) DEFAULT '0'::bpchar NOT NULL,
+ jrn_def_negative_warning text,
+ jrn_def_quantity smallint DEFAULT 1 NOT NULL,
+ CONSTRAINT negative_amount_ck CHECK ((jrn_def_negative_amount = ANY
(ARRAY['1'::bpchar, '0'::bpchar])))
+);
+CREATE TABLE public.jrn_info (
ji_id integer NOT NULL,
jr_id integer NOT NULL,
id_type text NOT NULL,
ji_value text
);
-CREATE TABLE jrn_note (
+CREATE TABLE public.jrn_note (
n_id integer NOT NULL,
n_text text,
jr_id bigint NOT NULL
);
-CREATE TABLE jrn_periode (
+CREATE TABLE public.jrn_periode (
jrn_def_id integer NOT NULL,
p_id integer NOT NULL,
status text,
- id bigint DEFAULT nextval('jrn_periode_id_seq'::regclass) NOT NULL
+ id bigint DEFAULT nextval('public.jrn_periode_id_seq'::regclass) NOT NULL
);
-CREATE TABLE jrn_rapt (
+CREATE TABLE public.jrn_rapt (
jra_id integer DEFAULT nextval(('s_jrn_rapt'::text)::regclass) NOT NULL,
jr_id integer NOT NULL,
jra_concerned integer NOT NULL
);
-CREATE TABLE jrn_type (
+CREATE TABLE public.jrn_tax (
+ jt_id integer NOT NULL,
+ j_id bigint NOT NULL,
+ pcm_val public.account_type NOT NULL,
+ ac_id integer NOT NULL
+);
+CREATE TABLE public.jrn_type (
jrn_type_id character(3) NOT NULL,
jrn_desc text
);
-CREATE TABLE jrnx (
+CREATE TABLE public.jrnx (
j_id integer DEFAULT nextval(('s_jrn_op'::text)::regclass) NOT NULL,
j_date date DEFAULT now(),
j_montant numeric(20,4) DEFAULT 0,
- j_poste account_type NOT NULL,
+ j_poste public.account_type NOT NULL,
j_grpt integer NOT NULL,
j_rapt text,
j_jrn_def integer NOT NULL,
@@ -344,48 +428,48 @@ CREATE TABLE jrnx (
j_qcode text,
f_id bigint
);
-CREATE TABLE key_distribution (
+CREATE TABLE public.key_distribution (
kd_id integer NOT NULL,
kd_name text,
kd_description text
);
-CREATE TABLE key_distribution_activity (
+CREATE TABLE public.key_distribution_activity (
ka_id integer NOT NULL,
ke_id bigint NOT NULL,
po_id bigint,
pa_id bigint NOT NULL
);
-CREATE TABLE key_distribution_detail (
+CREATE TABLE public.key_distribution_detail (
ke_id integer NOT NULL,
kd_id bigint NOT NULL,
ke_row integer NOT NULL,
ke_percent numeric(20,4) NOT NULL
);
-CREATE TABLE key_distribution_ledger (
+CREATE TABLE public.key_distribution_ledger (
kl_id integer NOT NULL,
kd_id bigint NOT NULL,
jrn_def_id bigint NOT NULL
);
-CREATE TABLE letter_cred (
+CREATE TABLE public.letter_cred (
lc_id integer NOT NULL,
j_id bigint NOT NULL,
jl_id bigint NOT NULL
);
-CREATE TABLE letter_deb (
+CREATE TABLE public.letter_deb (
ld_id integer NOT NULL,
j_id bigint NOT NULL,
jl_id bigint NOT NULL
);
-CREATE TABLE link_action_type (
+CREATE TABLE public.link_action_type (
l_id bigint NOT NULL,
l_desc character varying
);
-CREATE TABLE menu_default (
+CREATE TABLE public.menu_default (
md_id integer NOT NULL,
md_code text NOT NULL,
me_code text NOT NULL
);
-CREATE TABLE menu_ref (
+CREATE TABLE public.menu_ref (
me_code text NOT NULL,
me_menu text,
me_file text,
@@ -396,7 +480,7 @@ CREATE TABLE menu_ref (
me_type character varying(2),
me_description_etendue text
);
-CREATE TABLE mod_payment (
+CREATE TABLE public.payment_method (
mp_id integer NOT NULL,
mp_lib text NOT NULL,
mp_jrn_def_id integer NOT NULL,
@@ -404,8 +488,8 @@ CREATE TABLE mod_payment (
mp_qcode text,
jrn_def_id bigint
);
-CREATE TABLE op_predef (
- od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL,
+CREATE TABLE public.op_predef (
+ od_id integer DEFAULT nextval('public.op_def_op_seq'::regclass) NOT NULL,
jrn_def_id integer NOT NULL,
od_name text NOT NULL,
od_item integer NOT NULL,
@@ -413,26 +497,26 @@ CREATE TABLE op_predef (
od_direct boolean NOT NULL,
od_description text
);
-CREATE TABLE op_predef_detail (
- opd_id integer DEFAULT nextval('op_predef_detail_opd_id_seq'::regclass)
NOT NULL,
+CREATE TABLE public.op_predef_detail (
+ opd_id integer DEFAULT
nextval('public.op_predef_detail_opd_id_seq'::regclass) NOT NULL,
od_id integer NOT NULL,
opd_poste text NOT NULL,
opd_amount numeric(20,4),
- opd_tva_id integer,
+ opd_tva_id text,
opd_quantity numeric(20,4),
opd_debit boolean NOT NULL,
opd_tva_amount numeric(20,4),
opd_comment text,
opd_qc boolean
);
-CREATE TABLE operation_analytique (
- oa_id integer DEFAULT nextval('historique_analytique_ha_id_seq'::regclass)
NOT NULL,
+CREATE TABLE public.operation_analytique (
+ oa_id integer DEFAULT
nextval('public.historique_analytique_ha_id_seq'::regclass) NOT NULL,
po_id integer NOT NULL,
oa_amount numeric(20,4) NOT NULL,
oa_description text,
oa_debit boolean DEFAULT true NOT NULL,
j_id integer,
- oa_group integer DEFAULT nextval('s_oa_group'::regclass) NOT NULL,
+ oa_group integer DEFAULT nextval('public.s_oa_group'::regclass) NOT NULL,
oa_date date NOT NULL,
oa_row integer,
oa_jrnx_id_source bigint,
@@ -440,54 +524,101 @@ CREATE TABLE operation_analytique (
f_id bigint,
CONSTRAINT operation_analytique_oa_amount_check CHECK ((oa_amount >=
(0)::numeric))
);
-CREATE TABLE parameter (
+CREATE TABLE public.operation_currency (
+ id bigint NOT NULL,
+ oc_amount numeric(20,6) NOT NULL,
+ oc_vat_amount numeric(20,6) DEFAULT 0,
+ oc_price_unit numeric(20,6),
+ j_id bigint NOT NULL
+);
+CREATE TABLE public.operation_exercice (
+ oe_id bigint NOT NULL,
+ oe_date date,
+ oe_type text NOT NULL,
+ oe_text text,
+ oe_dossier_id integer NOT NULL,
+ oe_exercice integer NOT NULL,
+ jr_internal text,
+ oe_transfer_date timestamp without time zone,
+ tech_user text,
+ tech_date timestamp without time zone DEFAULT now(),
+ CONSTRAINT operation_exercice_oe_type_check CHECK (((oe_type =
'opening'::text) OR (oe_type = 'closing'::text)))
+);
+CREATE TABLE public.operation_exercice_detail (
+ oed_id bigint NOT NULL,
+ oe_id bigint NOT NULL,
+ oed_poste public.account_type,
+ oed_qcode text,
+ oed_label text,
+ oed_amount numeric(20,4),
+ oed_debit boolean
+);
+CREATE TABLE public.operation_tag (
+ opt_id bigint NOT NULL,
+ jrn_id bigint,
+ tag_id integer
+);
+CREATE TABLE public.parameter (
pr_id text NOT NULL,
pr_value text
);
-CREATE TABLE parm_code (
+CREATE TABLE public.parameter_extra (
+ id integer NOT NULL,
+ pe_code text,
+ pe_label text,
+ pe_value text
+);
+CREATE TABLE public.parm_appearance (
+ a_code text NOT NULL,
+ a_value text NOT NULL
+);
+CREATE TABLE public.parm_code (
p_code text NOT NULL,
p_value text,
p_comment text
);
-CREATE TABLE parm_money (
+CREATE TABLE public.parm_money (
pm_id integer DEFAULT nextval(('s_currency'::text)::regclass),
pm_code character(3) NOT NULL,
pm_rate numeric(20,4)
);
-CREATE TABLE parm_periode (
+CREATE TABLE public.parm_periode (
p_id integer DEFAULT nextval(('s_periode'::text)::regclass) NOT NULL,
p_start date NOT NULL,
p_end date NOT NULL,
p_exercice text DEFAULT to_char(now(), 'YYYY'::text) NOT NULL,
p_closed boolean DEFAULT false,
p_central boolean DEFAULT false,
+ p_exercice_label text NOT NULL,
CONSTRAINT parm_periode_check CHECK ((p_end >= p_start))
);
-CREATE TABLE parm_poste (
- p_value account_type NOT NULL,
+CREATE TABLE public.parm_poste (
+ p_value public.account_type NOT NULL,
p_type text NOT NULL
);
-CREATE TABLE plan_analytique (
- pa_id integer DEFAULT nextval('plan_analytique_pa_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.plan_analytique (
+ pa_id integer DEFAULT
nextval('public.plan_analytique_pa_id_seq'::regclass) NOT NULL,
pa_name text DEFAULT 'Sans Nom'::text NOT NULL,
pa_description text
);
-CREATE TABLE poste_analytique (
- po_id integer DEFAULT nextval('poste_analytique_po_id_seq'::regclass) NOT
NULL,
+CREATE TABLE public.poste_analytique (
+ po_id integer DEFAULT
nextval('public.poste_analytique_po_id_seq'::regclass) NOT NULL,
po_name text NOT NULL,
pa_id integer NOT NULL,
po_amount numeric(20,4) DEFAULT 0.0 NOT NULL,
po_description text,
- ga_id character varying(10)
+ ga_id character varying(10),
+ po_state integer DEFAULT 1 NOT NULL
);
-CREATE TABLE profile (
+CREATE TABLE public.profile (
p_name text NOT NULL,
p_id integer NOT NULL,
p_desc text,
with_calc boolean DEFAULT true,
- with_direct_form boolean DEFAULT true
+ with_direct_form boolean DEFAULT true,
+ with_search_card integer
);
-CREATE TABLE profile_menu (
+CREATE TABLE public.profile_menu (
pm_id integer NOT NULL,
me_code text,
me_code_dep text,
@@ -497,30 +628,38 @@ CREATE TABLE profile_menu (
pm_default integer,
pm_id_dep bigint
);
-CREATE TABLE profile_menu_type (
+CREATE TABLE public.profile_menu_type (
pm_type text NOT NULL,
pm_desc text
);
-CREATE TABLE profile_sec_repository (
+CREATE TABLE public.profile_mobile (
+ pmo_id integer NOT NULL,
+ me_code text NOT NULL,
+ pmo_order integer NOT NULL,
+ p_id integer NOT NULL,
+ pmo_default character(1) DEFAULT '1'::bpchar
+);
+CREATE TABLE public.profile_sec_repository (
ur_id bigint NOT NULL,
p_id bigint,
r_id bigint,
ur_right character(1),
CONSTRAINT user_sec_profile_ur_right_check CHECK ((ur_right = ANY
(ARRAY['R'::bpchar, 'W'::bpchar])))
);
-CREATE TABLE profile_user (
+CREATE TABLE public.profile_user (
user_name text NOT NULL,
pu_id integer NOT NULL,
p_id integer
);
-CREATE TABLE quant_fin (
+CREATE TABLE public.quant_fin (
qf_id bigint NOT NULL,
qf_bank bigint,
jr_id bigint,
qf_other bigint,
- qf_amount numeric(20,4) DEFAULT 0
+ qf_amount numeric(20,4) DEFAULT 0,
+ j_id bigint
);
-CREATE TABLE quant_purchase (
+CREATE TABLE public.quant_purchase (
qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL,
qp_internal text,
j_id integer NOT NULL,
@@ -538,7 +677,7 @@ CREATE TABLE quant_purchase (
qp_vat_sided numeric(20,4) DEFAULT 0.0,
qp_unit numeric(20,4) DEFAULT 0
);
-CREATE TABLE quant_sold (
+CREATE TABLE public.quant_sold (
qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL,
qs_internal text,
qs_fiche integer NOT NULL,
@@ -552,7 +691,7 @@ CREATE TABLE quant_sold (
qs_vat_sided numeric(20,4) DEFAULT 0.0,
qs_unit numeric(20,4) DEFAULT 0
);
-CREATE TABLE stock_change (
+CREATE TABLE public.stock_change (
c_id bigint NOT NULL,
c_comment text,
c_date date,
@@ -560,7 +699,7 @@ CREATE TABLE stock_change (
r_id bigint,
tech_date time without time zone DEFAULT now() NOT NULL
);
-CREATE TABLE stock_goods (
+CREATE TABLE public.stock_goods (
sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL,
j_id integer,
f_id integer,
@@ -576,7 +715,7 @@ CREATE TABLE stock_goods (
c_id bigint,
CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type
= 'd'::bpchar)))
);
-CREATE TABLE stock_repository (
+CREATE TABLE public.stock_repository (
r_id bigint NOT NULL,
r_name text,
r_adress text,
@@ -584,27 +723,32 @@ CREATE TABLE stock_repository (
r_city text,
r_phone text
);
-CREATE TABLE tags (
+CREATE TABLE public.tag_group (
+ tg_id bigint NOT NULL,
+ tg_name character varying NOT NULL
+);
+CREATE TABLE public.tags (
t_id integer NOT NULL,
t_tag text NOT NULL,
t_description text,
t_actif character(1) DEFAULT 'Y'::bpchar,
+ t_color integer DEFAULT 1,
CONSTRAINT tags_check CHECK ((t_actif = ANY (ARRAY['N'::bpchar,
'Y'::bpchar])))
);
-CREATE TABLE tmp_pcmn (
- pcm_val account_type NOT NULL,
+CREATE TABLE public.tmp_pcmn (
+ pcm_val public.account_type NOT NULL,
pcm_lib text,
- pcm_val_parent account_type DEFAULT 0,
+ pcm_val_parent public.account_type DEFAULT 0,
pcm_type text,
- id bigint DEFAULT nextval('tmp_pcmn_id_seq'::regclass) NOT NULL,
+ id bigint DEFAULT nextval('public.tmp_pcmn_id_seq'::regclass) NOT NULL,
pcm_direct_use character varying(1) DEFAULT 'Y'::character varying NOT
NULL,
- CONSTRAINT pcm_direct_use_ck CHECK (((pcm_direct_use)::text = ANY
((ARRAY['Y'::character varying, 'N'::character varying])::text[])))
+ CONSTRAINT pcm_direct_use_ck CHECK (((pcm_direct_use)::text = ANY
(ARRAY[('Y'::character varying)::text, ('N'::character varying)::text])))
);
-CREATE TABLE tmp_stockgood (
+CREATE TABLE public.tmp_stockgood (
s_id bigint NOT NULL,
s_date timestamp without time zone DEFAULT now()
);
-CREATE TABLE tmp_stockgood_detail (
+CREATE TABLE public.tmp_stockgood_detail (
d_id bigint NOT NULL,
s_id bigint,
sg_code text,
@@ -613,8 +757,8 @@ CREATE TABLE tmp_stockgood_detail (
r_id bigint,
f_id bigint
);
-CREATE TABLE todo_list (
- tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL,
+CREATE TABLE public.todo_list (
+ tl_id integer DEFAULT nextval('public.todo_list_tl_id_seq'::regclass) NOT
NULL,
tl_date date NOT NULL,
tl_title text NOT NULL,
tl_desc text,
@@ -622,31 +766,37 @@ CREATE TABLE todo_list (
is_public character(1) DEFAULT 'N'::bpchar NOT NULL,
CONSTRAINT ck_is_public CHECK ((is_public = ANY (ARRAY['Y'::bpchar,
'N'::bpchar])))
);
-CREATE TABLE todo_list_shared (
+CREATE TABLE public.todo_list_shared (
id integer NOT NULL,
todo_list_id integer NOT NULL,
use_login text NOT NULL
);
-CREATE TABLE tool_uos (
- uos_value bigint DEFAULT nextval('uos_pk_seq'::regclass) NOT NULL
+CREATE TABLE public.tool_uos (
+ uos_value bigint DEFAULT nextval('public.uos_pk_seq'::regclass) NOT NULL
);
-CREATE TABLE tva_rate (
- tva_id integer DEFAULT nextval('s_tva'::regclass) NOT NULL,
+CREATE TABLE public.tva_rate (
+ tva_id integer DEFAULT nextval('public.s_tva'::regclass) NOT NULL,
tva_label text NOT NULL,
tva_rate numeric(8,4) DEFAULT 0.0 NOT NULL,
tva_comment text,
tva_poste text,
- tva_both_side integer DEFAULT 0
-);
-CREATE TABLE user_active_security (
+ tva_both_side integer DEFAULT 0,
+ tva_payment_sale character(1) DEFAULT 'O'::bpchar,
+ tva_payment_purchase character(1) DEFAULT 'O'::bpchar,
+ tva_code text NOT NULL,
+ CONSTRAINT tva_code_number_check CHECK ((tva_code !~ '^([0-9]+)$'::text)),
+ CONSTRAINT tva_rate_purchase_check CHECK ((tva_payment_purchase = ANY
(ARRAY['O'::bpchar, 'P'::bpchar]))),
+ CONSTRAINT tva_rate_sale_check CHECK ((tva_payment_sale = ANY
(ARRAY['O'::bpchar, 'P'::bpchar])))
+);
+CREATE TABLE public.user_active_security (
id integer NOT NULL,
us_login text NOT NULL,
us_ledger character varying(1) NOT NULL,
us_action character varying(1) NOT NULL,
- CONSTRAINT user_active_security_action_check CHECK (((us_action)::text =
ANY ((ARRAY['Y'::character varying, 'N'::character varying])::text[]))),
- CONSTRAINT user_active_security_ledger_check CHECK (((us_ledger)::text =
ANY ((ARRAY['Y'::character varying, 'N'::character varying])::text[])))
+ CONSTRAINT user_active_security_action_check CHECK (((us_action)::text =
ANY (ARRAY[('Y'::character varying)::text, ('N'::character varying)::text]))),
+ CONSTRAINT user_active_security_ledger_check CHECK (((us_ledger)::text =
ANY (ARRAY[('Y'::character varying)::text, ('N'::character varying)::text])))
);
-CREATE TABLE user_filter (
+CREATE TABLE public.user_filter (
id bigint NOT NULL,
login text,
nb_jrn integer,
@@ -663,32 +813,36 @@ CREATE TABLE user_filter (
ledger_type character varying(5),
all_ledger integer,
filter_name text NOT NULL,
- unpaid character varying
+ operation_filter text NOT NULL,
+ uf_tag text,
+ uf_tag_option integer,
+ uf_currency_code integer,
+ tva_id_search integer
);
-CREATE TABLE user_local_pref (
+CREATE TABLE public.user_local_pref (
user_id text NOT NULL,
parameter_type text NOT NULL,
parameter_value text
);
-CREATE TABLE user_sec_act (
+CREATE TABLE public.user_sec_act (
ua_id integer DEFAULT nextval(('s_user_act'::text)::regclass) NOT NULL,
ua_login text,
ua_act_id integer
);
-CREATE TABLE user_sec_action_profile (
+CREATE TABLE public.user_sec_action_profile (
ua_id bigint NOT NULL,
p_id bigint,
p_granted bigint,
ua_right character(1),
- CONSTRAINT user_sec_action_profile_ua_right_check CHECK ((ua_right = ANY
(ARRAY['R'::bpchar, 'W'::bpchar])))
+ CONSTRAINT user_sec_action_profile_ua_right_check CHECK ((ua_right = ANY
(ARRAY['R'::bpchar, 'W'::bpchar, 'X'::bpchar, 'O'::bpchar])))
);
-CREATE TABLE user_sec_jrn (
+CREATE TABLE public.user_sec_jrn (
uj_id integer DEFAULT nextval(('s_user_jrn'::text)::regclass) NOT NULL,
uj_login text,
uj_jrn_id integer,
uj_priv text
);
-CREATE TABLE version (
+CREATE TABLE public.version (
val integer NOT NULL,
v_description text,
v_date timestamp without time zone DEFAULT now()
diff --git a/include/sql/mod1/view.sql b/include/sql/mod1/view.sql
index a26c4171e..4cc2d86ef 100644
--- a/include/sql/mod1/view.sql
+++ b/include/sql/mod1/view.sql
@@ -1,32 +1,725 @@
-CREATE VIEW v_all_menu AS
- SELECT pm.me_code, pm.pm_id, pm.me_code_dep, pm.p_order,
pm.p_type_display, p.p_name, p.p_desc, mr.me_menu, mr.me_file, mr.me_url,
mr.me_parameter, mr.me_javascript, mr.me_type, pm.p_id, mr.me_description FROM
((profile_menu pm JOIN profile p ON ((p.p_id = pm.p_id))) JOIN menu_ref mr
USING (me_code)) ORDER BY pm.p_order;
-CREATE VIEW vw_fiche_attr AS
- SELECT a.f_id, a.fd_id, a.ad_value AS vw_name, k.ad_value AS
vw_first_name, b.ad_value AS vw_sell, c.ad_value AS vw_buy, d.ad_value AS
tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.ad_value AS
vw_addr, f.ad_value AS vw_cp, j.ad_value AS quick_code, h.ad_value AS
vw_description, i.ad_value AS tva_num, fiche_def.frd_id, l.ad_value AS
accounting FROM (((((((((((((SELECT fiche.f_id, fiche.fd_id,
fiche_detail.ad_value FROM (fiche LEFT JOIN fiche_detail USING (f_id)) [...]
-CREATE VIEW vw_fiche_name AS
- SELECT fiche_detail.f_id, fiche_detail.ad_value AS name FROM fiche_detail
WHERE (fiche_detail.ad_id = 1);
-CREATE VIEW v_detail_purchase AS
- WITH m AS (SELECT sum(quant_purchase.qp_price) AS htva,
sum(quant_purchase.qp_vat) AS tot_vat, sum(quant_purchase.qp_vat_sided) AS
tot_tva_np, jrn.jr_id FROM ((quant_purchase JOIN jrnx USING (j_id)) JOIN jrn ON
((jrnx.j_grpt = jrn.jr_grpt_id))) GROUP BY jrn.jr_id) SELECT jrn.jr_id,
jrn.jr_date, jrn.jr_date_paid, jrn.jr_ech, jrn.jr_tech_per, jrn.jr_comment,
jrn.jr_pj_number, jrn.jr_internal, jrn.jr_def_id, jrnx.j_poste, jrnx.j_text,
jrnx.j_qcode, quant_purchase.qp_fiche AS item_card, [...]
-CREATE VIEW v_detail_sale AS
- WITH m AS (SELECT sum(quant_sold.qs_price) AS htva, sum(quant_sold.qs_vat)
AS tot_vat, sum(quant_sold.qs_vat_sided) AS tot_tva_np, jrn.jr_id FROM
((quant_sold JOIN jrnx USING (j_id)) JOIN jrn ON ((jrnx.j_grpt =
jrn.jr_grpt_id))) GROUP BY jrn.jr_id) SELECT jrn.jr_id, jrn.jr_date,
jrn.jr_date_paid, jrn.jr_ech, jrn.jr_tech_per, jrn.jr_comment,
jrn.jr_pj_number, jrn.jr_internal, jrn.jr_def_id, jrnx.j_poste, jrnx.j_text,
jrnx.j_qcode, quant_sold.qs_fiche AS item_card, a.name AS item_name, [...]
-CREATE VIEW v_menu_dependency AS
- WITH t_menu AS (SELECT pm.pm_id, mr.me_menu, pm.me_code, pm.me_code_dep,
pm.p_type_display, mr.me_file, mr.me_javascript, mr.me_description,
mr.me_description_etendue, p.p_id FROM ((profile_menu pm JOIN profile p ON
((p.p_id = pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code,
''::text) WHEN (v2.me_code IS NOT NULL) THEN COALESCE((' [...]
-CREATE VIEW v_menu_description AS
- WITH t_menu AS (SELECT pm.pm_id, pm.pm_id_dep, pm.p_id, mr.me_menu,
pm.me_code, pm.me_code_dep, pm.p_type_display, pu.user_name, mr.me_file,
mr.me_javascript, mr.me_description, mr.me_description_etendue FROM
(((profile_menu pm JOIN profile_user pu ON ((pu.p_id = pm.p_id))) JOIN profile
p ON ((p.p_id = pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN [...]
-CREATE VIEW v_menu_description_favori AS
- WITH t_menu AS (SELECT mr.me_menu, pm.me_code, pm.me_code_dep,
pm.p_type_display, pu.user_name, mr.me_file, mr.me_javascript,
mr.me_description, mr.me_description_etendue FROM (((profile_menu pm JOIN
profile_user pu ON ((pu.p_id = pm.p_id))) JOIN profile p ON ((p.p_id =
pm.p_id))) JOIN menu_ref mr USING (me_code))) SELECT DISTINCT
((COALESCE((v3.me_code || '/'::text), ''::text) || COALESCE(v2.me_code,
''::text)) || CASE WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code,
''::text) WH [...]
-CREATE VIEW v_menu_profile AS
- WITH t_menu AS (SELECT pm.pm_id, pm.pm_id_dep, pm.me_code, pm.me_code_dep,
pm.p_type_display, pm.p_id FROM (profile_menu pm JOIN profile p ON ((p.p_id =
pm.p_id)))) SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) || CASE WHEN (v2.me_code IS NULL) THEN
COALESCE(v1.me_code, ''::text) WHEN (v2.me_code IS NOT NULL) THEN
COALESCE(('/'::text || v1.me_code), ''::text) ELSE NULL::text END) AS code,
v3.p_type_display, COALESCE(v3.pm_id, 0) AS [...]
-CREATE VIEW v_quant_detail AS
- WITH quant AS (SELECT quant_purchase.j_id, quant_purchase.qp_fiche AS
fiche_id, quant_purchase.qp_supplier AS tiers, quant_purchase.qp_vat AS
vat_amount, quant_purchase.qp_price AS price, quant_purchase.qp_vat_code AS
vat_code, quant_purchase.qp_dep_priv AS dep_priv, quant_purchase.qp_nd_tva AS
nd_tva, quant_purchase.qp_nd_tva_recup AS nd_tva_recup,
quant_purchase.qp_nd_amount AS nd_amount, quant_purchase.qp_vat_sided AS
vat_sided FROM quant_purchase UNION ALL SELECT quant_sold.j_id, [...]
-CREATE VIEW v_tva_rate AS
- SELECT tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label,
tva_rate.tva_comment, split_part(tva_rate.tva_poste, ','::text, 1) AS
tva_purchase, split_part(tva_rate.tva_poste, ','::text, 2) AS tva_sale,
tva_rate.tva_both_side FROM tva_rate;
-CREATE VIEW vw_client AS
- SELECT fiche.f_id, a1.ad_value AS name, a.ad_value AS quick_code,
b.ad_value AS tva_num, c.ad_value AS poste_comptable, d.ad_value AS rue,
e.ad_value AS code_postal, f.ad_value AS pays, g.ad_value AS telephone,
h.ad_value AS email FROM (((((((((((fiche JOIN fiche_def USING (fd_id)) JOIN
fiche_def_ref USING (frd_id)) LEFT JOIN (SELECT fiche_detail.jft_id,
fiche_detail.f_id, fiche_detail.ad_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id)) LEF [...]
-CREATE VIEW vw_fiche_def AS
- SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, attr_def.ad_text,
fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account,
fiche_def.frd_id FROM ((fiche_def JOIN jnt_fic_attr USING (fd_id)) JOIN
attr_def ON ((attr_def.ad_id = jnt_fic_attr.ad_id)));
-CREATE VIEW vw_fiche_min AS
- SELECT attr_min.frd_id, attr_min.ad_id, attr_def.ad_text,
fiche_def_ref.frd_text, fiche_def_ref.frd_class_base FROM ((attr_min JOIN
attr_def USING (ad_id)) JOIN fiche_def_ref USING (frd_id));
-CREATE VIEW vw_poste_qcode AS
- SELECT c.f_id, a.ad_value AS j_poste, b.ad_value AS j_qcode FROM ((fiche c
LEFT JOIN (SELECT fiche_detail.f_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 5)) a USING (f_id)) LEFT JOIN (SELECT
fiche_detail.f_id, fiche_detail.ad_value FROM fiche_detail WHERE
(fiche_detail.ad_id = 23)) b USING (f_id));
-CREATE VIEW vw_supplier AS
- SELECT fiche.f_id, a1.ad_value AS name, a.ad_value AS quick_code,
b.ad_value AS tva_num, c.ad_value AS poste_comptable, d.ad_value AS rue,
e.ad_value AS code_postal, f.ad_value AS pays, g.ad_value AS telephone,
h.ad_value AS email FROM (((((((((((fiche JOIN fiche_def USING (fd_id)) JOIN
fiche_def_ref USING (frd_id)) LEFT JOIN (SELECT fiche_detail.jft_id,
fiche_detail.f_id, fiche_detail.ad_id, fiche_detail.ad_value FROM fiche_detail
WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id)) LEF [...]
+CREATE VIEW public.v_all_account_currency AS
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_fin q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
((q1.jr_id = x.jr_id)))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id
+UNION ALL
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_purchase q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste,
+ j.jr_internal
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
(((q1.qp_internal = x.jr_internal) AND ((x.f_id = q1.qp_fiche) OR (x.f_id =
q1.qp_supplier)))))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id
+UNION ALL
+ SELECT sum(oc.oc_amount) AS sum_oc_amount,
+ sum(oc.oc_vat_amount) AS sum_oc_vat_amount,
+ x.j_poste,
+ x.j_id
+ FROM ((public.quant_sold q1
+ JOIN ( SELECT j1.j_id,
+ j.jr_id,
+ j1.f_id,
+ j1.j_poste,
+ j.jr_internal
+ FROM (public.jrnx j1
+ JOIN public.jrn j ON ((j1.j_grpt = j.jr_grpt_id)))) x ON
(((q1.qs_internal = x.jr_internal) AND ((x.f_id = q1.qs_fiche) OR (x.f_id =
q1.qs_client)))))
+ JOIN public.operation_currency oc ON ((oc.j_id = q1.j_id)))
+ GROUP BY x.j_poste, x.j_id;
+CREATE VIEW public.v_all_card_currency AS
+ SELECT sum(operation_currency.oc_amount) AS sum_oc_amount,
+ sum(operation_currency.oc_vat_amount) AS sum_oc_vat_amount,
+ jrnx.f_id,
+ operation_currency.j_id
+ FROM (public.operation_currency
+ JOIN public.jrnx USING (j_id))
+ GROUP BY jrnx.f_id, operation_currency.j_id;
+CREATE VIEW public.v_all_menu AS
+ SELECT pm.me_code,
+ pm.pm_id,
+ pm.me_code_dep,
+ pm.p_order,
+ pm.p_type_display,
+ p.p_name,
+ p.p_desc,
+ mr.me_menu,
+ mr.me_file,
+ mr.me_url,
+ mr.me_parameter,
+ mr.me_javascript,
+ mr.me_type,
+ pm.p_id,
+ mr.me_description
+ FROM ((public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ ORDER BY pm.p_order;
+CREATE VIEW public.v_contact AS
+ WITH contact_data AS (
+ SELECT f.f_id,
+ f.f_enable,
+ f.fd_id
+ FROM (public.fiche f
+ JOIN public.fiche_def fd ON ((f.fd_id = fd.fd_id)))
+ WHERE (fd.frd_id = 16)
+ )
+ SELECT cd.f_id,
+ cd.f_enable,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 32) AND (fiche_detail.f_id = cd.f_id)))
AS contact_fname,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 1) AND (fiche_detail.f_id = cd.f_id)))
AS contact_name,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 23) AND (fiche_detail.f_id = cd.f_id)))
AS contact_qcode,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 25) AND (fiche_detail.f_id = cd.f_id)))
AS contact_company,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 27) AND (fiche_detail.f_id = cd.f_id)))
AS contact_mobile,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 17) AND (fiche_detail.f_id = cd.f_id)))
AS contact_phone,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 18) AND (fiche_detail.f_id = cd.f_id)))
AS contact_email,
+ ( SELECT fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE ((fiche_detail.ad_id = 26) AND (fiche_detail.f_id = cd.f_id)))
AS contact_fax,
+ cd.fd_id AS card_category
+ FROM contact_data cd;
+CREATE VIEW public.v_currency_last_value AS
+ WITH recent_rate AS (
+ SELECT currency_history.currency_id,
+ max(currency_history.ch_from) AS rc_from
+ FROM public.currency_history
+ GROUP BY currency_history.currency_id
+ )
+ SELECT cr1.id AS currency_id,
+ cr1.cr_name,
+ cr1.cr_code_iso,
+ ch1.id AS currency_history_id,
+ ch1.ch_value,
+ to_char((recent_rate.rc_from)::timestamp with time zone,
'DD.MM.YYYY'::text) AS str_from
+ FROM ((public.currency cr1
+ JOIN recent_rate ON ((recent_rate.currency_id = cr1.id)))
+ JOIN public.currency_history ch1 ON (((recent_rate.currency_id =
ch1.currency_id) AND (recent_rate.rc_from = ch1.ch_from))));
+CREATE VIEW public.vw_fiche_attr AS
+ SELECT a.f_id,
+ a.fd_id,
+ a.ad_value AS vw_name,
+ k.ad_value AS vw_first_name,
+ b.ad_value AS vw_sell,
+ c.ad_value AS vw_buy,
+ d.ad_value AS tva_code,
+ tva_rate.tva_id,
+ tva_rate.tva_rate,
+ tva_rate.tva_label,
+ e.ad_value AS vw_addr,
+ f.ad_value AS vw_cp,
+ j.ad_value AS quick_code,
+ h.ad_value AS vw_description,
+ i.ad_value AS tva_num,
+ fiche_def.frd_id,
+ l.ad_value AS accounting,
+ a.f_enable
+ FROM ((((((((((((( SELECT fiche.f_id,
+ fiche.fd_id,
+ fiche.f_enable,
+ fiche_detail.ad_value
+ FROM (public.fiche
+ LEFT JOIN public.fiche_detail USING (f_id))
+ WHERE (fiche_detail.ad_id = 1)) a
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 6)) b ON ((a.f_id = b.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 7)) c ON ((a.f_id = c.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 2)) d ON ((a.f_id = d.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) e ON ((a.f_id = e.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) f ON ((a.f_id = f.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) j ON ((a.f_id = j.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 9)) h ON ((a.f_id = h.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) i ON ((a.f_id = i.f_id)))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 32)) k ON ((a.f_id = k.f_id)))
+ LEFT JOIN public.tva_rate ON ((d.ad_value = (tva_rate.tva_id)::text)))
+ JOIN public.fiche_def USING (fd_id))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) l ON ((a.f_id = l.f_id)));
+CREATE VIEW public.vw_fiche_name AS
+ SELECT fiche_detail.f_id,
+ fiche_detail.ad_value AS name
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1);
+CREATE VIEW public.v_detail_purchase AS
+ WITH m AS (
+ SELECT sum(quant_purchase_1.qp_price) AS htva,
+ sum(quant_purchase_1.qp_vat) AS tot_vat,
+ sum(quant_purchase_1.qp_vat_sided) AS tot_tva_np,
+ jrn_1.jr_id
+ FROM ((public.quant_purchase quant_purchase_1
+ JOIN public.jrnx jrnx_1 USING (j_id))
+ JOIN public.jrn jrn_1 ON ((jrnx_1.j_grpt = jrn_1.jr_grpt_id)))
+ GROUP BY jrn_1.jr_id
+ ), other_tax AS (
+ SELECT jrnx_1.j_grpt,
+ sum(
+ CASE
+ WHEN (jrnx_1.j_debit IS FALSE) THEN ((0)::numeric -
jrnx_1.j_montant)
+ ELSE jrnx_1.j_montant
+ END) AS other_tax_amount
+ FROM (public.jrnx jrnx_1
+ JOIN public.jrn_tax USING (j_id))
+ GROUP BY jrnx_1.j_grpt
+ )
+ SELECT jrn.jr_id,
+ jrn.jr_date,
+ jrn.jr_date_paid,
+ jrn.jr_ech,
+ jrn.jr_tech_per,
+ jrn.jr_comment,
+ jrn.jr_pj_number,
+ jrn.jr_internal,
+ jrn.jr_def_id,
+ jrnx.j_poste,
+ jrnx.j_text,
+ jrnx.j_qcode,
+ jrn.jr_rapt,
+ quant_purchase.qp_fiche AS item_card,
+ a.name AS item_name,
+ quant_purchase.qp_supplier,
+ b.vw_name AS tiers_name,
+ b.quick_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ tva_rate.tva_both_side,
+ quant_purchase.qp_vat_sided AS vat_sided,
+ quant_purchase.qp_vat_code AS vat_code,
+ quant_purchase.qp_vat AS vat,
+ quant_purchase.qp_price AS price,
+ quant_purchase.qp_quantite AS quantity,
+ (quant_purchase.qp_price / quant_purchase.qp_quantite) AS price_per_unit,
+ quant_purchase.qp_nd_amount AS non_ded_amount,
+ quant_purchase.qp_nd_tva AS non_ded_tva,
+ quant_purchase.qp_nd_tva_recup AS non_ded_tva_recup,
+ m.htva,
+ m.tot_vat,
+ m.tot_tva_np,
+ ot.other_tax_amount,
+ oc.oc_amount,
+ oc.oc_vat_amount,
+ ( SELECT currency.cr_code_iso
+ FROM public.currency
+ WHERE (jrn.currency_id = currency.id)) AS cr_code_iso
+ FROM ((((((((public.jrn
+ JOIN public.jrnx ON ((jrn.jr_grpt_id = jrnx.j_grpt)))
+ JOIN public.quant_purchase USING (j_id))
+ JOIN public.vw_fiche_name a ON ((quant_purchase.qp_fiche = a.f_id)))
+ JOIN public.vw_fiche_attr b ON ((quant_purchase.qp_supplier = b.f_id)))
+ LEFT JOIN public.tva_rate ON ((quant_purchase.qp_vat_code =
tva_rate.tva_id)))
+ JOIN m ON ((m.jr_id = jrn.jr_id)))
+ LEFT JOIN public.operation_currency oc ON ((oc.j_id = jrnx.j_id)))
+ LEFT JOIN other_tax ot ON ((ot.j_grpt = jrn.jr_grpt_id)));
+CREATE VIEW public.v_detail_sale AS
+ WITH m AS (
+ SELECT sum(quant_sold_1.qs_price) AS htva,
+ sum(quant_sold_1.qs_vat) AS tot_vat,
+ sum(quant_sold_1.qs_vat_sided) AS tot_tva_np,
+ jrn_1.jr_id
+ FROM ((public.quant_sold quant_sold_1
+ JOIN public.jrnx jrnx_1 USING (j_id))
+ JOIN public.jrn jrn_1 ON ((jrnx_1.j_grpt = jrn_1.jr_grpt_id)))
+ GROUP BY jrn_1.jr_id
+ ), other_tax AS (
+ SELECT jrnx_1.j_grpt,
+ sum(
+ CASE
+ WHEN (jrnx_1.j_debit IS TRUE) THEN ((0)::numeric -
jrnx_1.j_montant)
+ ELSE jrnx_1.j_montant
+ END) AS other_tax_amount
+ FROM (public.jrnx jrnx_1
+ JOIN public.jrn_tax USING (j_id))
+ GROUP BY jrnx_1.j_grpt
+ )
+ SELECT jrn.jr_id,
+ jrn.jr_date,
+ jrn.jr_date_paid,
+ jrn.jr_ech,
+ jrn.jr_tech_per,
+ jrn.jr_comment,
+ jrn.jr_pj_number,
+ jrn.jr_internal,
+ jrn.jr_def_id,
+ jrnx.j_poste,
+ jrnx.j_text,
+ jrnx.j_qcode,
+ jrn.jr_rapt,
+ quant_sold.qs_fiche AS item_card,
+ a.name AS item_name,
+ quant_sold.qs_client,
+ b.vw_name AS tiers_name,
+ b.quick_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ tva_rate.tva_both_side,
+ quant_sold.qs_vat_sided AS vat_sided,
+ quant_sold.qs_vat_code AS vat_code,
+ quant_sold.qs_vat AS vat,
+ quant_sold.qs_price AS price,
+ quant_sold.qs_quantite AS quantity,
+ (quant_sold.qs_price / quant_sold.qs_quantite) AS price_per_unit,
+ m.htva,
+ m.tot_vat,
+ m.tot_tva_np,
+ ot.other_tax_amount,
+ oc.oc_amount,
+ oc.oc_vat_amount,
+ ( SELECT currency.cr_code_iso
+ FROM public.currency
+ WHERE (jrn.currency_id = currency.id)) AS cr_code_iso
+ FROM ((((((((public.jrn
+ JOIN public.jrnx ON ((jrn.jr_grpt_id = jrnx.j_grpt)))
+ JOIN public.quant_sold USING (j_id))
+ JOIN public.vw_fiche_name a ON ((quant_sold.qs_fiche = a.f_id)))
+ JOIN public.vw_fiche_attr b ON ((quant_sold.qs_client = b.f_id)))
+ LEFT JOIN public.tva_rate ON ((quant_sold.qs_vat_code = tva_rate.tva_id)))
+ JOIN m ON ((m.jr_id = jrn.jr_id)))
+ LEFT JOIN public.operation_currency oc ON ((oc.j_id = jrnx.j_id)))
+ LEFT JOIN other_tax ot ON ((ot.j_grpt = jrn.jr_grpt_id)));
+CREATE VIEW public.v_menu_dependency AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue,
+ p.p_id
+ FROM ((public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.pm_id,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (v2.pm_id IS NOT NULL) THEN v2.pm_id
+ WHEN (v3.pm_id IS NOT NULL) THEN v3.pm_id
+ ELSE NULL::integer
+ END AS higher_dep,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript,
+ v1.p_id,
+ v2.p_id AS v2pid,
+ v3.p_id AS v3pid
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE ((COALESCE(v2.p_id, v1.p_id) = v1.p_id) AND (COALESCE(v3.p_id,
v1.p_id) = v1.p_id) AND (v1.p_type_display <> 'P'::text))
+ ORDER BY v1.pm_id;
+CREATE VIEW public.v_menu_description AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ pm.pm_id_dep,
+ pm.p_id,
+ mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pu.user_name,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue
+ FROM (((public.profile_menu pm
+ JOIN public.profile_user pu ON ((pu.p_id = pm.p_id)))
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ v1.user_name,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript,
+ v1.pm_id,
+ v1.pm_id_dep,
+ v1.p_id
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE ((v1.p_type_display <> 'P'::text) AND ((COALESCE(v1.me_file, ''::text)
<> ''::text) OR (COALESCE(v1.me_javascript, ''::text) <> ''::text)));
+CREATE VIEW public.v_menu_description_favori AS
+ WITH t_menu AS (
+ SELECT mr.me_menu,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pu.user_name,
+ mr.me_file,
+ mr.me_javascript,
+ mr.me_description,
+ mr.me_description_etendue
+ FROM (((public.profile_menu pm
+ JOIN public.profile_user pu ON ((pu.p_id = pm.p_id)))
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ JOIN public.menu_ref mr USING (me_code))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v1.me_code,
+ v1.me_description,
+ v1.me_description_etendue,
+ v1.me_file,
+ v1.user_name,
+ ('> '::text || v1.me_menu) AS v1menu,
+ CASE
+ WHEN (COALESCE(v3.me_menu, ''::text) <> ''::text) THEN (' >
'::text || v2.me_menu)
+ ELSE v2.me_menu
+ END AS v2menu,
+ v3.me_menu AS v3menu,
+ v3.p_type_display,
+ COALESCE(v1.me_javascript, COALESCE(v2.me_javascript, v3.me_javascript))
AS javascript
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.me_code_dep = v2.me_code)))
+ LEFT JOIN t_menu v3 ON ((v2.me_code_dep = v3.me_code)))
+ WHERE (v1.p_type_display <> 'P'::text);
+CREATE VIEW public.v_menu_profile AS
+ WITH t_menu AS (
+ SELECT pm.pm_id,
+ pm.pm_id_dep,
+ pm.me_code,
+ pm.me_code_dep,
+ pm.p_type_display,
+ pm.p_id
+ FROM (public.profile_menu pm
+ JOIN public.profile p ON ((p.p_id = pm.p_id)))
+ )
+ SELECT DISTINCT ((COALESCE((v3.me_code || '/'::text), ''::text) ||
COALESCE(v2.me_code, ''::text)) ||
+ CASE
+ WHEN (v2.me_code IS NULL) THEN COALESCE(v1.me_code, ''::text)
+ WHEN (v2.me_code IS NOT NULL) THEN COALESCE(('/'::text ||
v1.me_code), ''::text)
+ ELSE NULL::text
+ END) AS code,
+ v3.p_type_display,
+ COALESCE(v3.pm_id, 0) AS pm_id_v3,
+ COALESCE(v2.pm_id, 0) AS pm_id_v2,
+ v1.pm_id AS pm_id_v1,
+ v1.p_id
+ FROM ((t_menu v1
+ LEFT JOIN t_menu v2 ON ((v1.pm_id_dep = v2.pm_id)))
+ LEFT JOIN t_menu v3 ON ((v2.pm_id_dep = v3.pm_id)))
+ WHERE (v1.p_type_display <> 'P'::text);
+CREATE VIEW public.v_quant_detail AS
+ WITH quant AS (
+ SELECT quant_purchase.j_id,
+ quant_purchase.qp_fiche AS fiche_id,
+ quant_purchase.qp_supplier AS tiers,
+ quant_purchase.qp_vat AS vat_amount,
+ quant_purchase.qp_price AS price,
+ quant_purchase.qp_vat_code AS vat_code,
+ quant_purchase.qp_dep_priv AS dep_priv,
+ quant_purchase.qp_nd_tva AS nd_tva,
+ quant_purchase.qp_nd_tva_recup AS nd_tva_recup,
+ quant_purchase.qp_nd_amount AS nd_amount,
+ quant_purchase.qp_vat_sided AS vat_sided
+ FROM public.quant_purchase
+ UNION ALL
+ SELECT quant_sold.j_id,
+ quant_sold.qs_fiche,
+ quant_sold.qs_client,
+ quant_sold.qs_vat,
+ quant_sold.qs_price,
+ quant_sold.qs_vat_code,
+ 0,
+ 0,
+ 0,
+ 0,
+ quant_sold.qs_vat_sided
+ FROM public.quant_sold
+ )
+ SELECT jrn.jr_id,
+ quant.tiers,
+ jrn_def.jrn_def_name,
+ jrn_def.jrn_def_type,
+ vw_fiche_name.name,
+ jrn.jr_comment,
+ jrn.jr_montant,
+ sum(quant.price) AS price,
+ quant.vat_code,
+ sum(quant.vat_amount) AS vat_amount,
+ sum(quant.dep_priv) AS dep_priv,
+ sum(quant.nd_tva) AS nd_tva,
+ sum(quant.nd_tva_recup) AS nd_tva_recup,
+ sum(quant.nd_amount) AS nd_amount,
+ quant.vat_sided,
+ tva_rate.tva_label
+ FROM (((((public.jrn
+ JOIN public.jrnx ON ((jrnx.j_grpt = jrn.jr_grpt_id)))
+ JOIN quant USING (j_id))
+ LEFT JOIN public.vw_fiche_name ON ((quant.tiers = vw_fiche_name.f_id)))
+ JOIN public.jrn_def ON ((jrn_def.jrn_def_id = jrn.jr_def_id)))
+ JOIN public.tva_rate ON ((tva_rate.tva_id = quant.vat_code)))
+ GROUP BY jrn.jr_id, quant.tiers, jrn.jr_comment, jrn.jr_montant,
quant.vat_code, quant.vat_sided, vw_fiche_name.name, jrn_def.jrn_def_name,
jrn_def.jrn_def_type, tva_rate.tva_label;
+CREATE VIEW public.v_tva_rate AS
+ SELECT tva_rate.tva_id,
+ tva_rate.tva_rate,
+ tva_rate.tva_code,
+ tva_rate.tva_label,
+ tva_rate.tva_comment,
+ split_part(tva_rate.tva_poste, ','::text, 1) AS tva_purchase,
+ split_part(tva_rate.tva_poste, ','::text, 2) AS tva_sale,
+ tva_rate.tva_both_side,
+ tva_rate.tva_payment_purchase,
+ tva_rate.tva_payment_sale
+ FROM public.tva_rate;
+CREATE VIEW public.vw_client AS
+ SELECT fiche.f_id,
+ a1.ad_value AS name,
+ a.ad_value AS quick_code,
+ b.ad_value AS tva_num,
+ c.ad_value AS poste_comptable,
+ d.ad_value AS rue,
+ e.ad_value AS code_postal,
+ f.ad_value AS pays,
+ g.ad_value AS telephone,
+ h.ad_value AS email
+ FROM (((((((((((public.fiche
+ JOIN public.fiche_def USING (fd_id))
+ JOIN public.fiche_def_ref USING (frd_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) b USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) c USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) d USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) e USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 16)) f USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 17)) g USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 18)) h USING (f_id))
+ WHERE (fiche_def_ref.frd_id = 9);
+CREATE VIEW public.vw_fiche_def AS
+ SELECT jnt_fic_attr.fd_id,
+ jnt_fic_attr.ad_id,
+ attr_def.ad_text,
+ fiche_def.fd_class_base,
+ fiche_def.fd_label,
+ fiche_def.fd_create_account,
+ fiche_def.frd_id
+ FROM ((public.fiche_def
+ JOIN public.jnt_fic_attr USING (fd_id))
+ JOIN public.attr_def ON ((attr_def.ad_id = jnt_fic_attr.ad_id)));
+CREATE VIEW public.vw_fiche_min AS
+ SELECT attr_min.frd_id,
+ attr_min.ad_id,
+ attr_def.ad_text,
+ fiche_def_ref.frd_text,
+ fiche_def_ref.frd_class_base
+ FROM ((public.attr_min
+ JOIN public.attr_def USING (ad_id))
+ JOIN public.fiche_def_ref USING (frd_id));
+CREATE VIEW public.vw_poste_qcode AS
+ SELECT c.f_id,
+ a.ad_value AS j_poste,
+ b.ad_value AS j_qcode
+ FROM ((public.fiche c
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.f_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) b USING (f_id));
+CREATE VIEW public.vw_supplier AS
+ SELECT fiche.f_id,
+ a1.ad_value AS name,
+ a.ad_value AS quick_code,
+ b.ad_value AS tva_num,
+ c.ad_value AS poste_comptable,
+ d.ad_value AS rue,
+ e.ad_value AS code_postal,
+ f.ad_value AS pays,
+ g.ad_value AS telephone,
+ h.ad_value AS email
+ FROM (((((((((((public.fiche
+ JOIN public.fiche_def USING (fd_id))
+ JOIN public.fiche_def_ref USING (frd_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 1)) a1 USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 13)) b USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 23)) a USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 5)) c USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 14)) d USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 15)) e USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 16)) f USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 17)) g USING (f_id))
+ LEFT JOIN ( SELECT fiche_detail.jft_id,
+ fiche_detail.f_id,
+ fiche_detail.ad_id,
+ fiche_detail.ad_value
+ FROM public.fiche_detail
+ WHERE (fiche_detail.ad_id = 18)) h USING (f_id))
+ WHERE (fiche_def_ref.frd_id = 8);
diff --git a/include/sql/mod2/data.sql b/include/sql/mod2/data.sql
index 64dcd146b..0cac6a97e 100644
--- a/include/sql/mod2/data.sql
+++ b/include/sql/mod2/data.sql
@@ -1,83 +1,93 @@
set search_path = public,comptaproc,pg_catalog ;
+
SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
+SET xmloption = content;
SET client_min_messages = wa